-
Notifications
You must be signed in to change notification settings - Fork 4k
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
CDK Pipelines: Circular dependency on initial CDK Deploy #18673
Comments
I downgraded my CDK version to 2.3.0 and I was able to successfully deploy the pipeline |
I can confirm the same error, in my pipelines as well, pinned aws-cdk-lib to 2.8.0 and the problem goes away. @rix0rrr , when you come are online, and if you are looking at it, i'll be online till around around 10:30 am UTC |
I got kinda a similar problem. Not sure if it relates CDK 2.8.0 const stackA = new StackA(this, "A");
const stackB = new StackB(this, "B");
stackB.addDependency(stackA); CDK Synth fails with circular dependency const stackA = new StackAthis, "A");
const stackB = new StackB(this, "B", {prop: stackA.prop);
stackB.addDependency(stackA); Not sure if this is intendend but I wouldn't see why Update: |
Uau, I am having the same problem. |
We are seeing this as well |
Also seeing this issue with existing pipelines attempting to self mutate on upgrade to 2.9.0. Will revert to 2.8.0 in our pipelines... EDIT: Pipelines reverted to 2.8.0, can confirm the issue is resolved. |
@rix0rrr when removing |
A dependency cycle was inadvertently introduced to CDK Pipelines in #18492. Fix that dependency cycle, and also one in Cognito IdentityPools. Add facilities to the `assertions` library to automatically detect this in the future, to stop errors like this from slipping in. We could make it a separate assertion method (`Template.fromStack().assertNoCycles()`), but the only thing that will do is give you an opportunity to forget to put the test in. Instead, we just check it by default for every generated template. Fixes #18673. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
im still having this issue on python a version downgrade has not resolved it. |
A dependency cycle was inadvertently introduced to CDK Pipelines in aws#18492. Fix that dependency cycle, and also one in Cognito IdentityPools. Add facilities to the `assertions` library to automatically detect this in the future, to stop errors like this from slipping in. We could make it a separate assertion method (`Template.fromStack().assertNoCycles()`), but the only thing that will do is give you an opportunity to forget to put the test in. Instead, we just check it by default for every generated template. Fixes aws#18673. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
What is the problem?
I am trying to deploy a pipeline using the aws-cdk/pipelines library and I am receiving a circular dependency error. I have no other resources in this stack other than the pipeline itself.
Reproduction Steps
Outer Stack:
Inner Stack:
What did you expect to happen?
The pipeline and CDK deploy do be successful.
What actually happened?
SplitMonitorMainStack failed: Error [ValidationError]: Circular dependency between resources: [pipelineUpdatePipelineSelfMutation14A96D2F, pipelinePipelineBuildSynthCdkBuildProject4237770A, pipelinePipelineBuildSynthCdkBuildProjectRoleDefaultPolicyB3981181, pipelineUpdatePipelineSelfMutationRoleDefaultPolicy095404B8, pipelinePipeline4163A4B1, pipelinePipelineUpdatePipelineSelfMutateCodePipelineActionRoleDefaultPolicy09E3C254, pipelinePipelineSourceIvellaSplitMonitorStackWebhookResource4158C29A, pipelinePipelineBuildSynthCodePipelineActionRoleDefaultPolicy7B8E3FCA] at Request.extractError (/opt/homebrew/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/protocol/query.js:50:29) at Request.callListeners (/opt/homebrew/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/sequential_executor.js:106:20) at Request.emit (/opt/homebrew/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/sequential_executor.js:78:10) at Request.emit (/opt/homebrew/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/request.js:686:14) at Request.transition (/opt/homebrew/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/request.js:22:10) at AcceptorStateMachine.runTo (/opt/homebrew/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/state_machine.js:14:12) at /opt/homebrew/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/state_machine.js:26:10 at Request.<anonymous> (/opt/homebrew/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/request.js:38:9) at Request.<anonymous> (/opt/homebrew/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/request.js:688:12) at Request.callListeners (/opt/homebrew/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/sequential_executor.js:116:18) { code: 'ValidationError', time: 2022-01-26T18:54:30.449Z, requestId: '913f9618-4a60-483a-b8b4-aec4be38998a', statusCode: 400, retryable: false, retryDelay: 755.4424894449671 } Circular dependency between resources: [pipelineUpdatePipelineSelfMutation14A96D2F, pipelinePipelineBuildSynthCdkBuildProject4237770A, pipelinePipelineBuildSynthCdkBuildProjectRoleDefaultPolicyB3981181, pipelineUpdatePipelineSelfMutationRoleDefaultPolicy095404B8, pipelinePipeline4163A4B1, pipelinePipelineUpdatePipelineSelfMutateCodePipelineActionRoleDefaultPolicy09E3C254, pipelinePipelineSourceIvellaSplitMonitorStackWebhookResource4158C29A, pipelinePipelineBuildSynthCodePipelineActionRoleDefaultPolicy7B8E3FC
CDK CLI Version
2.9.0
Framework Version
No response
Node.js Version
v16.13.0
OS
macOS Monterey
Language
Typescript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: