-
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
(assertions): NestedStacks inside NestedCloudAssemblys fail Template.fromStack()
#24004
Comments
Presumably the culprit is here, where no levels of nesting underneath the root are considered. |
.fromStack()
Template.fromStack()
Thanks for reporting this, I've been able to reproduce and confirm the issue. Thank you as well for the suggested change and PR, we'll try to take a look and provide feedback when possible 🙂 |
|
#25006) …emplates Templates are placed inside a path described by their closest assembly. Using this assembly lets nested stack templates resolve, regardless of their stage depth. Previously, they would fail to resolve if they were in a stage other than the app. Closes #24004. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Describe the bug
Templates aren't created for NestedStacks that reside in a Stage below the App root.
My application defines a (custom) pipeline. Each wave of my pipeline is a Stage. These stages have Stacks as deployment units, any of which can contain NestedStack constructs. When testing against the NestedStacks, all templates fail to generate, as they don't include the stage assembly inside the path.
Expected Behavior
Templates are created and can be tested against.
Current Behavior
Tests fail with "ENOENT: no such file or directory" errors, as the path is incomplete.
Reproduction Steps
I wrote this so I could run it in my Node REPL, so it uses requires.
Possible Solution
Inclusion of intermediate assemblies in the path specifying nested stacks resolves the problem, at least for single layers of nesting.
Additional Information/Context
No response
CDK CLI Version
2.40.0
Framework Version
No response
Node.js Version
16
OS
OSX
Language
Typescript
Language Version
Typescript (4.9)
Other information
No response
The text was updated successfully, but these errors were encountered: