Skip to content

HYPERFLEET-1336 - chore: replace bingo with Go 1.24 tool directives#223

Merged
openshift-merge-bot[bot] merged 4 commits into
openshift-hyperfleet:mainfrom
kuudori:chore/replace-bingo-with-go-tool-directives
Jul 21, 2026
Merged

HYPERFLEET-1336 - chore: replace bingo with Go 1.24 tool directives#223
openshift-merge-bot[bot] merged 4 commits into
openshift-hyperfleet:mainfrom
kuudori:chore/replace-bingo-with-go-tool-directives

Conversation

@kuudori

@kuudori kuudori commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

HYPERFLEET-1336

Replace Bingo / standalone go install with a single tools/go.mod using Go 1.24+ tool directives.
Tools are pinned in tools/go.mod and invoked via $(call gotool,<name>) in the Makefile.

Tools:

  • golangci-lint v2.7.0
  • helm-docs v1.14.2
  • kubeconform v0.8.0
  • oapi-codegen v2.7.2

Also adds tidy-tools and verify-tools Make targets.

Follow-up changes (review comment fixes)

  • Quote $(GO) and $(TOOL_MOD) in Makefile gotool and tool recipes to prevent shell injection (CWE-78)
  • verify-tools now compares against HEAD (git diff HEAD --) instead of the working tree
  • Upgraded vulnerable transitive tool deps: golang.org/x/crypto v0.54.0, helm.sh/helm/v3 v3.21.3

@openshift-ci

openshift-ci Bot commented Jul 10, 2026

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The change replaces Bingo-managed tool files with a dedicated tools/go.mod that pins golangci-lint, helm-docs, oapi-codegen, and kubeconform. Makefile targets invoke these tools through go tool, add tooling tidiness verification, and update generation, linting, Helm documentation, and Helm validation. Main-module dependency versions and lint documentation are also updated.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: mliptak0, pnguyen44, rafabene

Sequence Diagram(s)

sequenceDiagram
  participant Makefile
  participant GoTool as Go tool runner
  participant ToolsModule as tools/go.mod
  participant DeveloperTool as pinned developer tool
  Makefile->>GoTool: invoke tool with -modfile=tools/go.mod
  GoTool->>ToolsModule: resolve pinned tool
  ToolsModule-->>GoTool: return tool metadata
  GoTool->>DeveloperTool: execute generation, lint, docs, or validation
  DeveloperTool-->>Makefile: return command result
Loading
🚥 Pre-merge checks | ✅ 11
✅ Passed checks (11 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main change: replacing Bingo with Go tool directives and a tools module.
Description check ✅ Passed The description is directly related to the changeset and correctly describes the tool-management migration.
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.
Sec-02: Secrets In Log Output ✅ Passed No non-test Go log calls with token/password/credential/secret fields or interpolations were found; CWE-532 not triggered.
No Hardcoded Secrets ✅ Passed PASS: added lines contain only the quoted gotool macro; no new secrets, tokens, base64 blobs, or embedded-credential URLs were introduced.
No Weak Cryptography ✅ Passed No CWE-327/CWE-208 issue: the diff only updates Makefile tool invocation and a go.sum version bump; no banned crypto, custom crypto, or secret comparisons appear.
No Injection Vectors ✅ Passed No CWE-78/89/79/502 pattern is introduced. The diff is Makefile/go.sum only; tool invocations use hardcoded names and quoted GO/TOOL_MOD.
No Privileged Containers ✅ Passed Diff only touches .bingo, Makefile, go.mod/sum; no manifests/templates/Dockerfiles and no privileged:true/hostNetwork/runAsUser:0 found. No CWE-250/269 issue.
No Pii Or Sensitive Data In Logs ✅ Passed PASS: HEAD only changes Makefile and go.sum; no logging statements or data-handling code were added, so no CWE-532 exposure.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
✨ Simplify code
  • Create PR with simplified code

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

@kuudori
kuudori force-pushed the chore/replace-bingo-with-go-tool-directives branch 3 times, most recently from 1aaf732 to 4e82b0e Compare July 10, 2026 19:31
@kuudori
kuudori marked this pull request as ready for review July 10, 2026 19:40
@openshift-ci
openshift-ci Bot requested review from pnguyen44 and rafabene July 10, 2026 19:40
@hyperfleet-ci-bot

hyperfleet-ci-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown

Risk Score: 2 — risk/medium

Signal Detail Points
PR size 3106 lines (>500) +2
Sensitive paths none +0

Computed by hyperfleet-risk-scorer

@kuudori
kuudori marked this pull request as draft July 13, 2026 03:33
@kuudori
kuudori force-pushed the chore/replace-bingo-with-go-tool-directives branch from 4e82b0e to e8bb11f Compare July 13, 2026 18:52
@kuudori
kuudori force-pushed the chore/replace-bingo-with-go-tool-directives branch from e8bb11f to 453e076 Compare July 13, 2026 18:55
@kuudori
kuudori force-pushed the chore/replace-bingo-with-go-tool-directives branch from 453e076 to ed1e8ab Compare July 14, 2026 01:52
@kuudori
kuudori force-pushed the chore/replace-bingo-with-go-tool-directives branch 2 times, most recently from 4fdcd15 to 9b30f80 Compare July 14, 2026 02:52
@kuudori kuudori changed the title chore: replace bingo with Go 1.24 tool directives HYPERFLEET-1336 - chore: replace bingo with Go 1.24 tool directives Jul 14, 2026
@kuudori
kuudori force-pushed the chore/replace-bingo-with-go-tool-directives branch from 9b30f80 to 7d073ee Compare July 20, 2026 16:53
@kuudori
kuudori marked this pull request as ready for review July 20, 2026 16:53
@openshift-ci
openshift-ci Bot requested review from Ruclo and mliptak0 July 20, 2026 16:53

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

🤖 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 `@go.mod`:
- Line 10: Restore the github.com/openshift-hyperfleet/hyperfleet-api-spec
dependency in go.mod to v1.0.26; do not retain the downgrade to v1.0.25, and
preserve the schema version used by hack/tools.go and Makefile for generating
openapi/openapi.yaml.

In `@Makefile`:
- Around line 295-296: Update the Makefile tools target to run from the tools
module context by changing into tools, disabling workspace resolution with
GOWORK=off, and invoking $(GO) install tool there. Preserve the target’s
existing purpose of installing the pinned tool versions from tools/go.mod.

In `@tools/go.mod`:
- Around line 8-9: Update the require entries in tools/go.mod for
github.com/oapi-codegen/oapi-codegen/v2 and github.com/yannh/kubeconform to pin
versions v2.5.1 and v0.7.0 respectively, while preserving the existing tool
directives.
- Line 235: Upgrade the vulnerable tool dependencies in tools/go.mod: change
golang.org/x/crypto to v0.44.0 or later and helm.sh/helm/v3 to v3.17.3 or later,
preserving the existing module declarations and updating related checksums or
dependency metadata as needed.
🪄 Autofix (Beta)

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: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 92b0109b-3e18-479e-8222-cce90bfcbbb8

📥 Commits

Reviewing files that changed from the base of the PR and between 9872189 and 7d073ee.

⛔ Files ignored due to path filters (6)
  • .bingo/golangci-lint.sum is excluded by !**/*.sum
  • .bingo/helm-docs.sum is excluded by !**/*.sum
  • .bingo/kubeconform.sum is excluded by !**/*.sum
  • .bingo/oapi-codegen.sum is excluded by !**/*.sum
  • go.sum is excluded by !**/*.sum, !**/go.sum
  • tools/go.sum is excluded by !**/*.sum, !**/go.sum
📒 Files selected for processing (12)
  • .bingo/.gitignore
  • .bingo/README.md
  • .bingo/Variables.mk
  • .bingo/go.mod
  • .bingo/golangci-lint.mod
  • .bingo/helm-docs.mod
  • .bingo/kubeconform.mod
  • .bingo/oapi-codegen.mod
  • .bingo/variables.env
  • Makefile
  • go.mod
  • tools/go.mod
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

💤 Files with no reviewable changes (9)
  • .bingo/helm-docs.mod
  • .bingo/variables.env
  • .bingo/README.md
  • .bingo/.gitignore
  • .bingo/kubeconform.mod
  • .bingo/Variables.mk
  • .bingo/golangci-lint.mod
  • .bingo/go.mod
  • .bingo/oapi-codegen.mod

Comment thread go.mod Outdated
Comment thread Makefile Outdated
Comment thread tools/go.mod
Comment thread tools/go.mod Outdated
@kuudori
kuudori force-pushed the chore/replace-bingo-with-go-tool-directives branch 2 times, most recently from 1626627 to 26c2269 Compare July 20, 2026 18:38

@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 `@Makefile`:
- Around line 163-164: Update the verify-tools target to compare tools/go.mod
and tools/go.sum against HEAD, including staged and committed-state differences
and failing when either module file is missing or untracked. Preserve the
existing failure message and exit behavior while replacing the working-tree-only
git diff check.
🪄 Autofix (Beta)

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: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 2796f71c-b6ab-4c03-835a-c6a0ed85deee

📥 Commits

Reviewing files that changed from the base of the PR and between 7d073ee and 26c2269.

⛔ Files ignored due to path filters (6)
  • .bingo/golangci-lint.sum is excluded by !**/*.sum
  • .bingo/helm-docs.sum is excluded by !**/*.sum
  • .bingo/kubeconform.sum is excluded by !**/*.sum
  • .bingo/oapi-codegen.sum is excluded by !**/*.sum
  • go.sum is excluded by !**/*.sum, !**/go.sum
  • tools/go.sum is excluded by !**/*.sum, !**/go.sum
📒 Files selected for processing (12)
  • .bingo/.gitignore
  • .bingo/README.md
  • .bingo/Variables.mk
  • .bingo/go.mod
  • .bingo/golangci-lint.mod
  • .bingo/helm-docs.mod
  • .bingo/kubeconform.mod
  • .bingo/oapi-codegen.mod
  • .bingo/variables.env
  • Makefile
  • go.mod
  • tools/go.mod
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

💤 Files with no reviewable changes (9)
  • .bingo/golangci-lint.mod
  • .bingo/.gitignore
  • .bingo/oapi-codegen.mod
  • .bingo/README.md
  • .bingo/kubeconform.mod
  • .bingo/helm-docs.mod
  • .bingo/Variables.mk
  • .bingo/go.mod
  • .bingo/variables.env
🚧 Files skipped from review as they are similar to previous changes (1)
  • go.mod

Comment thread Makefile Outdated
@kuudori
kuudori force-pushed the chore/replace-bingo-with-go-tool-directives branch from 26c2269 to 5d5e51d Compare July 20, 2026 18:54
- Quote Make variables in gotool and tool recipes (CWE-78)
- Add GOWORK=off to gotool definition
- Compare tool files against HEAD in verify-tools
- Upgrade golang.org/x/crypto v0.43.0 -> v0.54.0 (CVE fix)
- Upgrade helm.sh/helm/v3 v3.15.2 -> v3.21.3 (CVE fix)

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

🤖 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 `@Makefile`:
- Line 245: Replace the hardcoded user:pass credentials in the
broker.rabbitmq.url value on the kubeconform command with a credential-free AMQP
test URI, preserving the existing RabbitMQ host, port, and vhost used for
validation.
- Line 60: Harden the Makefile recipes against shell injection from GO and
HELM_CHART_DIR overrides. Quote these variable expansions wherever used,
including the OpenAPI command substitution and all Helm-docs recipes around the
referenced lines, and validate that each value is an expected executable or
directory path before execution.
🪄 Autofix (Beta)

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: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: c9a387fc-5732-498d-bd88-57837675b614

📥 Commits

Reviewing files that changed from the base of the PR and between 26c2269 and 3d36de2.

⛔ Files ignored due to path filters (6)
  • .bingo/golangci-lint.sum is excluded by !**/*.sum
  • .bingo/helm-docs.sum is excluded by !**/*.sum
  • .bingo/kubeconform.sum is excluded by !**/*.sum
  • .bingo/oapi-codegen.sum is excluded by !**/*.sum
  • go.sum is excluded by !**/*.sum, !**/go.sum
  • tools/go.sum is excluded by !**/*.sum, !**/go.sum
📒 Files selected for processing (13)
  • .bingo/.gitignore
  • .bingo/README.md
  • .bingo/Variables.mk
  • .bingo/go.mod
  • .bingo/golangci-lint.mod
  • .bingo/helm-docs.mod
  • .bingo/kubeconform.mod
  • .bingo/oapi-codegen.mod
  • .bingo/variables.env
  • AGENTS.md
  • Makefile
  • go.mod
  • tools/go.mod
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

💤 Files with no reviewable changes (9)
  • .bingo/go.mod
  • .bingo/kubeconform.mod
  • .bingo/variables.env
  • .bingo/.gitignore
  • .bingo/golangci-lint.mod
  • .bingo/helm-docs.mod
  • .bingo/oapi-codegen.mod
  • .bingo/README.md
  • .bingo/Variables.mk
🚧 Files skipped from review as they are similar to previous changes (2)
  • tools/go.mod
  • go.mod

Comment thread Makefile
Comment thread Makefile
@kuudori
kuudori force-pushed the chore/replace-bingo-with-go-tool-directives branch from 970da34 to 0d6ffad Compare July 20, 2026 20:36
@kuudori
kuudori force-pushed the chore/replace-bingo-with-go-tool-directives branch from 0d6ffad to e0c8c1c Compare July 20, 2026 21:06
@rh-amarin

Copy link
Copy Markdown
Contributor

/lgtm

@rh-amarin

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci

openshift-ci Bot commented Jul 21, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rh-amarin

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-merge-bot
openshift-merge-bot Bot merged commit 043306f into openshift-hyperfleet:main Jul 21, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants