Skip to content
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(core): DefaultSynthesizer deployments are never skipped #17099

Merged
merged 5 commits into from
Oct 22, 2021

Conversation

rix0rrr
Copy link
Contributor

@rix0rrr rix0rrr commented Oct 21, 2021

The DefaultSynthesizer always adds an SSM parameter with the bootstrap
stack version, so that it can check that the bootstrap stack has
a recent enough version.

Unfortunately, the CDK CLI will refuse to short-circuit any deployment
that uses SSM parameters, because it can't tell if the parameter has
changed, and so it has to pessimize.

Adding a magic marker to the description of the parameter will now
exempt it from the check.

Fixes #16959.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

The `DefaultSynthesizer` always adds an SSM parameter with the bootstrap
stack version, so that it can check that the bootstrap stack has
a recent enough version.

Unfortunately, the CDK CLI will refuse to short-circuit any deployment
that uses SSM parameters, because it can't tell if the parameter has
changed, and so it has to pessimize.

Adding a magic marker to the description of the parameter will now
exempt it from the check.

Fixes #16959.
@rix0rrr rix0rrr requested a review from a team October 21, 2021 14:56
@rix0rrr rix0rrr self-assigned this Oct 21, 2021
@gitpod-io
Copy link

gitpod-io bot commented Oct 21, 2021

@github-actions github-actions bot added the @aws-cdk/core Related to core CDK functionality label Oct 21, 2021
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Oct 21, 2021
@@ -600,7 +600,7 @@ function addBootstrapVersionRule(stack: Stack, requiredVersion: number, bootstra

const param = new CfnParameter(stack, 'BootstrapVersion', {
type: 'AWS::SSM::Parameter::Value<String>',
description: 'Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store.',
description: `Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. ${cxapi.SSMPARAM_NO_INVALIDATE}`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rix0rrr rix0rrr requested a review from a team October 22, 2021 09:40
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: f9e10b9
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit c74b012 into master Oct 22, 2021
@mergify mergify bot deleted the huijbers/skip-bootstrap-param branch October 22, 2021 09:56
@mergify
Copy link
Contributor

mergify bot commented Oct 22, 2021

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

TikiTDO pushed a commit to TikiTDO/aws-cdk that referenced this pull request Feb 21, 2022
)

The `DefaultSynthesizer` always adds an SSM parameter with the bootstrap
stack version, so that it can check that the bootstrap stack has
a recent enough version.

Unfortunately, the CDK CLI will refuse to short-circuit any deployment
that uses SSM parameters, because it can't tell if the parameter has
changed, and so it has to pessimize.

Adding a magic marker to the description of the parameter will now
exempt it from the check.

Fixes aws#16959.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/core Related to core CDK functionality contribution/core This is a PR that came from AWS.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(CLI): The DefaultStackSynthesizer executes change sets for no-op nested stacks
3 participants