-
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
fix(cx-api): bootstrap stack is validated even if the custom synthesizer does not require it #21518
Conversation
Hey @huyphan Could you share your reasoning why you've chosen Option 1 over Option 2 (as per the issue)?
|
Changing Given that, and since we are the only users of this code anyway, I'm okay with this change. It will break ~ 0 people. (Watch me regret that stance as this change will bring customers out of the woodwork who this breaks 😅) The only real alternative is |
…zer does not require it
Even if there's anyone affected by this breaking change, the impact is negligible -- instead of failing early, the CLI will fail a bit later when it tries to make use of the resources in the bootstrap stack (e.g. uploading assets to the S3 bucket or the ECR repository). But all of that happened before a stack deployment, so it wouldn't affect a service stack. Also, that scenario only happens when the user (1) uses a custom synthesizer which (2) makes use of the new-style bootstrap stack but (3) does not explicit specify that it needs a new-style bootstrap stack. This is a wrong logic anyway. |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
…zer does not require it (aws#21518) This fixes aws#21324 The property `requiresBootstrapStackVersion` of the class `AssetManifestArtifact` is a [required property of type number](https://github.com/aws/aws-cdk/blob/34e31b90c8cdd51b8af61f352aa0ab7a0332ed4c/packages/%40aws-cdk/cx-api/lib/artifacts/asset-manifest-artifact.ts#L38-L41) that is [defaulted to `1`]((https://github.com/aws/aws-cdk/blob/34e31b90c8cdd51b8af61f352aa0ab7a0332ed4c/packages/%40aws-cdk/cx-api/lib/artifacts/asset-manifest-artifact.ts#L58)). This behavior prevents the custom synthesizers from disabling the validation of the bootstrap stack when it knows that it does not need this stack. This change allows the property to be `undefined`, removes the behaviour of defaulting it to `1`, and adds a breaking unit test. ---- ### All Submissions: * [X] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/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/main/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*
…zer does not require it (aws#21518) This fixes aws#21324 The property `requiresBootstrapStackVersion` of the class `AssetManifestArtifact` is a [required property of type number](https://github.com/aws/aws-cdk/blob/34e31b90c8cdd51b8af61f352aa0ab7a0332ed4c/packages/%40aws-cdk/cx-api/lib/artifacts/asset-manifest-artifact.ts#L38-L41) that is [defaulted to `1`]((https://github.com/aws/aws-cdk/blob/34e31b90c8cdd51b8af61f352aa0ab7a0332ed4c/packages/%40aws-cdk/cx-api/lib/artifacts/asset-manifest-artifact.ts#L58)). This behavior prevents the custom synthesizers from disabling the validation of the bootstrap stack when it knows that it does not need this stack. This change allows the property to be `undefined`, removes the behaviour of defaulting it to `1`, and adds a breaking unit test. ---- ### All Submissions: * [X] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/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/main/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*
This fixes #21324
The property
requiresBootstrapStackVersion
of the classAssetManifestArtifact
is a required property of type number that is defaulted to1
. This behavior prevents the custom synthesizers from disabling the validation of the bootstrap stack when it knows that it does not need this stack.This change allows the property to be
undefined
, removes the behaviour of defaulting it to1
, and adds a breaking unit test.All Submissions:
Adding new Unconventional Dependencies:
New Features
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