Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deploy-ecs): default to COMPLETE if rolloutState isn't present #55

Merged
merged 1 commit into from
May 13, 2024

Conversation

paulswartz
Copy link
Member

@paulswartz paulswartz commented May 13, 2024

EC2 deploy status look like this:

{
  "id": "ecs-svc/<id>",
  "status": "PRIMARY",
  "taskDefinition": "arn:aws:ecs:us-east-1:<account>:task-definition/<service>:<version>",
  "desiredCount": 1,
  "pendingCount": 0,
  "runningCount": 1,
  "failedTasks": 0,
  "createdAt": "2024-05-13T08:37:58.664000-04:00",
  "updatedAt": "2024-05-13T08:37:58.664000-04:00",
  "launchType": "EC2"
}

Since there's no rolloutState here, we default to COMPLETED and rely on the runningCount equaling the desiredCount

Failed deploy: https://github.com/mbta/tablespoon/actions/runs/8991294003 (status is null)
Successful deploy: https://github.com/mbta/tablespoon/actions/runs/9063171014 (status defaults to COMPLETED)

EC2 deploy status look like this:

```json
{
  "id": "ecs-svc/<id>",
  "status": "PRIMARY",
  "taskDefinition": "arn:aws:ecs:us-east-1:<account>:task-definition/<service>:<version>",
  "desiredCount": 1,
  "pendingCount": 0,
  "runningCount": 1,
  "failedTasks": 0,
  "createdAt": "2024-05-13T08:37:58.664000-04:00",
  "updatedAt": "2024-05-13T08:37:58.664000-04:00",
  "launchType": "EC2"
}
```

Since there's no `rolloutState` here, we default to `COMPLETED` and rely
on the `runningCount` equaling the `desiredCount`
@paulswartz paulswartz requested a review from firestack May 13, 2024 12:47
@paulswartz paulswartz requested a review from a team as a code owner May 13, 2024 12:47
@paulswartz paulswartz merged commit 4476244 into main May 13, 2024
4 checks passed
@paulswartz paulswartz deleted the ps-deploy-fix-ec2 branch May 13, 2024 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants