I think our biggest challenge migrating to v2 was to allow the addition of sidecars and avoiding getting the too-many-revisions to a task definition issue. Our current deployment strategy is working as expected albeit probably not what it was designed to do. Some things with
ECSTask
creation had to be modified (providing
task_definition_arn
and
auto_deregister_task=False
) to allow for us to use sidecars for logging to DataDog (among other things) and avoid the too-many-revisions. In our workflow, once a flow is "deployed" it is the source of truth until overwritten by another "deployment". The source of all this discussion was removing the need for a
Github
block and using the flow stored in the image, which the addition of the envar
PREFECT_LOCAL_STORAGE_PATH
solves (
magically). This strategy allows us to deploy multiple
ECSTask
infrastructure blocks (`EC2`|`Fargate`) with varying amounts of memory and cpu. Downstream workflow logic determines the infrastructure flow to run (e.g.
-ec2-light
or
-fg-heavy
) in the flow name, which for light processing that is needed to complete quickly we use
EC2
with low resource request.