HYPERFLEET-1336 - chore: replace bingo with Go 1.24 tool directives#223
Conversation
|
Skipping CI for Draft Pull Request. |
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThe change replaces Bingo-managed tool files with a dedicated Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: 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
🚥 Pre-merge checks | ✅ 11✅ Passed checks (11 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
1aaf732 to
4e82b0e
Compare
Risk Score: 2 —
|
| Signal | Detail | Points |
|---|---|---|
| PR size | 3106 lines (>500) | +2 |
| Sensitive paths | none | +0 |
Computed by hyperfleet-risk-scorer
4e82b0e to
e8bb11f
Compare
e8bb11f to
453e076
Compare
453e076 to
ed1e8ab
Compare
4fdcd15 to
9b30f80
Compare
9b30f80 to
7d073ee
Compare
There was a problem hiding this comment.
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
⛔ Files ignored due to path filters (6)
.bingo/golangci-lint.sumis excluded by!**/*.sum.bingo/helm-docs.sumis excluded by!**/*.sum.bingo/kubeconform.sumis excluded by!**/*.sum.bingo/oapi-codegen.sumis excluded by!**/*.sumgo.sumis excluded by!**/*.sum,!**/go.sumtools/go.sumis 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.envMakefilego.modtools/go.mod
🔗 Linked repositories identified
CodeRabbit considers these linked repositories for cross-repo context during reviews:
openshift-hyperfleet/architecture(manual)openshift-hyperfleet/hyperfleet-api(manual)openshift-hyperfleet/hyperfleet-sentinel(manual)openshift-hyperfleet/hyperfleet-adapter(manual) → reviewed against branchchore/replace-bingo-with-go-tool-directivesinstead of the default branchopenshift-hyperfleet/hyperfleet-broker(manual) → reviewed against open PR#26chore/replace-bingo-with-go-tool-directivesinstead of the default branch
💤 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
1626627 to
26c2269
Compare
There was a problem hiding this comment.
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
⛔ Files ignored due to path filters (6)
.bingo/golangci-lint.sumis excluded by!**/*.sum.bingo/helm-docs.sumis excluded by!**/*.sum.bingo/kubeconform.sumis excluded by!**/*.sum.bingo/oapi-codegen.sumis excluded by!**/*.sumgo.sumis excluded by!**/*.sum,!**/go.sumtools/go.sumis 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.envMakefilego.modtools/go.mod
🔗 Linked repositories identified
CodeRabbit considers these linked repositories for cross-repo context during reviews:
openshift-hyperfleet/architecture(manual)openshift-hyperfleet/hyperfleet-api(manual)openshift-hyperfleet/hyperfleet-sentinel(manual)openshift-hyperfleet/hyperfleet-adapter(manual) → reviewed against branchchore/replace-bingo-with-go-tool-directivesinstead of the default branchopenshift-hyperfleet/hyperfleet-broker(manual) → reviewed against open PR#26chore/replace-bingo-with-go-tool-directivesinstead of the default branch
💤 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
26c2269 to
5d5e51d
Compare
- 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)
There was a problem hiding this comment.
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
⛔ Files ignored due to path filters (6)
.bingo/golangci-lint.sumis excluded by!**/*.sum.bingo/helm-docs.sumis excluded by!**/*.sum.bingo/kubeconform.sumis excluded by!**/*.sum.bingo/oapi-codegen.sumis excluded by!**/*.sumgo.sumis excluded by!**/*.sum,!**/go.sumtools/go.sumis 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.envAGENTS.mdMakefilego.modtools/go.mod
🔗 Linked repositories identified
CodeRabbit considers these linked repositories for cross-repo context during reviews:
openshift-hyperfleet/architecture(manual)openshift-hyperfleet/hyperfleet-api(manual)openshift-hyperfleet/hyperfleet-sentinel(manual)openshift-hyperfleet/hyperfleet-adapter(manual) → reviewed against branchchore/replace-bingo-with-go-tool-directivesinstead of the default branchopenshift-hyperfleet/hyperfleet-broker(manual) → reviewed against open PR#26chore/replace-bingo-with-go-tool-directivesinstead of the default branch
💤 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
970da34 to
0d6ffad
Compare
0d6ffad to
e0c8c1c
Compare
|
/lgtm |
|
/lgtm |
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
043306f
into
openshift-hyperfleet:main
HYPERFLEET-1336
Replace Bingo / standalone
go installwith a singletools/go.modusing Go 1.24+ tool directives.Tools are pinned in
tools/go.modand invoked via$(call gotool,<name>)in the Makefile.Tools:
Also adds
tidy-toolsandverify-toolsMake targets.Follow-up changes (review comment fixes)
$(GO)and$(TOOL_MOD)in Makefilegotooland tool recipes to prevent shell injection (CWE-78)verify-toolsnow compares againstHEAD(git diff HEAD --) instead of the working treegolang.org/x/cryptov0.54.0,helm.sh/helm/v3v3.21.3