-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
aws-s3-assets : Upgrading from LegacyStackSynthesizer to DefaultStackSynthesizer with cross-stack reference causes UpdateFailed #23879
Comments
Hi @robertluttrell , Thanks for reaching out. I tried to reproduce the issue as stated but it succeeded when switching from LegalStackSynthesizer to DefaultStackSynthesizer. Could you please share the code for repro? Thanks |
Hi @khushail, thanks for your response. I'm not sure I understand - did the code I included not reproduce this issue for you? I was able to reproduce it across several different environments. I wasn't totally clear in the way I structured the code in the repro steps - I broke out just the sample of code that should change between deployments, but that may have added to the confusion. Here are the steps a little more clearly:
Are you able to reproduce with these steps? Thanks |
Thanks @robertluttrell for sharing and explaining the code steps. I was able to reproduce the issue. I have marked this issue as p2, which means that we are unable to work on this immediately. |
Describe the bug
When upgrading from the
LegacyStackSynthesizer
to theDefaultStackSynthesizer
, cross-stack asset dependencies cause deployment to fail with the following exception:Export ProducingStack:ExportsOutputRefAssetParameters6547f4c9757e3c9a9d37d7a5d75004ce634cb9b01af7a7606412c36b947f248fS3BucketA01FB337B366B8FA cannot be deleted as it is in use by ConsumingStack
The issue of redeployment failing after removing generic cross-stack dependencies is described in #3414. In this specific case, CDK's legacy synthesizer creates an
AssetParameters
export in the producing stack so that it can be used in the consuming stack. However, theDefaultStackSynthesizer
does not create this export. The result is that when upgrading from theDefaultStackSynthesizer
to theLegacyStackSynthesizer
, the deployment fails because the producing stack's export cannot be deleted while referenced by the consuming stack.Expected Behavior
Deployment succeeds when updating an app with cross-stack asset dependencies from the
LegacyStackSynthesizer
to theDefaultStackSynthesizer
.Current Behavior
Deployment fails to update the producing stack
Reproduction Steps
Define stack classes as follows:
Deploy with stacks defined using
LegacyStackSynthesizer
:Deploy with stacks defined without synthesizer specified, defaulting to
DefaultStackSynthesizer
:Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.61.0
Framework Version
No response
Node.js Version
v19.4.0
OS
Same behavior on MacOS and AL2
Language
Python
Language Version
3.10.9
Other information
No response
The text was updated successfully, but these errors were encountered: