Skip to content

OCM-00000 | ci: Update module github.com/golangci/golangci-lint/v2 to v2.12.2#3271

Open
amandahla wants to merge 3 commits into
openshift:masterfrom
amandahla:fix/golangci-lint-v2.12.2
Open

OCM-00000 | ci: Update module github.com/golangci/golangci-lint/v2 to v2.12.2#3271
amandahla wants to merge 3 commits into
openshift:masterfrom
amandahla:fix/golangci-lint-v2.12.2

Conversation

@amandahla

@amandahla amandahla commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

PR Summary

Supersedes Konflux mintmaker PR #3261 by bumping golangci-lint to v2.12.2, regenerating bingo tooling, and tuning goconst settings for the stricter v1.10.0 bundled with that release.

Detailed Description of the Issue

Konflux PR #3261 updates .bingo/golangci-lint.mod to v2.12.2 but fails ci/prow/lint. Version v2.12.2 ships goconst v1.10.0 (up from v1.8.2 in v2.11.4), which reports repeated string literals more aggressively. With issues.new: true and the existing new-from-rev baseline, those findings fail the lint job. The mintmaker PR also omits regenerated bingo tooling files.

Related Issues and PRs

Type of Change

  • feat - adds a new user-facing capability.
  • fix - resolves an incorrect behavior or bug.
  • docs - updates documentation only.
  • style - formatting or naming changes with no logic impact.
  • refactor - code restructuring with no behavior change.
  • test - adds or updates tests only.
  • chore - maintenance work (tooling, housekeeping, non-product code).
  • build - changes build system, packaging, or dependencies for build output.
  • ci - changes CI pipelines, jobs, or automation workflows.
  • perf - improves performance without changing intended behavior.

Previous Behavior

CI lint passes on master with golangci-lint v2.11.4 and goconst v1.8.2. Mintmaker PR #3261 bumps the dependency to v2.12.2 but leaves bingo tooling out of sync and fails lint with new goconst findings.

Behavior After This Change

CI lint uses golangci-lint v2.12.2 with regenerated bingo tooling. .golangci.yml tunes goconst for v1.10.0 (ignore-tests, match-constant: false, ignore-calls, min-occurrences: 5) and excludes tests/e2e/ and tests/utils/ from goconst, while keeping the existing new-from-rev baseline at 3ab0817ee. make lint passes with 0 issues. No CLI behavior changes.

How to Test (Step-by-Step)

Preconditions

  • Go toolchain and bingo dependencies available locally

Test Steps

  1. Check out this branch
  2. Run make lint

Expected Results

golangci-lint v2.12.2 runs and reports 0 issues.

Proof of the Fix

  • Screenshots: N/A
  • Videos: N/A
  • Logs/CLI output:
/home/amakatz/go/bin/golangci-lint-v2.12.2 run --timeout 5m0s  ./...
0 issues.
  • Other artifacts: N/A

Breaking Changes

  • No breaking changes
  • Yes, this PR introduces a breaking change (describe impact and migration plan below)

Breaking Change Details / Migration Plan

N/A

Developer Verification Checklist

  • Commit subject/title follows [JIRA-TICKET] | [TYPE]: <MESSAGE>.
  • PR description clearly explains both what changed and why.
  • Relevant Jira/GitHub issues and related PRs are linked.
  • make install-hooks has been run in this clone.
  • Tests were added/updated where appropriate.
  • I manually tested the change.
  • make test passes.
  • make lint passes.
  • make rosa passes.
  • Documentation or repo-local agent guidance was added/updated where appropriate.
  • Any risk, limitation, or follow-up work is documented.

red-hat-konflux Bot and others added 2 commits June 17, 2026 11:08
… v2.12.2

Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com>
Regenerate bingo tooling for v2.12.2 and reset the goconst baseline
after the stricter goconst v1.10.0 bundled with golangci-lint v2.12.2.

Co-authored-by: Cursor <cursoragent@cursor.com>
@openshift-ci openshift-ci Bot requested review from davidleerh and gdbranco June 17, 2026 14:11
@openshift-ci

openshift-ci Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: amandahla

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 Jun 17, 2026
@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

The PR bumps the pinned golangci-lint tool version from v2.11.4 to v2.12.2 across three bingo-managed files: the Go module requirement in .bingo/golangci-lint.mod, the generated Makefile variable and install target output path in .bingo/Variables.mk, and the shell environment variable in .bingo/variables.env. Additionally, the run.new-from-rev commit hash in .golangci.yml is updated to a new revision.

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: updating golangci-lint module to v2.12.2, which aligns with the primary objective of the PR.
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 This PR contains no Ginkgo test code - only tooling configuration and dependency updates. No test names to verify against stability requirements.
Test Structure And Quality ✅ Passed PR is purely a tooling/lint configuration update (golangci-lint v2.12.2 upgrade) with no actual test code modifications—all files added in initial commit, making the test quality check inapplicable.
Microshift Test Compatibility ✅ Passed The custom check for MicroShift test compatibility is not applicable to this PR. This repository is openshift/rosa (ROSA CLI tool for managing OpenShift clusters on AWS), not openshift/origin where...
Single Node Openshift (Sno) Test Compatibility ✅ Passed PR makes no changes to e2e test code. It only updates golangci-lint version and linting configuration files. No Ginkgo tests (Describe, It, Context, When) are added.
Topology-Aware Scheduling Compatibility ✅ Passed PR only modifies build tooling config (.bingo/, .golangci.yml), not deployment manifests, operator code, or controller scheduling constraints. No topology-aware scheduling check needed.
Ote Binary Stdout Contract ✅ Passed ROSA is a regular CLI tool, not an OTE test binary. The OTE Binary Stdout Contract check applies only to OpenShift Tests Extension binaries. Rosa's reporter writes warnings to stderr and is not use...
Ipv6 And Disconnected Network Test Compatibility ✅ Passed This PR updates golangci-lint tooling and configuration files (Variables.mk, golangci-lint.mod, variables.env, .golangci.yml), not Ginkgo e2e tests. No new tests are added; check is not applicable.
No-Weak-Crypto ✅ Passed No weak crypto patterns (MD5, SHA1, DES, RC4, 3DES, Blowfish, ECB, custom implementations, or non-constant-time comparisons) found in source code changes (cmd/, pkg/, internal/ directories).
Container-Privileges ✅ Passed PR modifies only build tooling and linting config files (.bingo/Variables.mk, .bingo/golangci-lint.mod, .bingo/variables.env, .golangci.yml), not container/K8s manifests. No privileged container se...
No-Sensitive-Data-In-Logs ✅ Passed No sensitive data (passwords, tokens, API keys, PII, session IDs, etc.) found in logs or outputs. PR updates golangci-lint version and configuration files only.
Description check ✅ Passed The pull request description is comprehensive and well-structured, covering all required sections including summary, detailed description, related issues, type of change, previous/new behavior, test steps, and verification checklist.

✏️ 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 commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

@amandahla: 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.

Configure goconst for the stricter v1.10.0 behavior instead of resetting
the lint baseline, and restore new-from-rev to the prior golangci bump.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant