[pipelines] 1.67.0 breaks custom asset bundling when using multiple pipelines
See original GitHub issueAfter updating to CDK 1.67.0, my custom asset bundling logic no longer works while using multiple pipelines. This bundling logic uses the BundlingOptions
construct to move the lambda function handler to a nested folder structure. When executing cdk synth
on the new CDK version, only the first pipeline defined in app.py
uses the bundling logic, and the other copies the code from the path without modifying it.
If I revert back to 1.66.0 I no longer see this behavior, with no other code changes. Both pipelines produce the correct artifacts using the older CDK version.
Reproduction Steps
I have stripped down my code to provide a minimal example, and have posted it here.
Running cdk synth
against this code produces 2 assemblies in cdk.out
, where each assembly has an asset representing the lambda function. The cdk synth
output can also be seen by running the pipeline on AWS, although it is easier to test locally.
What did you expect to happen?
I expected both assets in the cdk.out
directory to contain the bundled directory structures.
Both assets should contain a directory structure that looks like the following:
asset.1234
- entry.py
- lib
- function
- function.py
What actually happened?
Only the first pipeline declared in app.py
has the bundled directory structure.
The second asset is bundled using the default settings, which ignore the custom bundling logic.
asset.1234
- function.py
Environment
- CLI Version : 1.67.0 (build 2b4dd71)
- Framework Version: 1.67.0
- Node.js Version: v12.18.4
- OS : WSL2 in Windows 10 (same behavior occurs in CodeBuild)
- Language (Version): Python 3.8
This is 🐛 Bug Report
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (11 by maintainers)
Top GitHub Comments
In fact, the code should properly throw if bundling is used and we have a cache hit and we cannot find the already staged asset.
⚠️COMMENT VISIBILITY WARNING⚠️
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.