Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core): use node.path in skip bundling check for consistency with …
…cdk deploy CLI (aws#19950) The pattern given to aws-cdk on the CLI (`cdk deploy $pattern`) is matched against `stack.hierarchicalId` (i.e. displayName, node.path) [1] [2] [3]. The same pattern is given to the CDK app (as `bundlingStacks`) but is matching against `stackName`, causing potential for bundling to be skipped under certain scenarios (i.e. using --exclusively with custom stack names). To make them consistent, the skip bundling check has been changed to match against the same value as `cdk deploy $pattern` (node.path/hierarchicalId/displayName) when deciding whether to bundle an asset. Making them consistent ensures necessary stacks are bundled, avoiding the issue of uploading the entire project directory since the asset wasn't bundled. fixes aws#19927 [1] https://github.com/aws/aws-cdk/blob/1d0270446b3effa6b8518de3c7d76f0c14e626c5/packages/aws-cdk/lib/api/cxapp/cloud-assembly.ts#L138 [2] https://github.com/aws/aws-cdk/blob/6cca62db88866479f2b1d4f52b30beab3d78aeb2/packages/@aws-cdk/cx-api/lib/cloud-artifact.ts#L143-L145 [3] https://github.com/aws/aws-cdk/blob/6cca62db88866479f2b1d4f52b30beab3d78aeb2/packages/@aws-cdk/core/lib/stack-synthesizers/_shared.ts#L66 ---- ### All Submissions: * [ ] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information