-
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(pipelines): self-mutate always adds analytics #19010
Conversation
When we moved analytics generation from the CLI to the framework, we kept a fallback in the CLI for backwards compatibility: if there were no analytics in the templates but analytics were requested, they would still be added in the CLI. This breaks in the case of CDK Pipelines self-mutate step, if analytics have been disabled: there are no analytics in the template, and the default setting for analytics is `true`, since there is no `cdk.json` to opt out, so they will always be added back in. A better solution to check whether the CLI needs to do the fallback is to go off of the cx schema version number: the CLI can know that it never needs to do anything for cloud assemblies generated starting at a certain version. Fixes #18933.
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). |
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 master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
When we moved analytics generation from the CLI to the framework, we kept a fallback in the CLI for backwards compatibility: if there were no analytics in the templates but analytics were requested, they would still be added in the CLI. This breaks in the case of CDK Pipelines self-mutate step, if analytics have been disabled: there are no analytics in the template, and the default setting for analytics is `true`, since there is no `cdk.json` to opt out, so they will always be added back in. A better solution to check whether the CLI needs to do the fallback is to go off of the cx schema version number: the CLI can know that it never needs to do anything for cloud assemblies generated starting at a certain version. Fixes aws#18933. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
… v1 apps (#32710) ### Reason for this change In the first versions of AWS CDK v1 and older, version metadata was injected by the CLI not by the framework. This changed with the introduction of Cloud Assembly Schema v6.0.0 in AWS CDK v1.65.0 (see [changelog](https://github.com/aws/aws-cdk/releases/tag/v1.65.0)). The CLI kept compatibility code around to ensure the metadata is injected. This code was introduced via #19010 on Feb 17, 2022. However this code was intended for v1 and kept around because v1 and v2 were initially developed on the same code base. In the meantime, AWS CDK v1 is EOS and we do not need to support v1 features from v2 anymore. This change will mean that we will stop reporting metadata for users that use the CLI v2 `>= 2.174.0` (the release removing the compat code) to deploy a Cloud Assembly developed with framework v1 `< 1.65.0`. Otherwise these users are not functionally effected by the change. We therefore decide to now remove the unused compat code. ### Description of changes Remove the unused legacy code and adjusted test cases. ### Describe any new or updated permissions being added n/a ### Description of how you validated changes Run unit test and CLI integ tests. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
… v1 apps (#32710) ### Reason for this change In the first versions of AWS CDK v1 and older, version metadata was injected by the CLI not by the framework. This changed with the introduction of Cloud Assembly Schema v6.0.0 in AWS CDK v1.65.0 (see [changelog](https://github.com/aws/aws-cdk/releases/tag/v1.65.0)). The CLI kept compatibility code around to ensure the metadata is injected. This code was introduced via #19010 on Feb 17, 2022. However this code was intended for v1 and kept around because v1 and v2 were initially developed on the same code base. In the meantime, AWS CDK v1 is EOS and we do not need to support v1 features from v2 anymore. This change will mean that we will stop reporting metadata for users that use the CLI v2 `>= 2.174.0` (the release removing the compat code) to deploy a Cloud Assembly developed with framework v1 `< 1.65.0`. Otherwise these users are not functionally effected by the change. We therefore decide to now remove the unused compat code. ### Description of changes Remove the unused legacy code and adjusted test cases. ### Describe any new or updated permissions being added n/a ### Description of how you validated changes Run unit test and CLI integ tests. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
When we moved analytics generation from the CLI to the framework, we
kept a fallback in the CLI for backwards compatibility: if there were no
analytics in the templates but analytics were requested, they would
still be added in the CLI.
This breaks in the case of CDK Pipelines self-mutate step, if analytics
have been disabled: there are no analytics in the template, and the
default setting for analytics is
true
, since there is nocdk.json
to opt out, so they will always be added back in.
A better solution to check whether the CLI needs to do the fallback
is to go off of the cx schema version number: the CLI can know that
it never needs to do anything for cloud assemblies generated starting
at a certain version.
Fixes #18933.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license