Skip to content

Commit d82f214

Browse files
authored
chore(cx-api): only include v1 feature flags in the Flags with a different default in v2 section (#32766)
### Issue # (if applicable) Closes #<issue number here>. ### Reason for this change The docs listing feature flags in v1 with a different default in v2 currently includes some feature flags that were introduced in v2: https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/cx-api/FEATURE_FLAGS.md#flags-with-a-different-default-in-v2 . ### Description of changes Update the filter to check if the feature flag was introduced in v1 to avoid accidentally including v2 feature flags with default `true`. ### Describe any new or updated permissions being added N/A ### Description of how you validated changes ran `yarn build` to update `FEATURE_FLAGS.md` ### 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*
1 parent c393481 commit d82f214

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

packages/aws-cdk-lib/cx-api/FEATURE_FLAGS.md

+1-4
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,7 @@ Here is an example of a `cdk.json` file that restores v1 behavior for these flag
219219
"@aws-cdk/aws-rds:lowercaseDbIdentifier": false,
220220
"@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId": false,
221221
"@aws-cdk/aws-lambda:recognizeVersionProps": false,
222-
"@aws-cdk/aws-cloudfront:defaultSecurityPolicyTLSv1.2_2021": false,
223-
"@aws-cdk/pipelines:reduceAssetRoleTrustScope": false,
224-
"@aws-cdk/aws-stepfunctions-tasks:useNewS3UriParametersForBedrockInvokeModelTask": false,
225-
"@aws-cdk/core:aspectStabilization": false
222+
"@aws-cdk/aws-cloudfront:defaultSecurityPolicyTLSv1.2_2021": false
226223
}
227224
}
228225
```

packages/aws-cdk-lib/cx-api/build-tools/flag-report.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ function changedFlags() {
6565
}
6666

6767
function migrateJson() {
68-
const changedInV2 = flags(flag => !!flag.defaults?.v2 && !!flag.introducedIn.v2);
68+
const changedInV2 = flags(flag => !!flag.defaults?.v2 && !!flag.introducedIn.v2 && !!flag.introducedIn.v1);
6969

7070
const context = Object.fromEntries(changedInV2.map(([name, _]) => [name, false]));
7171

0 commit comments

Comments
 (0)