Skip to content

ROSAENG-64541 | fix: switch bingo tool modules - #3447

Draft
amandahla wants to merge 1 commit into
openshift:masterfrom
amandahla:fix-renovate-bingo
Draft

ROSAENG-64541 | fix: switch bingo tool modules #3447
amandahla wants to merge 1 commit into
openshift:masterfrom
amandahla:fix-renovate-bingo

Conversation

@amandahla

@amandahla amandahla commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Depends on #3388 since Goreleaser requires Go 1.26.5

PR Summary

Fix Renovate's handling of .bingo/ tool modules by switching from the gomod manager to a custom regex manager, and bump govulncheck, goreleaser, and mockgen to their latest versions.

Detailed Description of the Issue

Renovate's gomod manager treats .bingo/*.mod files as full Go modules. When it processes them, it resolves and injects hundreds of transitive // indirect dependencies into the mod files (e.g. goreleaser.mod grew to 376 dependency lines). Bingo mod files are designed to
hold a single direct require line; the injected dependencies pollute version control, produce noisy diffs, and can interfere with bingo-managed installs.

This change removes .bingo/*.mod from the gomod manager's managerFilePatterns and replaces the bingo-tooling package rule with a custom regex manager that extracts only the direct require line from each mod file.

Alongside the Renovate fix, pinned tool versions are bumped:

  • govulncheck v1.1.4 → v1.6.0 — keeps vulnerability scanning current with the latest Go vulnerability database detection rules.
  • goreleaser v2.15.1 → v2.17.1
  • mockgen v0.4.0 → v0.6.0

The goreleaser.mod file is cleaned back to its intended minimal form (376 indirect dependency lines removed).

Related Issues and PRs

  • Jira: ROSAENG-64541
  • Fixes: N/A
  • Related PR(s): N/A
  • Related design/docs: N/A

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

Renovate's gomod manager processed .bingo/*.mod files as regular Go modules, injecting all transitive indirect dependencies into the mod files. This produced PRs with massive diffs (e.g. 1400+ lines in goreleaser.mod) and corrupted bingo's single-require pinning format.

Behavior After This Change

Renovate uses a custom regex manager to detect only the direct require line in each .bingo/*.mod file. Future Renovate PRs for bingo tools will contain clean, single-line version bumps. Tool versions are now current: govulncheck v1.6.0, goreleaser v2.17.1, mockgen v0.6.0.

How to Test (Step-by-Step)

Preconditions

  • Local clone with bingo installed

Test Steps

  1. Verify .bingo/*.mod files contain only the module header, go directive, and a single require line (no // indirect blocks).
  2. Run make generate to confirm mockgen v0.6.0 installs and generates mocks successfully.
  3. Validate renovate.json syntax with the Renovate config validator or npx --yes --package renovate -- renovate-config-validator.

Expected Results

  • All .bingo/*.mod files are minimal (single require line each).
  • make generate succeeds with the updated mockgen.
  • renovate.json passes config validation.

Proof of the Fix

  • Screenshots: N/A
  • Videos: N/A
  • Logs/CLI output: N/A
  • Other artifacts: Diff shows goreleaser.mod reduced from 381 lines to 5 lines.

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.

…r and bump tool versions

Signed-off-by: Amanda Hager Lopes de Andrade Katz <amanda.katz@redhat.com>
@amandahla
amandahla marked this pull request as draft August 4, 2026 18:30
@openshift-ci openshift-ci Bot added dco-signoff: yes do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Aug 4, 2026
@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Updated Goreleaser to v2.17.1, Govulncheck to v1.6.0, and Mockgen to v0.6.0 across Bingo build configuration and module files. Updated the Goreleaser module to Go 1.26.5 and a direct Goreleaser requirement. Revised Renovate configuration to detect required tool versions in .bingo/*.mod files with a custom regex rule.

Suggested reviewers: olucasfreitas

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
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 The PR changes only Bingo and Renovate configuration; it adds no test files, Ginkgo declarations, or test-title changes.
Test Structure And Quality ✅ Passed The PR changes only Bingo module/version files and renovate.json; it adds or modifies no Go or Ginkgo test code, cluster operations, assertions, or waits.
Microshift Test Compatibility ✅ Passed The diff changes only .bingo tooling files and renovate.json; it adds no Go test files or Ginkgo It, Describe, Context, or When tests.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The pull request changes only Bingo tool modules, sums, Make variables, environment variables, and Renovate configuration; it adds no Ginkgo or other e2e tests.
Topology-Aware Scheduling Compatibility ✅ Passed The patch changes only Bingo tool metadata/checksums and renovate.json; it adds no deployment manifests, controllers, workloads, or topology scheduling constraints.
Ote Binary Stdout Contract ✅ Passed The patch changes only Bingo metadata, module sums, and renovate.json; no Go source, main/suite setup, or stdout/logging code changed.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The pull request changes only Bingo tool modules, checksums, Make variables, environment variables, and Renovate configuration; it adds no Ginkgo e2e tests.
No-Weak-Crypto ✅ Passed The PR changes only tooling metadata and Renovate configuration. No application source, weak-crypto implementation, crypto API call, or secret comparison was added; SHA1-named entries are checksum...
Container-Privileges ✅ Passed The PR changes only .bingo tool files and renovate.json; no container/Kubernetes manifest or listed privilege setting is added.
No-Sensitive-Data-In-Logs ✅ Passed The diff adds only tool-install configuration; its three echo lines print versioned local binary paths, with no passwords, tokens, PII, hostnames, or customer data.
Title check ✅ Passed The title identifies the Bingo tool module change and follows the required ROSAENG ticket and fix format.
Description check ✅ Passed The description explains the problem, changes, validation steps, related issue, behavior, and breaking-change status in the required template.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 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.

@openshift-ci

openshift-ci Bot commented Aug 4, 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 Aug 4, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@renovate.json`:
- Around line 110-118: Move the Bingo regex configuration into customManagers,
using managerFilePatterns for .bingo/*.mod and preserving its Go dependency
matchStrings and datasourceTemplate. Add or retain a separate packageRules entry
matching the Bingo dependencies to apply the bingo-tooling groupName, and remove
the misplaced matchFileNames manager block.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro Plus

Run ID: 515c5bfa-bec4-4a20-9af4-d6387870bbf6

📥 Commits

Reviewing files that changed from the base of the PR and between 2b8ce7b and 7900785.

⛔ Files ignored due to path filters (3)
  • .bingo/goreleaser.sum is excluded by !**/*.sum
  • .bingo/govulncheck.sum is excluded by !**/*.sum
  • .bingo/mockgen.sum is excluded by !**/*.sum
📒 Files selected for processing (6)
  • .bingo/Variables.mk
  • .bingo/goreleaser.mod
  • .bingo/govulncheck.mod
  • .bingo/mockgen.mod
  • .bingo/variables.env
  • renovate.json

Comment thread renovate.json
Comment on lines +110 to +118
"customType": "regex",
"description": "Group Bingo-managed tool modules",
"groupName": "bingo-tooling",
"matchManagers": [
"gomod"
],
"matchFileNames": [
".bingo/*.mod"
],
"datasourceTemplate": "go",
"matchStrings": [
"require\\s+(?<depName>\\S+)\\s+(?<currentValue>v[^\\s]+)"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

python3 - <<'PY'
import json

with open("renovate.json", encoding="utf-8") as f:
    config = json.load(f)

managers = [
    manager for manager in config.get("customManagers", [])
    if manager.get("customType") == "regex"
    and manager.get("datasourceTemplate") == "go"
]

assert managers, "Missing Go regex custom manager"

for manager in managers:
    assert manager.get("managerFilePatterns"), (
        "Regex custom manager must define managerFilePatterns"
    )
    assert "matchFileNames" not in manager, (
        "matchFileNames belongs in packageRules"
    )
    assert "groupName" not in manager, (
        "Move grouping to packageRules"
    )

assert any(
    "custom.regex" in rule.get("matchManagers", [])
    and rule.get("groupName") == "bingo-tooling"
    and ".bingo/*.mod" in rule.get("matchFileNames", [])
    for rule in config.get("packageRules", [])
), "Missing Bingo custom.regex grouping package rule"
PY

Repository: openshift/rosa

Length of output: 274


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf 'renovate.json size:\n'
wc -l renovate.json

printf '\nRelevant renovate.json lines 1-180:\n'
sed -n '1,180p' renovate.json | cat -n

printf '\nChanged lines/stat around renovate.json:\n'
git diff --stat -- renovate.json || true
git diff --unified=80 -- renovate.json || true

Repository: openshift/rosa

Length of output: 5647


🌐 Web query:

Renovate custom managers regex managerFilePatterns matchFileNames packageRules

💡 Result:

In Renovate, custom managers (particularly the regex type) use specific configuration fields to identify and process files, which operate differently from packageRules. Key Configuration Fields: 1. managerFilePatterns: Used within customManagers to tell Renovate which files to scan [1][2]. It accepts an array of strings, which can be either glob patterns or regular expressions (if wrapped in slashes, e.g., /Dockerfile$/) [1][3][4]. These patterns are used to filter the repository's file list to find where to apply your regex logic [1][3]. 2. matchStrings: Used by the regex custom manager to extract dependency information from the files identified by managerFilePatterns [1][2]. It requires regular expressions with named capture groups to identify the datasource, depName (or packageName), and currentValue [1][5][2]. Relationship to packageRules: There is a distinct difference between how file matching is handled in custom managers and packageRules: - customManagers use managerFilePatterns (historically referred to as fileMatch in some contexts) to target files for extraction [1][5][6]. - packageRules use matchFileNames to filter which rules apply to dependencies already identified by a manager [6]. While recent developments have aimed for more consistency between these mechanisms, matchFileNames in packageRules specifically targets the file path of the identified dependency [6]. It supports both glob and regex patterns [6]. You cannot directly use packageRules to define the logic for a custom manager; instead, you use customManagers to extract the dependencies and then use packageRules to apply specific configurations (like versioning or auto-merge) to those dependencies based on the manager or filename [7]. For best results, keep these configurations separate: use customManagers to define "how to find" dependencies, and use packageRules to define "how to treat" those dependencies once found [2][7].

Citations:


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf 'JSON fragment around custom regex / packageRules:\n'
python3 - <<'PY'
import json
with open("renovate.json", encoding="utf-8") as f:
    data = json.load(f)
for key in ["customManagers", "packageRules"]:
    print(f"\n--- {key} ---")
    print(json.dumps(data.get(key), indent=2))
PY

printf '\nFiles using .bingo/*.mod patterns:\n'
rg -n '"\\.bingo/\\*\\.mod"|matchFileNames|managerFilePatterns|customManagers|packageRules' renovate.json || true

Repository: openshift/rosa

Length of output: 3447


Move the Bingo regex manager into customManagers with file patterns.

The block at lines 110–120 is matchFileNames; it is not a manager entry, and matchFileNames is a package-rule matcher. As a result, no custom.regex manager extracts dependencies from .bingo/*.mod, so removing the gomod file selector stops Renoate from updating those Bingo modules.

Add the Bingo custom.regex manager under customManagers with managerFilePatterns: [".bingo/*.mod"], and keep the grouping in a matching packageRules entry.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@renovate.json` around lines 110 - 118, Move the Bingo regex configuration
into customManagers, using managerFilePatterns for .bingo/*.mod and preserving
its Go dependency matchStrings and datasourceTemplate. Add or retain a separate
packageRules entry matching the Bingo dependencies to apply the bingo-tooling
groupName, and remove the misplaced matchFileNames manager block.

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. dco-signoff: yes do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant