HYPERFLEET-1330 - chore: replace bingo with Go 1.24 tool directives#301
HYPERFLEET-1330 - chore: replace bingo with Go 1.24 tool directives#301kuudori wants to merge 3 commits into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
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 PR replaces Bingo-managed developer tools with a dedicated Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 10 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (10 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
Risk Score: 4 —
|
| Signal | Detail | Points |
|---|---|---|
| PR size | 3307 lines (>500) | +2 |
| Sensitive paths | none | +0 |
| Test coverage | No _test.go files in diff | +2 |
Computed by hyperfleet-risk-scorer
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
scripts/test-helm.sh (1)
33-34: 🩺 Stability & Availability | 🔵 Trivial | 💤 Low valueUnquoted
$KUBECONFORM/$YQ— fragile, SC2086.Both variables now hold multi-word commands (
"$(GO) tool kubeconform"), so quoting them as a single token would break word-splitting — the unquoted form is functionally required here, not accidental. But this makes correctness depend on the caller (Makefile) never injecting a path containing spaces or shell metacharacters. Since the value is fully Makefile-controlled (not external/user input), this isn't exploitable today (no CWE-78 vector), but it is brittle: switching either variable to an array (KUBECONFORM=("$(GO)" tool kubeconform)) would remove the reliance on word-splitting.Also applies to: 40-41
🤖 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 `@scripts/test-helm.sh` around lines 33 - 34, Update the command variables used by the test script, including KUBECONFORM and YQ, to arrays containing each executable argument separately rather than multi-word command strings. Invoke them with array expansion in the relevant command calls, preserving support for the existing flags and "$@" arguments without relying on unquoted word splitting.Source: Path instructions
🤖 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`:
- Around line 197-205: Remove the tool block from go.mod and relocate these
development tool pins to the repository’s established Makefile-based tool
management, following the existing golangci-lint pattern. Ensure all listed
generators, linters, and test tools remain invocable through the relevant Make
targets without expanding the shared module graph.
In `@Makefile`:
- Line 60: Update the GO_VERSION variable in the Makefile to remove the trailing
period, preserving the intended go1.26 version string for verify checks.
---
Nitpick comments:
In `@scripts/test-helm.sh`:
- Around line 33-34: Update the command variables used by the test script,
including KUBECONFORM and YQ, to arrays containing each executable argument
separately rather than multi-word command strings. Invoke them with array
expansion in the relevant command calls, preserving support for the existing
flags and "$@" arguments without relying on unquoted word splitting.
🪄 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: 1bb812ce-e1f0-45c2-abbc-ea1760664a65
⛔ Files ignored due to path filters (8)
.bingo/golangci-lint.sumis excluded by!**/*.sum.bingo/gotestsum.sumis excluded by!**/*.sum.bingo/helm-docs.sumis excluded by!**/*.sum.bingo/kubeconform.sumis excluded by!**/*.sum.bingo/mockgen.sumis excluded by!**/*.sum.bingo/oapi-codegen.sumis excluded by!**/*.sum.bingo/yq.sumis excluded by!**/*.sumgo.sumis excluded by!**/*.sum,!**/go.sum
📒 Files selected for processing (22)
.bingo/.gitignore.bingo/README.md.bingo/Variables.mk.bingo/go.mod.bingo/golangci-lint.mod.bingo/gotestsum.mod.bingo/helm-docs.mod.bingo/kubeconform.mod.bingo/mockgen.mod.bingo/oapi-codegen.mod.bingo/variables.env.bingo/yq.mod.golangciversionMakefilego.modpkg/handlers/openapi.gopkg/services/adapter_status.gopkg/services/cluster.gopkg/services/generic.gopkg/services/node_pool.gopkg/services/resource.goscripts/test-helm.sh
🔗 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)openshift-hyperfleet/hyperfleet-broker(manual) → reviewed against open PR#26chore/replace-bingo-with-go-tool-directivesinstead of the default branch
💤 Files with no reviewable changes (13)
- .bingo/gotestsum.mod
- .bingo/go.mod
- .golangciversion
- .bingo/mockgen.mod
- .bingo/yq.mod
- .bingo/README.md
- .bingo/kubeconform.mod
- .bingo/variables.env
- .bingo/golangci-lint.mod
- .bingo/.gitignore
- .bingo/helm-docs.mod
- .bingo/Variables.mk
- .bingo/oapi-codegen.mod
|
/test validate-commits |
21b7a02 to
fca8497
Compare
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 `@go.mod`:
- Line 105: Update the indirect helm.sh/helm/v3 dependency in go.mod from 3.15.2
to at least 3.18.4; if no module imports Helm libraries, remove the dependency
instead.
In `@Makefile`:
- Around line 129-131: Harden the $(GOLANGCI_LINT) installer recipe by
validating GOLANGCI_LINT_VERSION against the accepted exact allowlist/semver
grammar before invoking go install, and pass the package/version argument safely
without unquoted expansion. Quote the mv destination as "$@", preserving the
existing installation behavior while preventing shell injection through
overrideable Make variables.
🪄 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: 6f754edf-8e41-4b95-bf9a-8bb478e79440
⛔ Files ignored due to path filters (8)
.bingo/golangci-lint.sumis excluded by!**/*.sum.bingo/gotestsum.sumis excluded by!**/*.sum.bingo/helm-docs.sumis excluded by!**/*.sum.bingo/kubeconform.sumis excluded by!**/*.sum.bingo/mockgen.sumis excluded by!**/*.sum.bingo/oapi-codegen.sumis excluded by!**/*.sum.bingo/yq.sumis excluded by!**/*.sumgo.sumis excluded by!**/*.sum,!**/go.sum
📒 Files selected for processing (20)
.bingo/.gitignore.bingo/README.md.bingo/Variables.mk.bingo/go.mod.bingo/golangci-lint.mod.bingo/gotestsum.mod.bingo/helm-docs.mod.bingo/kubeconform.mod.bingo/mockgen.mod.bingo/oapi-codegen.mod.bingo/variables.env.bingo/yq.mod.golangciversionMakefilego.modpkg/handlers/openapi.gopkg/services/adapter_status.gopkg/services/generic.gopkg/services/resource.goscripts/test-helm.sh
🔗 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)openshift-hyperfleet/hyperfleet-broker(manual) → reviewed against open PR#26chore/replace-bingo-with-go-tool-directivesinstead of the default branch
💤 Files with no reviewable changes (13)
- .bingo/mockgen.mod
- .bingo/go.mod
- .golangciversion
- .bingo/gotestsum.mod
- .bingo/kubeconform.mod
- .bingo/README.md
- .bingo/yq.mod
- .bingo/Variables.mk
- .bingo/.gitignore
- .bingo/helm-docs.mod
- .bingo/golangci-lint.mod
- .bingo/variables.env
- .bingo/oapi-codegen.mod
🚧 Files skipped from review as they are similar to previous changes (5)
- pkg/services/generic.go
- pkg/services/adapter_status.go
- pkg/services/resource.go
- scripts/test-helm.sh
- pkg/handlers/openapi.go
fca8497 to
9c0035a
Compare
There was a problem hiding this comment.
Actionable comments posted: 4
♻️ Duplicate comments (1)
Makefile (1)
58-58: 🎯 Functional Correctness | 🔴 CriticalThe trailing-period defect in
GO_VERSIONremains.
go1.26.will not match the intendedgo1.26toolchain value and can break version verification.🤖 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 `@Makefile` at line 58, Update the GO_VERSION assignment to use the exact toolchain value go1.26 without the trailing period, preserving the existing version configuration.
🤖 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 129: Update the tidy-tools loop to stop immediately and return a nonzero
status when any go mod tidy invocation fails, rather than allowing a later
successful iteration to determine the loop result. Preserve processing of each
tools/* module until the first failure.
- Line 11: Update the overrideable GO command handling used by gotool and every
Makefile recipe site, including the referenced later site: validate GO against
an allowed executable-path format before use and quote the validated value
wherever it is expanded in shell recipes. Preserve normal Go executable path
overrides while rejecting values containing shell metacharacters.
- Around line 9-11: Align the repository’s documented tool-pinning contract with
the Makefile’s Go tool directive approach: update
hyperfleet/standards/dependency-pinning.md and the pre-commit documentation to
replace Bingo and .bingo/Variables.mk references with the pinned
tools/<name>/go.mod workflow, including any required usage or maintenance
guidance. Alternatively, retain the existing Bingo integration until those
documents are updated; do not leave the implementation and documented
supply-chain boundary inconsistent.
In `@tools/helm-docs/go.mod`:
- Line 39: Update the helm.sh/helm/v3 dependency in tools/helm-docs/go.mod from
v3.15.2 to patched release v3.20.2 or later, then regenerate the module graph so
related dependency metadata remains consistent.
---
Duplicate comments:
In `@Makefile`:
- Line 58: Update the GO_VERSION assignment to use the exact toolchain value
go1.26 without the trailing period, preserving the existing version
configuration.
🪄 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: d9df8a9e-1225-422f-b44f-746e10e675fb
⛔ Files ignored due to path filters (9)
.bingo/kubeconform.sumis excluded by!**/*.sumgo.sumis excluded by!**/*.sum,!**/go.sumtools/golangci-lint/go.sumis excluded by!**/*.sum,!**/go.sumtools/gotestsum/go.sumis excluded by!**/*.sum,!**/go.sumtools/helm-docs/go.sumis excluded by!**/*.sum,!**/go.sumtools/kubeconform/go.sumis excluded by!**/*.sum,!**/go.sumtools/mockgen/go.sumis excluded by!**/*.sum,!**/go.sumtools/oapi-codegen/go.sumis excluded by!**/*.sum,!**/go.sumtools/yq/go.sumis excluded by!**/*.sum,!**/go.sum
📒 Files selected for processing (27)
.bingo/.gitignore.bingo/README.md.bingo/Variables.mk.bingo/go.mod.bingo/golangci-lint.mod.bingo/gotestsum.mod.bingo/helm-docs.mod.bingo/kubeconform.mod.bingo/mockgen.mod.bingo/oapi-codegen.mod.bingo/variables.env.bingo/yq.mod.golangciversionMakefilego.modpkg/handlers/openapi.gopkg/services/adapter_status.gopkg/services/generic.gopkg/services/resource.goscripts/test-helm.shtools/golangci-lint/go.modtools/gotestsum/go.modtools/helm-docs/go.modtools/kubeconform/go.modtools/mockgen/go.modtools/oapi-codegen/go.modtools/yq/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)openshift-hyperfleet/hyperfleet-broker(manual) → reviewed against open PR#26chore/replace-bingo-with-go-tool-directivesinstead of the default branch
💤 Files with no reviewable changes (13)
- .bingo/gotestsum.mod
- .bingo/README.md
- .bingo/.gitignore
- .golangciversion
- .bingo/yq.mod
- .bingo/go.mod
- .bingo/mockgen.mod
- .bingo/helm-docs.mod
- .bingo/golangci-lint.mod
- .bingo/kubeconform.mod
- .bingo/oapi-codegen.mod
- .bingo/Variables.mk
- .bingo/variables.env
🚧 Files skipped from review as they are similar to previous changes (5)
- pkg/services/generic.go
- pkg/services/resource.go
- pkg/services/adapter_status.go
- pkg/handlers/openapi.go
- scripts/test-helm.sh
d319caf to
f5f01af
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 `@tools/go.mod`:
- Line 257: Update the owning toolchain dependencies in tools/go.mod, upgrading
golang.org/x/crypto to at least v0.52.0 and helm.sh/helm/v3 to at least v3.18.4.
Refresh the related module checksums and dependency resolution so the vulnerable
pins are fully replaced.
🪄 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: 0965869d-35f3-435d-8b93-e5f280e0b3b8
⛔ Files ignored due to path filters (9)
.bingo/golangci-lint.sumis excluded by!**/*.sum.bingo/gotestsum.sumis excluded by!**/*.sum.bingo/helm-docs.sumis excluded by!**/*.sum.bingo/kubeconform.sumis excluded by!**/*.sum.bingo/mockgen.sumis excluded by!**/*.sum.bingo/oapi-codegen.sumis excluded by!**/*.sum.bingo/yq.sumis excluded by!**/*.sumgo.sumis excluded by!**/*.sum,!**/go.sumtools/go.sumis excluded by!**/*.sum,!**/go.sum
📒 Files selected for processing (22)
.bingo/.gitignore.bingo/README.md.bingo/Variables.mk.bingo/go.mod.bingo/golangci-lint.mod.bingo/gotestsum.mod.bingo/helm-docs.mod.bingo/kubeconform.mod.bingo/mockgen.mod.bingo/oapi-codegen.mod.bingo/variables.env.bingo/yq.mod.dockerignore.golangciversionMakefilego.modpkg/handlers/openapi.gopkg/services/adapter_status.gopkg/services/generic.gopkg/services/resource.goscripts/test-helm.shtools/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)openshift-hyperfleet/hyperfleet-broker(manual) → reviewed against open PR#26chore/replace-bingo-with-go-tool-directivesinstead of the default branch
💤 Files with no reviewable changes (14)
- .bingo/yq.mod
- .dockerignore
- .golangciversion
- .bingo/mockgen.mod
- .bingo/variables.env
- .bingo/gotestsum.mod
- .bingo/.gitignore
- .bingo/go.mod
- .bingo/kubeconform.mod
- .bingo/oapi-codegen.mod
- .bingo/golangci-lint.mod
- .bingo/README.md
- .bingo/Variables.mk
- .bingo/helm-docs.mod
🚧 Files skipped from review as they are similar to previous changes (3)
- pkg/services/resource.go
- pkg/services/adapter_status.go
- pkg/handlers/openapi.go
9907617 to
f97f4e2
Compare
f97f4e2 to
b6cf0ff
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 vulnerable tool deps (golang.org/x/crypto v0.54.0, helm.sh/helm/v3 v3.21.3)
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 `@AGENTS.md`:
- Line 190: Synchronize the tool-version guidance in AGENTS.md with the linked
architecture standards and sibling repository instructions: update those
references to use tools/go.mod, or explicitly document the rollout boundary
where .bingo/Variables.mk remains required. Ensure contributors and CI resolve
tool versions consistently.
In `@Makefile`:
- Around line 133-134: Update the Makefile dependency graph so every
gotool-consuming target waits for one completed tools target before running,
preventing parallel mutation of tools/go.mod and tools/go.sum. Keep verify-tools
as the post-tools drift check, and ensure verify-all performs that check only
after its parallel lint/test consumers complete.
🪄 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: 48b3f93b-ee71-4dc5-8e35-5e5d5517703d
⛔ Files ignored due to path filters (9)
.bingo/golangci-lint.sumis excluded by!**/*.sum.bingo/gotestsum.sumis excluded by!**/*.sum.bingo/helm-docs.sumis excluded by!**/*.sum.bingo/kubeconform.sumis excluded by!**/*.sum.bingo/mockgen.sumis excluded by!**/*.sum.bingo/oapi-codegen.sumis excluded by!**/*.sum.bingo/yq.sumis excluded by!**/*.sumgo.sumis excluded by!**/*.sum,!**/go.sumtools/go.sumis excluded by!**/*.sum,!**/go.sum
📒 Files selected for processing (27)
.bingo/.gitignore.bingo/README.md.bingo/Variables.mk.bingo/go.mod.bingo/golangci-lint.mod.bingo/gotestsum.mod.bingo/helm-docs.mod.bingo/kubeconform.mod.bingo/mockgen.mod.bingo/oapi-codegen.mod.bingo/variables.env.bingo/yq.mod.dockerignore.golangciversionAGENTS.mdCLAUDE.mdCONTRIBUTING.mdDockerfileMakefiledocs/development.mdgo.modpkg/handlers/openapi.gopkg/services/adapter_status.gopkg/services/generic.gopkg/services/resource.goscripts/test-helm.shtools/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 (14)
- .bingo/.gitignore
- .bingo/helm-docs.mod
- .bingo/yq.mod
- .golangciversion
- .bingo/go.mod
- .bingo/mockgen.mod
- .bingo/README.md
- .bingo/kubeconform.mod
- .bingo/oapi-codegen.mod
- .bingo/gotestsum.mod
- .bingo/variables.env
- .bingo/golangci-lint.mod
- .dockerignore
- .bingo/Variables.mk
🚧 Files skipped from review as they are similar to previous changes (6)
- pkg/services/adapter_status.go
- go.mod
- pkg/handlers/openapi.go
- scripts/test-helm.sh
- pkg/services/resource.go
- tools/go.mod
GOWORK=off breaks when gotool is expanded inside a string variable (e.g. KUBECONFORM="$(call gotool,kubeconform)"), because the shell treats GOWORK=off as a command name. The -modfile flag already overrides the module context.
734c5f9 to
6e23c21
Compare
HYPERFLEET-1330
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.Also bumps oapi-codegen v2.6.0 -> v2.7.2 (was pinned by bingo); regenerated code renames
GetSwaggertoGetSpec, single callsite updated.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