Skip to content

fix: correct JSON field name typo "ValidationIssuses" → "ValidationIssues"#269

Open
Yanhu007 wants to merge 2 commits intoopenshift:mainfrom
Yanhu007:fix/json-typo-validation-issues
Open

fix: correct JSON field name typo "ValidationIssuses" → "ValidationIssues"#269
Yanhu007 wants to merge 2 commits intoopenshift:mainfrom
Yanhu007:fix/json-typo-validation-issues

Conversation

@Yanhu007
Copy link
Copy Markdown

@Yanhu007 Yanhu007 commented Apr 14, 2026

Fixes #268

Problem

The Summary struct has a JSON tag typo: "ValidationIssuses" (extra "s") instead of "ValidationIssues". This affects all JSON and YAML output, making it harder for downstream consumers to parse the field correctly.

Changes

  • Fixed the JSON tag in pkg/compare/output.go
  • Updated all test fixtures (golden files) to match
  • Updated documentation in docs/user-guide.md

⚠️ Breaking change: Any existing JSON parsers using the misspelled field name will need to update to the corrected spelling.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed a typo in the output reports: the summary field is now correctly named "ValidationIssues" (previously "ValidationIssuses") across JSON and YAML outputs.
  • Documentation
    • Updated example output in documentation to use the corrected "ValidationIssues" field and added a note about updating parsers.
  • Tests
    • Updated test fixtures/golden outputs to reflect the corrected field name.

…ssues"

The Summary struct JSON tag contained a typo: "ValidationIssuses"
(extra "s") instead of "ValidationIssues". This affects the JSON
output format and makes it harder for consumers to parse correctly.

Updated the struct tag, documentation, and all test fixtures.

Note: This is a breaking change for any existing JSON parsers that
use the misspelled field name.

Fixes openshift#268
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 14, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 7f811382-cb0d-4fbd-8f09-a0759337ddff

📥 Commits

Reviewing files that changed from the base of the PR and between bf1fb41 and f7a706a.

📒 Files selected for processing (1)
  • docs/user-guide.md

Walkthrough

This pull request corrects a typo in the JSON field name ValidationIssuses to the proper spelling ValidationIssues across source code, documentation, golden test files, and test fixture data.

Changes

Cohort / File(s) Summary
Source Code
pkg/compare/output.go
Fixed JSON tag for the Summary.ValidationIssues field from json:"ValidationIssuses" to json:"ValidationIssues".
Test Fixtures
addon-tools/report-creator/report/testdata/CreationOfMissingCRsAndUnmatchedCRsAndDiffTestsSuitesWhenNoDiffs, addon-tools/report-creator/report/testdata/DiffTestSuiteCreationWhenThereAreDiffs, addon-tools/report-creator/report/testdata/MissingCRstestsuitecreationwhenCRSareMissing
Updated serialized testdata JSON to use ValidationIssues instead of the misspelled ValidationIssuses.
Golden Test Files
pkg/compare/testdata/JSONOutput/localout.golden, pkg/compare/testdata/YAMLOutput/localout.golden
Updated golden outputs to reflect corrected ValidationIssues field name.
Documentation
docs/user-guide.md
Adjusted example JSON in documentation to use Summary.ValidationIssues and added a note about updating parsing of the old misspelled key.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 12
✅ Passed checks (12 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the primary change: correcting the JSON field name typo from 'ValidationIssuses' to 'ValidationIssues' in the Summary struct across the codebase.
Linked Issues check ✅ Passed All changes directly address the requirements in linked issue #268: correcting the JSON tag typo in pkg/compare/output.go and updating all test fixtures and documentation accordingly.
Out of Scope Changes check ✅ Passed All changes are scoped to fixing the JSON field typo and updating related test data and documentation. No unrelated modifications are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Stable And Deterministic Test Names ✅ Passed PR modifies only test data files and source code; no test code files (*_test.go) were modified. Repository uses standard Go testing, not Ginkgo.
Test Structure And Quality ✅ Passed This PR does not modify any Ginkgo test code. It only fixes a JSON field name typo in production code, updates test fixture files, and documentation.
Microshift Test Compatibility ✅ Passed PR does not add any new Ginkgo e2e tests; changes are limited to fixing a JSON field name typo and updating test fixtures.
Single Node Openshift (Sno) Test Compatibility ✅ Passed This PR only corrects a JSON field name typo from 'ValidationIssuses' to 'ValidationIssues' and updates corresponding test fixtures and documentation. No new Ginkgo e2e tests are added, making the SNO compatibility check not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed PR contains only a typo correction for a JSON field name in the Summary struct (ValidationIssuses → ValidationIssues) and corresponding updates to test fixtures and documentation. No scheduling constraints, deployment manifests, operator code, or controllers are introduced or modified.
Ote Binary Stdout Contract ✅ Passed This PR only modifies a JSON struct tag name and updates test data/documentation. No process-level code writes to stdout are introduced.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed This custom check applies only when new Ginkgo e2e tests are added. The PR contains only a JSON field name typo fix and documentation updates, with no new Ginkgo e2e tests introduced.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci openshift-ci Bot requested review from adhil0 and nocturnalastro April 14, 2026 01:42
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Apr 14, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign lack for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Apr 14, 2026
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Apr 14, 2026

Hi @Yanhu007. Thanks for your PR.

I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
docs/user-guide.md (1)

178-178: Add a brief migration note for the renamed JSON key.

The example is fixed, but a one-line warning nearby would make the breaking change explicit for downstream parsers expecting ValidationIssuses.

Suggested doc addition
 ## JSON
 
 Adding `-o json` to the command line produces json output that can be more
 easily parsed by other software.
+Note: `Summary.ValidationIssuses` was renamed to `Summary.ValidationIssues`.
+Consumers parsing the old key must update.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/user-guide.md` at line 178, Add a one-line migration note near the
example explaining the renamed JSON key: mention that the old key
"ValidationIssuses" was corrected to "ValidationIssues" and that downstream
parsers should update any references or mappings accordingly; place this short
warning adjacent to the example showing "ValidationIssues" and ensure it clearly
calls out the previous misspelling so consumers can handle the breaking change.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@docs/user-guide.md`:
- Line 178: Add a one-line migration note near the example explaining the
renamed JSON key: mention that the old key "ValidationIssuses" was corrected to
"ValidationIssues" and that downstream parsers should update any references or
mappings accordingly; place this short warning adjacent to the example showing
"ValidationIssues" and ensure it clearly calls out the previous misspelling so
consumers can handle the breaking change.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 4be627e4-8d5d-4d6b-8a97-2fa27588efd7

📥 Commits

Reviewing files that changed from the base of the PR and between 6fcb0e9 and bf1fb41.

📒 Files selected for processing (7)
  • addon-tools/report-creator/report/testdata/CreationOfMissingCRsAndUnmatchedCRsAndDiffTestsSuitesWhenNoDiffs
  • addon-tools/report-creator/report/testdata/DiffTestSuiteCreationWhenThereAreDiffs
  • addon-tools/report-creator/report/testdata/MissingCRstestsuitecreationwhenCRSareMissing
  • docs/user-guide.md
  • pkg/compare/output.go
  • pkg/compare/testdata/JSONOutput/localout.golden
  • pkg/compare/testdata/YAMLOutput/localout.golden

Address CodeRabbit review suggestion: add a note near the JSON
example explaining the renamed key for downstream parsers.
@lack
Copy link
Copy Markdown
Member

lack commented Apr 16, 2026

Great catch! We'll have to do some consideration about the output format change so we don't immediately break existing clients, though.

@lack
Copy link
Copy Markdown
Member

lack commented Apr 16, 2026

/ok-to-test

@openshift-ci openshift-ci Bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 16, 2026
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Apr 16, 2026

@Yanhu007: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Indicates a non-member PR verified by an org member that is safe to test.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JSON output typo: "ValidationIssuses" should be "ValidationIssues"

2 participants