Skip to content

Conversation

@iankhou
Copy link
Contributor

@iankhou iankhou commented Sep 3, 2025

Fixes #832

Currently, running cdk flags --set or cdk flags --set --recommended is a no-op. Either the --all or --unconfigured options should be passed alongside --set. This can be attributed to insufficient testing during development of the feature.

Changes:

  • Added validation to fix the problem above
  • Brought flag-operations.ts to 100% unit test line coverage (previously 92%)
Screenshot 2025-09-03 at 12 41 21

Validated with unit tests and manual testing.


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

@iankhou iankhou self-assigned this Sep 3, 2025
@iankhou iankhou added the bug label Sep 3, 2025
@github-actions github-actions bot added the p2 label Sep 3, 2025
@aws-cdk-automation aws-cdk-automation requested a review from a team September 3, 2025 16:42
@iankhou iankhou changed the title fix(flags): running cdk flags --set without additional options should fail fix(cli): cdk flags --set without additional options should fail Sep 3, 2025
Signed-off-by: github-actions <[email protected]>
@codecov-commenter
Copy link

codecov-commenter commented Sep 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.67%. Comparing base (e7ea9d5) to head (55a7567).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #833      +/-   ##
==========================================
+ Coverage   83.05%   83.67%   +0.61%     
==========================================
  Files          65       65              
  Lines        9509     9514       +5     
  Branches     1122     1136      +14     
==========================================
+ Hits         7898     7961      +63     
+ Misses       1577     1529      -48     
+ Partials       34       24      -10     
Flag Coverage Δ
suite.unit 83.67% <100.00%> (+0.61%) ⬆️

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.

@aws-cdk-automation aws-cdk-automation added this pull request to the merge queue Sep 3, 2025
Merged via the queue into main with commit a890d3f Sep 3, 2025
28 checks passed
@aws-cdk-automation aws-cdk-automation deleted the iankhou-flags-fix branch September 3, 2025 17:34
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.

fix(flags): running cdk flags --set without additional options should fail

4 participants