Commit 60e5bbd
committed
fix(core): use node.path in skip bundling check for consistency with CLI
The pattern given to aws-cdk on the CLI is matched against
`hierarchicalId` (i.e. displayName, node.path) [1] [2] [3].
The same pattern is given to the CDK app but was 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 use
the same value (node.path/hierarchicalId/displayName) as aws-cdk when
deciding whether to bundle an asset.
fixes #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#L661 parent bf35048 commit 60e5bbd
2 files changed
+42
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1168 | 1168 | | |
1169 | 1169 | | |
1170 | 1170 | | |
1171 | | - | |
| 1171 | + | |
1172 | 1172 | | |
1173 | | - | |
1174 | | - | |
| 1173 | + | |
| 1174 | + | |
1175 | 1175 | | |
1176 | 1176 | | |
1177 | 1177 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
844 | 844 | | |
845 | 845 | | |
846 | 846 | | |
847 | | - | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
848 | 886 | | |
849 | 887 | | |
850 | 888 | | |
| |||
0 commit comments