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 ECSService sometimes failing to create #796

Merged
merged 2 commits into from
Sep 7, 2023

Conversation

davidsiaw
Copy link
Contributor

@davidsiaw davidsiaw commented Aug 31, 2023

ECSService sometimes fails to create when a reviewapp is being deployed. This creates a lot of headaches because barcelona does not return an error when the deploy is requested and it takes inspecting cloudformation to check what is happening.

This is primarily caused by https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-service.html#aws-resource-ecs-service--examples (in the Associate an Application Load Balancer with a service section). In CF the parallel resource creation creates a race condition for the preparation of the Listener

However in our stack, the listener already exists. The difference here is that the Listener rules have not been created yet, and that causes the issue.

The fix here is to force the ECSService to depend on the creation of listener rules.

@degikko
Copy link

degikko commented Aug 31, 2023

@essa can you help us review this PR, please?

@degikko degikko requested a review from essa August 31, 2023 06:59
@davidsiaw davidsiaw changed the title Fix ECSService sometimes failing Fix ECSService sometimes failing to create Aug 31, 2023
Copy link
Contributor

@essa essa left a comment

Choose a reason for hiding this comment

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

@davidsiaw
LGTM 👍

@davidsiaw davidsiaw merged commit e630f08 into master Sep 7, 2023
6 checks passed
@davidsiaw davidsiaw deleted the ordered-ecs-service-build branch September 7, 2023 07:51
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.

3 participants