Do not invalidate the current Fargate Task Definition when registering a new flow version

Sequence of events:

  1. A flow’s run fails
  2. A new version of this flow, which has an ECSRun run config, is registered. It seems that current version’s Fargate Task Definition is made INACTIVE as part of the process of registering the new version of the flow.
  3. An attempt is made to retry the failed flow, but it cannot be run because it is trying to use an invalidated Fargate Task definition.

Error message:

An error occurred (InvalidParameterException) when calling the RunTask operation: TaskDefinition is inactive

Prefect Core Version: 0.15.13

have you tried using a preregistered task definition?

here is an example:

there are more examples in this repo

Thanks Anna, for the suggestion. I’ll study this code example you provided.

I found out that our automation system is actually setting the outdated Task Definition to INACTIVE, in order to prevent users from running an old version of each flow.

1 Like