Skip to content

Fix typos and remove literal quotes in error messages#276

Open
sebrandon1 wants to merge 1 commit into
openshift:mainfrom
sebrandon1:fix/error-message-typos-and-quotes
Open

Fix typos and remove literal quotes in error messages#276
sebrandon1 wants to merge 1 commit into
openshift:mainfrom
sebrandon1:fix/error-message-typos-and-quotes

Conversation

@sebrandon1
Copy link
Copy Markdown
Member

@sebrandon1 sebrandon1 commented May 11, 2026

Summary

  • Fix spelling errors in error strings: "occurered" → "occurred", "acces" → "access" (×3), "entires" → "entries"
  • Remove unnecessary escaped literal quotes from noRefFileWasPassed and refFileNotExistsError error constants that were appearing in user-facing output
  • Update 4 golden test files to match corrected strings

Jira: https://redhat.atlassian.net/browse/CNF-23706

Summary by CodeRabbit

  • Bug Fixes

    • Corrected spelling and punctuation in multiple error messages presented by compare operations.
    • Improved clarity of inline-diff and template access error messages so missing template values are reported more explicitly.
    • Ensured missing reference-config errors are displayed without extra quoting.
  • Tests

    • Updated test golden outputs to match the corrected error messages.

@openshift-ci openshift-ci Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 11, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 11, 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: Enterprise

Run ID: 50203554-2548-46e7-830f-88f193d88181

📥 Commits

Reviewing files that changed from the base of the PR and between c12b2de and edd237d.

📒 Files selected for processing (5)
  • pkg/compare/compare.go
  • pkg/compare/testdata/NoInput/localerr.golden
  • pkg/compare/testdata/ReferenceConfigFileDoesntExist/localerr.golden
  • pkg/compare/testdata/ReferenceV2PerFieldMatcherValidation/localpathNotItTemplateerr.golden
  • pkg/compare/testdata/UserOverride/localfailOutputerr.golden
✅ Files skipped from review due to trivial changes (4)
  • pkg/compare/testdata/NoInput/localerr.golden
  • pkg/compare/testdata/UserOverride/localfailOutputerr.golden
  • pkg/compare/testdata/ReferenceConfigFileDoesntExist/localerr.golden
  • pkg/compare/testdata/ReferenceV2PerFieldMatcherValidation/localpathNotItTemplateerr.golden
🚧 Files skipped from review as they are similar to previous changes (1)
  • pkg/compare/compare.go

Walkthrough

The compare command's error messages and validation logic are corrected: removed unnecessary quoting around reference config file error messages, fixed spelling errors in error strings ("entires" → "entries", "acces" → "access"), and improved inline diff function error reporting to record template-side missing values as "Not found". Test fixtures (golden files) were updated accordingly.

Changes

Error Messages and Validation Fixes

Layer / File(s) Summary
Error Constants & Messages
pkg/compare/compare.go
Removed surrounding quotes from reference-config error constants; corrected diff execution error text.
Inline Diff Preprocessing & Errors
pkg/compare/compare.go
When resolving inline-diff function template paths, missing template-side values are now recorded as "Not found" errors; fixed typo in access-related error text (accesaccess). Cluster-side missing values remain non-errors.
Test Fixtures (goldens)
pkg/compare/testdata/NoInput/localerr.golden, pkg/compare/testdata/ReferenceConfigFileDoesntExist/localerr.golden, pkg/compare/testdata/ReferenceV2PerFieldMatcherValidation/localpathNotItTemplateerr.golden, pkg/compare/testdata/UserOverride/localfailOutputerr.golden
Updated expected outputs to remove extra quotes and fix spelling in error messages (e.g., Reference config file is required, Reference config file doesn't exist, failed to access value, no entries for which template to generate overrides for).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 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 pull request title accurately and specifically describes the main changes: fixing typos in error messages and removing literal quotes from error output strings.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed Custom check not applicable. PR only modifies error messages and golden test files, using standard Go testing.T framework with no Ginkgo tests or test names involved.
Test Structure And Quality ✅ Passed The custom check for Ginkgo test code quality is not applicable to this PR. The PR only fixes error messages and updates golden test data files, not Ginkgo test code.
Microshift Test Compatibility ✅ Passed No new Ginkgo e2e tests are added. Changes are limited to error message fixes and golden file updates. The custom check only applies when e2e tests are added.
Single Node Openshift (Sno) Test Compatibility ✅ Passed No new Ginkgo e2e tests added. PR only fixes typos and quotes in error messages and updates golden test files. SNO check not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed PR only corrects error message text in kube-compare utility. No deployment manifests, operators, controllers, or scheduling constraints introduced.
Ote Binary Stdout Contract ✅ Passed PR only fixes typos in error message constants. Does not modify DisplayFuncmap or process-level stdout code. Error handling via kcmdutil, not stdout. No violation.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PR contains no Ginkgo e2e tests. Only application code modifications to fix error messages and test fixture file updates. Custom check not applicable.

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

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

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.12.2)

Error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions
The command is terminated due to an error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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

@openshift-ci openshift-ci Bot requested review from natifridman and zzztx May 11, 2026 20:29
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 11, 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 adhil0 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

Fix spelling errors in error strings ("occurered" → "occurred",
"acces" → "access", "entires" → "entries") and remove unnecessary
escaped literal quotes wrapping two error constants. Update golden
test files to match.
@sebrandon1 sebrandon1 force-pushed the fix/error-message-typos-and-quotes branch from c12b2de to edd237d Compare May 11, 2026 20:32
@openshift-ci openshift-ci Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 11, 2026
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 11, 2026

@sebrandon1: 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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant