Skip to content

fix: validation report handling is inconsistent#1650

Merged
aws-cdk-automation merged 18 commits into
mainfrom
huijbers/cli-reports
Jun 19, 2026
Merged

fix: validation report handling is inconsistent#1650
aws-cdk-automation merged 18 commits into
mainfrom
huijbers/cli-reports

Conversation

@rix0rrr

@rix0rrr rix0rrr commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Validation report handling used to depend on a lot of factors:

  • Whether the CDK app had a feature flag set to include annotations into the validation report or not.
  • Whether the command was cdk validate or a different command.

The main goal of this PR is to unify the code paths: all validation problems reported via either the annotations or via the validation report file are call combined into a single report that is always printed the same.

Mechanically, the CLI will add the annotations to the report if the CDK app hasn't already done so, then always print the validation report (instead of annotations) during app synth validation.

Also has the following changes:

  • Synthesize with debugging enabled for cdk validate.
  • Always tell the app that the CLI will handle the validation report (so the app doesn't need to print and exit).
  • Make the same changes to the report formatter as we did in fix: print validation errors according to new style aws-cdk#38166.
  • Stop populating the title field of the validation report. It's always Validation Report, and there's no useful other value to put into it anyway.

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

Validation report handling used to depend on a lot of factors:

- Whether the CDK app had a feature flag set to include annotations
  into the validation report or not.
- Whether the command was `cdk validate` or a different command.

The main goal of this PR is to unify the code paths: all validation
problems reported via either the annotations or via the validation report
file are call combined into a single report that is always printed the same.

Mechanically, the CLI will add the annotations to the report if the CDK
app hasn't already done so, then always print the validation report (instead
of annotations) during app synth validation.

Also has the following changes:

- Synthesize with debugging enabled for `cdk validate`.
- Always tell the app that the CLI will handle the validation report (so
  the app doesn't need to print and exit).
- Make the same changes to the report formatter as we did in
  aws/aws-cdk#38166.
@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails
npm/@aws-cdk/cx-api 2.260.0 🟢 5.9
Details
CheckScoreReason
Maintained🟢 1030 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Code-Review🟢 10all changesets reviewed
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow⚠️ 0dangerous workflow patterns detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Pinned-Dependencies⚠️ -1internal error: internal error: invalid Dockerfile
License🟢 10license file detected
Signed-Releases🟢 85 out of the last 5 releases have a total of 5 signed artifacts.
Branch-Protection🟢 8branch protection is not maximal on development and all release branches
Security-Policy🟢 10security policy file detected
Binary-Artifacts⚠️ 0binaries present in source code
SAST🟢 9SAST tool detected but not run on all commits
Fuzzing🟢 10project is fuzzed

Scanned Files

  • yarn.lock

@codecov-commenter

codecov-commenter commented Jun 19, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.50000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.80%. Comparing base (b516d60) to head (a3fb8d8).

Files with missing lines Patch % Lines
packages/aws-cdk/lib/cli/cdk-toolkit.ts 72.72% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1650      +/-   ##
==========================================
+ Coverage   88.73%   88.80%   +0.06%     
==========================================
  Files          77       77              
  Lines       11365    11354      -11     
  Branches     1588     1584       -4     
==========================================
- Hits        10085    10083       -2     
+ Misses       1250     1241       -9     
  Partials       30       30              
Flag Coverage Δ
suite.unit 88.80% <87.50%> (+0.06%) ⬆️

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

☔ View full report in Codecov by Harness.
📢 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.

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.

4 participants