Skip to content

NO-JIRA: Fix go vet warning in process.go#2304

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
rh-roman:fix-go-vet
Jul 8, 2026
Merged

NO-JIRA: Fix go vet warning in process.go#2304
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
rh-roman:fix-go-vet

Conversation

@rh-roman

@rh-roman rh-roman commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

usageErrorFn has a printf-style signature (it wraps kcmdutil.UsageErrorf)
and expects to perform formatting itself. Passing a pre-formatted
fmt.Sprintf string as the format argument is both redundant and unsafe —
any literal % characters in parameter names would be misinterpreted as
format verbs.

Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com
Signed-off-by: Roman Feldman rofeldma@redhat.com

Summary by CodeRabbit

  • Bug Fixes
    • Improved how duplicate template parameter errors are handled, while keeping the displayed usage message unchanged.

`usageErrorFn` has a printf-style signature (it wraps kcmdutil.UsageErrorf)
and expects to perform formatting itself. Passing a pre-formatted
fmt.Sprintf string as the format argument is both redundant and unsafe —
any literal % characters in parameter names would be misinterpreted as
format verbs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Roman Feldman <rofeldma@redhat.com>
@rh-roman rh-roman changed the title Fix go vet warning in process.go NO-JIRA: Fix go vet warning in process.go Jul 8, 2026
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 8, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@rh-roman: This pull request explicitly references no jira issue.

Details

In response to this:

usageErrorFn has a printf-style signature (it wraps kcmdutil.UsageErrorf)
and expects to perform formatting itself. Passing a pre-formatted
fmt.Sprintf string as the format argument is both redundant and unsafe —
any literal % characters in parameter names would be misinterpreted as
format verbs.

Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com
Signed-off-by: Roman Feldman rofeldma@redhat.com

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci Bot requested review from atiratree and tchap July 8, 2026 08:50
@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 181bb0e8-2ba8-42ac-9c2c-10705599f03b

📥 Commits

Reviewing files that changed from the base of the PR and between 78b1fe8 and 9d3080e.

📒 Files selected for processing (1)
  • pkg/cli/process/process.go

Walkthrough

The duplicate template parameter error handling in RunProcess was changed to pass the format string and arguments directly to usageErrorFn, rather than pre-formatting the message with fmt.Sprintf. The resulting error output remains unchanged.

Changes

Usage Error Formatting

Layer / File(s) Summary
Duplicate parameter error call update
pkg/cli/process/process.go
Replaced fmt.Sprintf-based message construction with direct arguments passed to usageErrorFn for duplicate template parameters.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: fixing a go vet warning in process.go.
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 No Ginkgo titles were added or changed; the only diff is a usageErrorFn call in process.go, and pkg/cli/process has no Ginkgo DSL usage.
Test Structure And Quality ✅ Passed PR only changes a usageErrorFn call in pkg/cli/process/process.go; no Ginkgo tests were added or modified, so this test-quality check is not applicable.
Microshift Test Compatibility ✅ Passed Only pkg/cli/process/process.go changed; no Ginkgo e2e tests or MicroShift-relevant APIs/features were added.
Single Node Openshift (Sno) Test Compatibility ✅ Passed Only pkg/cli/process/process.go changed; it’s a non-test formatting fix and adds no Ginkgo e2e tests or SNO-sensitive assumptions.
Topology-Aware Scheduling Compatibility ✅ Passed Only a CLI usage-error formatting line changed in pkg/cli/process/process.go; no scheduling/topology code or manifests were added or modified.
Ote Binary Stdout Contract ✅ Passed PASS: The change only alters a usageErrorFn call in RunProcess; it adds no stdout writes in main/init/suite setup or direct stdout streams.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PR only changes pkg/cli/process/process.go CLI error formatting; it adds no Ginkgo e2e tests or networking-dependent test code.
No-Weak-Crypto ✅ Passed The only touched code is an error-formatting change in process.go; no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB or custom crypto appears.
Container-Privileges ✅ Passed Only pkg/cli/process/process.go changed; no container/K8s manifests or privilege settings were modified.
No-Sensitive-Data-In-Logs ✅ Passed Touched code only changes a UsageErrorf call; no logging sinks or sensitive-data outputs were added in process.go.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@atiratree

Copy link
Copy Markdown
Member

/lgtm
/approve
/verified by ci

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Jul 8, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@atiratree: This PR has been marked as verified by ci.

Details

In response to this:

/lgtm
/approve
/verified by ci

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 8, 2026
@openshift-ci

openshift-ci Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: atiratree, rh-roman

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

The pull request process is described 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 approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 8, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 0ec4cb0 and 2 for PR HEAD 9d3080e in total

@openshift-ci

openshift-ci Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

@rh-roman: 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.

@openshift-merge-bot openshift-merge-bot Bot merged commit 22c69c0 into openshift:main Jul 8, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants