Skip to content

feat: Handle missing ECS deployment gracefully when replaced #20

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Bankamah
Copy link
Contributor

This PR improves the robustness of the ECS deployment polling script. Previously, if a deployment was replaced by a manual or external redeploy while the GitHub Action was polling, the script would fail or exit with unclear messaging. Now, if the deployment ID is no longer found (indicating a replacement), the script exits gracefully with a clear message.

@Bankamah Bankamah requested a review from iBotPeaches June 11, 2025 14:52
@Bankamah Bankamah changed the title feat: Handle missing ECS deployment gracefully when replaced by exter… feat: Handle missing ECS deployment gracefully when replaced Jun 11, 2025
Copy link
Member

@iBotPeaches iBotPeaches left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting. I guess I'm confused that a deployment stepped over by an external one should still exist. I'm itching to see the raw response since I'm not understanding what is missing or blank.

@Bankamah
Copy link
Contributor Author

When an external or manual redeploy occurs in ECS, the original deployment can be removed from the service’s deployments array almost immediately. In this case, the deployment ID the script is polling for is no longer present in the response from aws ecs describe-services. That’s why $DEPLOYMENT ends up blank.

Would you like for me to add a debug print?

@iBotPeaches
Copy link
Member

Would you like for me to add a debug print?

I think if we mess with an internal project (template possibly). Lets re-deploy Alpha, then force a deployment in AWS to replicate the error. Once we see we are replicating the error in the polling, we can make the API call manually in CURL to get body. Can you setup the tools to run that test to get a good real sample?

@Bankamah
Copy link
Contributor Author

I can give it a shot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants