-
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
feat: future flags 'core:enableStackNameDuplicates', 'aws-secretsmanager:parseOwnedSecretName' and 'aws-kms:defaultKeyPolicies' are no longer supported #12644
Conversation
Title does not follow the guidelines of Conventional Commits. Please adjust title before merge. |
…ags (#12645) CDKv1 introduced feature flags that allowed users to opt-in to new backwards-incompatible behaviour. There are two types of flags - one set that need to be entirely removed in CDKv2 and their 'enabled' behaviour made the default, and another set where the the new behaviour should be made the default, and allow users to explicitly opt-out. This change addresses the testing strategy for the former set (and not the latter). There exist unit tests that test the behaviour both when the feature flags are enabled and feature flags and disabled. However, in v2, the feature flags will be removed and its usage blocked. The default behaviour will be as if the feature flag is enabled. Introduce branching logic that treats these unit tests depending on whether it's executed in the context of CDKv1 or CDKv2. The logic is as follows: - In the context of v1, all tests will execute as normal. - In the context of v2, tests that rely on feature flag to be unset will not be executed. - In the context of v2, tests that rely on feature flag to be set will not configure the feature flag on the App's context and continue to execute the test. This logic has been captured at a single location in two methods - `testFeatureFlag()` and `testFeatureFlagDisabled()`. To validate this logic, the unit tests that rely on the feature flags `aws-kms:defaultKeyPolicies`, `aws-secretsmanager:parseOwnedSecretName` and `core:enableStackNameDuplicates` have been updated to use these methods. Forward looking: The final PR in v2 is expected to look like this - #12644 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…ags (aws#12645) CDKv1 introduced feature flags that allowed users to opt-in to new backwards-incompatible behaviour. There are two types of flags - one set that need to be entirely removed in CDKv2 and their 'enabled' behaviour made the default, and another set where the the new behaviour should be made the default, and allow users to explicitly opt-out. This change addresses the testing strategy for the former set (and not the latter). There exist unit tests that test the behaviour both when the feature flags are enabled and feature flags and disabled. However, in v2, the feature flags will be removed and its usage blocked. The default behaviour will be as if the feature flag is enabled. Introduce branching logic that treats these unit tests depending on whether it's executed in the context of CDKv1 or CDKv2. The logic is as follows: - In the context of v1, all tests will execute as normal. - In the context of v2, tests that rely on feature flag to be unset will not be executed. - In the context of v2, tests that rely on feature flag to be set will not configure the feature flag on the App's context and continue to execute the test. This logic has been captured at a single location in two methods - `testFeatureFlag()` and `testFeatureFlagDisabled()`. To validate this logic, the unit tests that rely on the feature flags `aws-kms:defaultKeyPolicies`, `aws-secretsmanager:parseOwnedSecretName` and `core:enableStackNameDuplicates` have been updated to use these methods. Forward looking: The final PR in v2 is expected to look like this - aws#12644 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
17d1e7e
to
26eb2c3
Compare
bbde447
to
6ed820c
Compare
6ed820c
to
f96aa4a
Compare
1703d8c
to
aa79d42
Compare
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). |
The following feature flags have been marked as expired -
These flags will be unavailable in CDKv2 and setting this flag in the context
will result in an error.
Most of the changes here are related to the feature flag
'@aws-cdk/aws-kms:defaultKeyPolicies' which changes the KMS
permissions. Since KMS is a fundamental AWS service, used by almost all
downstream services, there is a significant change to all snapshots.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license