Skip to content

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.

@iBotPeaches iBotPeaches requested a review from jweberst July 9, 2025 20:03
@iBotPeaches iBotPeaches merged commit 3985404 into master Jul 9, 2025
1 check passed
@iBotPeaches iBotPeaches deleted the graceful-ecs-deployment-replacement branch July 9, 2025 20:07
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.

4 participants