-
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
(aws_servicecatalog): nested stack in product stack failed in cdk synth
#24317
Comments
This fails as well using For example, using a ProductStack using Assets:
and consuming it in a Stack:
in all above variations mentioned throws the similar Error. |
Yes I can reproduce this error but no idea off the top of my head. Making this a p1 bug for now. |
Hi is there any update on this please? I’m seeing the same issue. It looks like the *.nested.template.json or tree.json or manifest.json or asset.json files are not generated & added to the cdk.out folder. It looks like the “asset.{guid}” folders & zips are present. |
Hi all. I am working on reproducing the issue locally to determine if this bug encompasses all asset generation when using |
I reproduced the problem locally and determined that the ProductStack stack synthesizer implementation does not add a file asset to the manifest for NestedStacks in the same way that the DefaultStackSynthesizer does. Rather, the ProductStackSynthesizer takes an existing asset's path (such as a Lambda's source code file in a working directory) and tells CDK to synth a bucket deployment to publish that existing asset to a S3 Bucket (here). This seems like an edge-case that was missed during the implementation of file asset support in the SC ProductStack CDK construct which unit tests could have caught after designing a test plan. I think a potential solution is to replicate the behavior of asset file generation from the DefaultStackSynthesizer into the ProductStack synthesizer's implementation of addFileAsset(). At this time, the Service Catalog team does not plan to prioritize this bug fix. Is there curiosity from other engineers who are willing to pick up the implementation of this solution? |
This PR fixes a bug that prevented a nested stack from being used within a product stack. The logic in the `addFileAsset` method as part of the `ProductStackSynthesizer` was updated to forward all assets to the parent stack and uses the `FileAssetLocation` returned from the parent stack synthesizer to create a bucket `Source` from the `bucketName` and `objectKey`. Closes #24317 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
This PR fixes a bug that prevented a nested stack from being used within a product stack. The logic in the `addFileAsset` method as part of the `ProductStackSynthesizer` was updated to forward all assets to the parent stack and uses the `FileAssetLocation` returned from the parent stack synthesizer to create a bucket `Source` from the `bucketName` and `objectKey`. Closes aws#24317 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Describe the bug
When nested stack in product stack for AWS Service Catalog,
Cannot find asset
error for nested stack's template file occurs incdk synth
.Expected Behavior
cdk synth
should generate nested stack's template in product stack.Current Behavior
Reproduction Steps
1. Use case:
If you want to write your product stack in CDK and use nested stack for better modularity.
2. Code Replication:
Possible Solution
Create asset for nested stack's template in product stack.
Additional Information/Context
No response
CDK CLI Version
2.66.0 (build c96c17d)
Framework Version
No response
Node.js Version
v18.7.0
OS
macOS Ventura 13.2.1
Language
Typescript
Language Version
Version 4.9.5
Other information
No response
The text was updated successfully, but these errors were encountered: