Open chrisguidry opened 1 year ago
I think you were right about the change. I think we were essentially relying on the state not changing and staying in RUNNING
? But if I'm understanding the change right, now every time you call describe_tasks
it will advance the state?
moto==4.2.4
{
"attachments":
[],
"clusterArn": "arn:aws:ecs:us-east-1:123456789012:cluster/default",
"containerInstanceArn": "arn:aws:ecs:us-east-1:123456789012:container-instance/default/bd383890-d174-4b59-bcc4-c177605e8ac8",
"containers":
[
{
"name": "prefect",
"exitCode": 0
}
],
"desiredStatus": "RUNNING",
"lastStatus": "RUNNING",
"launchType": "EC2",
"overrides":
{
"containerOverrides":
[
{
"name": "prefect",
"environment":
[]
}
]
},
"startedBy": "",
"stoppedReason": "",
"tags":
[],
"taskArn": "arn:aws:ecs:us-east-1:123456789012:task/default/344082a2-67c8-479e-a181-a79f98011c01",
"taskDefinitionArn": "arn:aws:ecs:us-east-1:123456789012:task-definition/prefect:1"
}
moto==4.2.5
{
"attachments":
[],
"clusterArn": "arn:aws:ecs:us-east-1:123456789012:cluster/default",
"containerInstanceArn": "arn:aws:ecs:us-east-1:123456789012:container-instance/default/63ece0f4-9113-4ef7-892d-620938d4a1e4",
"containers":
[
{
"name": "prefect",
"exitCode": 0
}
],
"desiredStatus": "RUNNING",
"lastStatus": "STOPPED",
"launchType": "EC2",
"overrides":
{
"containerOverrides":
[
{
"name": "prefect",
"environment":
[]
}
]
},
"startedBy": "",
"stoppedReason": "",
"tags":
[],
"taskArn": "arn:aws:ecs:us-east-1:123456789012:task/default/b933b895-4949-47a1-8afe-a408e36406f3",
"taskDefinitionArn": "arn:aws:ecs:us-east-1:123456789012:task-definition/prefect:1"
}
Between moto==4.2.4 and 4.2.5, something changed which caused
stoppedReason
to be absent from response where we were expecting them:https://github.com/getmoto/moto/compare/4.2.4...4.2.5
https://github.com/PrefectHQ/prefect-aws/actions/runs/6409809772
If I downgrade that one patch version, we're all good, but the release notes make me wonder if something that they changed is actually important for us:
https://github.com/getmoto/moto/compare/4.2.4...4.2.5#diff-20df862dcc461d786fada45f544b5e56def9739a8e63de45106bb0e515d06840R137-R149