https://prefect.io logo
Title
v

Vishnu Duggirala

11/22/2022, 8:43 PM
Is anyone else experiencing this issue where it does not delete task-def, even when
auto_deregister_task_definition
set to True? Is it normal for a deployment to create a new task-definition every time it runs an ECS task?
1
a

Anna Geller

11/22/2022, 9:17 PM
Prefect never deletes them, it deregisters them when auto_deregister_task_definition is set to True - if you see a different behavior, please open a bug report issue with more details on the prefect-aws repo
👍 1
#2 yes - you can avoid that by specifying task definition ARN explicitly
v

Vishnu Duggirala

11/22/2022, 9:29 PM
I'm running task by specifying the task definition ARN but it still creates a new one
a

Anna Geller

11/22/2022, 9:47 PM
could you open an issue on prefect-aws repo showing how you configured the block and show maybe some screenshots confirming that and we can reproduce and fix the block/docs if needed you can tag me on the issue
1
m

Mason Menges

11/22/2022, 10:55 PM
Hey @Vishnu Duggirala This actually looks like it's because you have
configure_cloud_watch
logs set to true https://prefect-community.slack.com/archives/C048K0MGHNK/p1669063715402379?thread_ts=1668546666.300229&cid=C048K0MGHNK, This re-registers the task definition because it's updating the prefix-stream for the cloud logs. setting that to false I believe should prevent it from creating a new task definition
:gratitude-thank-you: 1
v

Vishnu Duggirala

11/22/2022, 11:03 PM
Perfect, that solves it, thanks @Mason Menges and @Anna Geller, I will close the issue in github.
🙌 1
:gratitude-thank-you: 1