[core] SynthUtils.toCloudFormation(stack) fails on stacks defined in external project #10671
Labels
@aws-cdk/core
Related to core CDK functionality
bug
This issue is a bug.
effort/small
Small work item – less than a day of effort
needs-triage
This issue or PR still needs to be triaged.
p1
SynthUtils.toCloudFormation(stack)
fails withUnable to find artifact with id
whenstack
is defined in an external project.Reproduction Steps
I've created an example to reproduces the error here: https://github.com/gwriss/instanceof-stack-bug
What did you expect to happen?
SynthUtils.toCloudFormation(stack)
should spit out a CF stackWhat actually happened?
SynthUtils.toCloudFormation(stack)
fails withUnable to find artifact with id "MyTestStack291FA567"
All our stack-tests fails after upgrade from 1.54.0 -> 1.65.0 (we have snapshot tests on all external stacks using
toCloudFormation
)Environment
Other
It seems to be related to #1249 where
instanceof Stack
does not work as expected and should be replaced withisStack(stack)
It used to work in CDK 1.54.0 (there is a branch in my test-repo where the test runs successfully on 1.54.0)
A search for the
instanceof Stack
in the repo shows another occurrence. Maybe it would be beneficial to fix that too?This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: