Skip to content

Conversation

@vivian12300
Copy link
Contributor

Allows users to run cdk flags --safe to set all unconfigured feature flags to their recommended states without changing their CloudFormation template.


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

@aws-cdk-automation aws-cdk-automation requested a review from a team August 14, 2025 04:05
@github-actions github-actions bot added the p2 label Aug 14, 2025
@codecov-commenter
Copy link

codecov-commenter commented Aug 14, 2025

Codecov Report

❌ Patch coverage is 89.18239% with 86 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.09%. Comparing base (a9c59b7) to head (4913f0b).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
packages/aws-cdk/lib/commands/flags/validator.ts 57.00% 33 Missing and 10 partials ⚠️
packages/aws-cdk/lib/commands/flags/operations.ts 92.19% 37 Missing and 1 partial ⚠️
packages/aws-cdk/lib/cli/cli.ts 33.33% 2 Missing ⚠️
.../aws-cdk/lib/commands/flags/interactive-handler.ts 97.61% 2 Missing ⚠️
packages/aws-cdk/lib/commands/flags/router.ts 98.48% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #798      +/-   ##
==========================================
- Coverage   83.64%   82.09%   -1.56%     
==========================================
  Files          65       71       +6     
  Lines        9558    10350     +792     
  Branches     1137     1272     +135     
==========================================
+ Hits         7995     8497     +502     
- Misses       1538     1811     +273     
- Partials       25       42      +17     
Flag Coverage Δ
suite.unit 82.09% <89.18%> (-1.56%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

const unconfiguredFlags = flagData.filter(flag =>
flag.userValue === undefined &&
isBooleanFlag(flag) &&
(flag.unconfiguredBehavesLike?.v2 !== flag.recommendedValue),
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
(flag.unconfiguredBehavesLike?.v2 !== flag.recommendedValue),
((flag.unconfiguredBehavesLike?.v2 ?? false) !== flag.recommendedValue),

All the more reason to get this from a single place.

@vivian12300 vivian12300 marked this pull request as ready for review August 15, 2025 03:55
@mrgrain mrgrain changed the title feat: allow users to enable all feature flags that do not impact their application feat(cli): allow users to enable all feature flags that do not impact their application Sep 19, 2025
@rix0rrr rix0rrr added this pull request to the merge queue Oct 6, 2025
Merged via the queue into aws:main with commit 05954dd Oct 6, 2025
32 of 33 checks passed
iankhou pushed a commit that referenced this pull request Oct 7, 2025
… their application (#798)

Allows users to run `cdk flags --safe` to set all unconfigured feature
flags to their recommended states without changing their CloudFormation
template.

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

---------

Co-authored-by: Rico Huijbers <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants