Skip to content

Conversation

@iankhou
Copy link
Contributor

@iankhou iankhou commented Sep 6, 2025

Fixes #834

Description

DX improvement.

Previously, when the user ran cdk flags but already had all recommended flags configured, an empty table was displayed.
Screenshot 2025-09-03 at 12 01 43
No context here, what does the table mean?

In this change, we added a message to inform the user why they are seeing an empty table. We still print the table to maintain API consistency.
Screenshot 2025-09-05 at 21 16 11
Now the user knows why the table is empty, and is given guidance to display all flags

Testing

Added unit tests for positive and negative cases.


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 6, 2025
@iankhou iankhou added the bug label Sep 6, 2025
@aws-cdk-automation aws-cdk-automation requested a review from a team September 6, 2025 04:36
@github-actions github-actions bot added the p2 label Sep 6, 2025
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.94%. Comparing base (aef751e) to head (8cfed80).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #836      +/-   ##
==========================================
- Coverage   83.68%   82.94%   -0.74%     
==========================================
  Files          65       65              
  Lines        9547     9554       +7     
  Branches     1137     1122      -15     
==========================================
- Hits         7989     7925      -64     
- Misses       1535     1607      +72     
+ Partials       23       22       -1     
Flag Coverage Δ
suite.unit 82.94% <100.00%> (-0.74%) ⬇️

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 8, 2025
Merged via the queue into main with commit 4d555c9 Sep 8, 2025
43 checks passed
@aws-cdk-automation aws-cdk-automation deleted the iankhou-flags-empty-table branch September 8, 2025 07:59
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: cdk flags outputs empty table when recommended flags are already set

4 participants