fix: validation report handling is inconsistent#1650
Merged
Conversation
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.
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Files
|
Codecov Report❌ Patch coverage is
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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
kaizencc
approved these changes
Jun 19, 2026
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Validation report handling used to depend on a lot of factors:
cdk validateor 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:
cdk validate.titlefield of the validation report. It's alwaysValidation 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