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

Circular dependency between resources: potential issue with resourceConcurrency and stackConcurrency #215

Open
turakvlad opened this issue Mar 27, 2024 · 0 comments

Comments

@turakvlad
Copy link

turakvlad commented Mar 27, 2024

We have the same issue as described in #122 and #188. The latest issue has been closed. That's why I decided to create a new issue.

If we have resourceConcurrency in our config, it does not allow us to deploy the stack for the first time (completely new deployment from scratch).

On the other hand, stackConcurrency works for the first deployment but does not work for subsequent ones.

To better show these issues, please take a look at the cases below.

The config below is not working if we want to deploy the stack for the first time:

  splitStacks:
    perFunction: true
    perType: false
    perGroupFunction: false
    stackConcurrency: 5
    resourceConcurrency: 10

We have this error:

Circular dependency between resources: [DisconnectIdpIamRoleLambdaExecution, DisconnectIdpLambdaFunction, ApiGatewayMethodUsersDisconnectDashidpOptions, ApiGatewayResourceUsersDisconnectDashidp, ApiGatewayMethodUsersDisconnectDashidpPost, DisconnectIdpLambdaPermissionApiGateway..., ].

Removing resourceConcurrency from the config above makes deploying the stack for the first time possible.

  splitStacks:
    perFunction: true
    perType: false
    perGroupFunction: false
    stackConcurrency: 5

However, the above config is not working for subsequent deployments. We have the same error as we have when trying to deploy the stack for the first time with resourceConcurrency set.

The CloudFormation template is invalid: Circular dependency between resources: [UpdateEmailTemplateNestedStack, CustomMessageNestedStack, SetDefaultEmailTemplateNestedStack, UpdateGroupNestedStack, ...].

It looks like resourceConcurrency creates some circular dependencies between resources and stackConcurrency does the same but between nested stacks (if that makes sense?).

Is there any way to handle this issue? Currently, we removed both options and left only:

  splitStacks:
    perFunction: true
    perType: false
    perGroupFunction: false

However, I am afraid that we will hit API rate limit errors in the nearest feature and the problem will arise again.

Thank you for any tips in advance! 🙏

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

No branches or pull requests

1 participant