-
Notifications
You must be signed in to change notification settings - Fork 12
feat: add bingo for Go tool dependency management #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add bingo for Go tool dependency management #7
Conversation
WalkthroughAdds a new .bingo/ directory with Bingo-managed tool artifacts: .gitignore, README.md, variables.env, Variables.mk, .bingo/go.mod, and pinned module files (golangci-lint.mod, gotestsum.mod). Makefile updated to include .bingo/Variables.mk and use Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
887ca37 to
381c18d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
Makefile (1)
126-126: Add FIPS-compliant crypto to binary target to match install target.The
binarytarget is missingGOEXPERIMENT=boringcryptowhile theinstalltarget (line 131) includes it. Both should produce FIPS-compliant binaries for enterprise/government deployments. Apply this diff:binary: check-gopath echo "Building version: ${build_version}" - ${GO} build -ldflags="$(ldflags)" -o hyperfleet-api ./cmd/hyperfleet-api + CGO_ENABLED=$(CGO_ENABLED) GOEXPERIMENT=boringcrypto ${GO} build -ldflags="$(ldflags)" -o hyperfleet-api ./cmd/hyperfleet-apiBased on coding guidelines requiring FIPS-compliant crypto builds, this ensures consistency between
make binaryandmake install.
♻️ Duplicate comments (1)
.bingo/gotestsum.mod (1)
1-5: Mirror thegodirective fix from golangci-lint’s bingo moduleThis file has the same
go 1.25.0directive pattern as.bingo/golangci-lint.mod. Whatever you decide there (e.g. correcting to a validgodirective and aligning with your chosen Go version) should be applied consistently here as well, ideally via regenerating with bingo.The pinned gotestsum version itself looks fine and matches the PR description.
Once you’ve decided on the correct `go` directive format/version for bingo modules, verify that both `.bingo/golangci-lint.mod` and `.bingo/gotestsum.mod` share the same `go` line.
🧹 Nitpick comments (2)
CLAUDE.md (1)
398-402: Doc change togo mod downloadmatches bingo-managed toolingSwitching this step from manual gotestsum installation to
go mod downloadaligns with the new bingo-based flow wheremake test/make lintpull in pinned tooling automatically. The updated text is clear.Optionally, you could add a brief note here that the first
make test/make lintrun will auto-build the pinned tools via bingo, so contributors know they don’t need separatego installsteps..bingo/README.md (1)
1-13: Bingo README is clear and aligned with the Makefile integrationThe README accurately describes how to install tools with
bingo get, how to wire.bingo/Variables.mkinto the main Makefile, and how to source.bingo/variables.env. It matches the rest of the PR’s wiring.If you later update the project-wide Go version guidance in CLAUDE.md, you may want to keep the “Go 1.24.x or 1.25.x” requirement here in sync with that single source of truth, but this isn’t blocking.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
.bingo/golangci-lint.sumis excluded by!**/*.sum.bingo/gotestsum.sumis excluded by!**/*.sum
📒 Files selected for processing (9)
.bingo/.gitignore(1 hunks).bingo/README.md(1 hunks).bingo/Variables.mk(1 hunks).bingo/go.mod(1 hunks).bingo/golangci-lint.mod(1 hunks).bingo/gotestsum.mod(1 hunks).bingo/variables.env(1 hunks)CLAUDE.md(1 hunks)Makefile(6 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
{Makefile,*.mk,**/Makefile,**/*.mk}
📄 CodeRabbit inference engine (CLAUDE.md)
Build Go binary using FIPS-compliant crypto with CGO_ENABLED=1 and GOEXPERIMENT=boringcrypto for enterprise/government deployments
Files:
Makefile
{Makefile,*.mk,**/Makefile,**/*.mk,docker-compose*,**/Dockerfile}
📄 CodeRabbit inference engine (CLAUDE.md)
Use Podman for containerized development and build consistency (database, code generation)
Files:
Makefile
🧠 Learnings (10)
📚 Learning: 2025-11-28T06:28:37.091Z
Learnt from: CR
Repo: openshift-hyperfleet/hyperfleet-api PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T06:28:37.091Z
Learning: Applies to **/cmd/hyperfleet/environments/*.go : Use environment-based configuration via OCM_ENV variable (development, unit_testing, integration_testing, production) for environment-specific behavior
Applied to files:
.bingo/variables.env
📚 Learning: 2025-11-28T06:28:37.091Z
Learnt from: CR
Repo: openshift-hyperfleet/hyperfleet-api PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T06:28:37.091Z
Learning: Applies to {Makefile,*.mk,**/Makefile,**/*.mk} : Build Go binary using FIPS-compliant crypto with CGO_ENABLED=1 and GOEXPERIMENT=boringcrypto for enterprise/government deployments
Applied to files:
.bingo/variables.env.bingo/Variables.mk.bingo/README.mdMakefile
📚 Learning: 2025-11-28T06:28:37.091Z
Learnt from: CR
Repo: openshift-hyperfleet/hyperfleet-api PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T06:28:37.091Z
Learning: Use Go 1.24.9 or later for all builds and ensure Go version compatibility
Applied to files:
.bingo/variables.env.bingo/README.mdMakefile
📚 Learning: 2025-11-28T06:28:37.091Z
Learnt from: CR
Repo: openshift-hyperfleet/hyperfleet-api PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T06:28:37.091Z
Learning: Applies to **/*_test.go : All unit tests must run with OCM_ENV=unit_testing environment variable for proper test isolation
Applied to files:
.bingo/variables.env.bingo/golangci-lint.mod.bingo/gotestsum.modMakefile
📚 Learning: 2025-11-28T06:28:37.091Z
Learnt from: CR
Repo: openshift-hyperfleet/hyperfleet-api PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T06:28:37.091Z
Learning: Applies to **/test/factories/**/*.go : Use test factories in test/factories/ for consistent test data generation with builder pattern
Applied to files:
.bingo/golangci-lint.mod.bingo/gotestsum.mod
📚 Learning: 2025-11-28T06:28:37.091Z
Learnt from: CR
Repo: openshift-hyperfleet/hyperfleet-api PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T06:28:37.091Z
Learning: Applies to **/pkg/api/*embed*.go : Embed OpenAPI specification at compile time using Go 1.16+ //go:embed directive for runtime availability and self-contained binary
Applied to files:
.bingo/golangci-lint.modCLAUDE.md
📚 Learning: 2025-11-28T06:28:37.091Z
Learnt from: CR
Repo: openshift-hyperfleet/hyperfleet-api PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T06:28:37.091Z
Learning: Applies to openapi/openapi.yaml : Maintain openapi/openapi.yaml as the source of truth (32KB with $ref) and regenerate pkg/api/openapi/api/openapi.yaml (44KB fully resolved) via 'make generate' using Podman
Applied to files:
CLAUDE.md
📚 Learning: 2025-11-28T06:28:37.091Z
Learnt from: CR
Repo: openshift-hyperfleet/hyperfleet-api PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T06:28:37.091Z
Learning: Use TypeSpec to define API specifications, which compile to OpenAPI 3.0.3, then generate Go models using openapi-generator-cli v7.16.0
Applied to files:
CLAUDE.md
📚 Learning: 2025-11-28T06:28:37.091Z
Learnt from: CR
Repo: openshift-hyperfleet/hyperfleet-api PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T06:28:37.091Z
Learning: Applies to **/test/integration/**/*_test.go : All integration tests must run with OCM_ENV=integration_testing environment variable and fresh PostgreSQL database per test
Applied to files:
Makefile
📚 Learning: 2025-11-28T06:28:37.091Z
Learnt from: CR
Repo: openshift-hyperfleet/hyperfleet-api PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T06:28:37.091Z
Learning: Applies to **/test/integration/**/*.go : Integration tests must use Testcontainers to create isolated PostgreSQL instances for each test suite to ensure state isolation
Applied to files:
Makefile
🔇 Additional comments (8)
.bingo/.gitignore (1)
2-14: Bingo .gitignore pattern looks correctThe ignore/whitelist setup is standard for bingo: it keeps stable module/vars files tracked while excluding temp artifacts. No issues.
.bingo/go.mod (1)
1-1: Fake .bingo/go.mod is appropriate for bingo’s -moddir workflowThe placeholder module declaration matches bingo’s recommended setup and should be committed alongside the other .mod files. No changes needed.
.bingo/variables.env (1)
1-13: variables.env generation and sourcing semantics look goodThis helper correctly computes
GOBINand exposes shell variables for the version-suffixed tool binaries, matching how.bingo/Variables.mkbuilds them. Sourcing this file in a shell to get consistent tool paths is appropriate; no changes required..bingo/Variables.mk (1)
1-37: Autogenerated Variables.mk wiring for bingo tools looks correctThe Variables.mk fragment correctly derives
BINGO_DIR,GOBIN, and host GOOS/GOARCH and definesGOLANGCI_LINT/GOTESTSUMtargets that build the pinned versions from their .mod files. This matches bingo’s recommended pattern and should work well with your Makefile includes and “auto-install on first use” behavior.No changes needed here; the FIPS-focused Go build flags from the main binary builds don’t need to be propagated into these dev-tool build rules.
.bingo/golangci-lint.mod (1)
1-5: Go 1.25.0 directive syntax is valid; verify version compatibility insteadThe
go 1.25.0format is valid ingo.modfiles — Go acceptsmajor.minor.patchsyntax in the go directive. However, the real concern is version compatibility: the repository documents Go 1.24.9 as the required version, while this bingo module specifies Go 1.25.0. Ensure the toolchain version used in CI/dev environments matches the declared version, or regenerate the bingo files if they should target Go 1.24.x instead.Likely an incorrect or invalid review comment.
Makefile (3)
3-4: Include statement properly integrates bingo-managed tool variables.The inclusion of
.bingo/Variables.mkmakes tool paths available to downstream targets through make variables, enabling the tool-agnostic invocations that follow. Ensure bingo setup documentation is clear for developers on first-time project setup.
116-120: Lint target properly delegates to bingo-managed golangci-lint.The dependency on
$(GOLANGCI_LINT)and use of the variable ensure automatic provisioning on first use. The invocation flags are preserved.
163-210: Test targets properly delegate to bingo-managed gotestsum with correct environment variables.All test targets (
test,ci-test-unit,ci-test-integration,test-integration) now:
- Depend on
$(GOTESTSUM)for automatic provisioning- Use the
$(GOTESTSUM)variable for invocation- Set correct
OCM_ENVvariables (unit_testingfor unit tests;integration_testingfor integration tests)Test logic and flags are preserved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
CLAUDE.md (1)
395-403: Env-setup doc now matches module-based workflowSwitching this step from manually installing gotestsum to a generic
go mod downloadfits the new Bingo-managed tooling flow and keeps the setup sequence clear. You might optionally add a brief note thatmake test/make lintwill auto-install pinned tools via Bingo so contributors don’t go looking for separate install steps, but it’s not strictly necessary.Makefile (1)
114-210: Bingo-wired lint and test targets look correct, with a minor DRY opportunity
lint: $(GOLANGCI_LINT)followed by$(GOLANGCI_LINT) run ...correctly treats the versioned golangci-lint binary as a file prerequisite so it will be auto-built via Bingo before first use.- Likewise, adding
$(GOTESTSUM)as a prerequisite totest,ci-test-unit,ci-test-integration, andtest-integrationand invoking$(GOTESTSUM)keeps all test flows on the pinned gotestsum version, while still honoringOCM_ENV=unit_testing/integration_testingand Testcontainers flags from the existing setup. Based on learnings/coding_guidelines.If you ever want to tighten things up further, you could reuse
$(TEST_SUMMARY_FORMAT)for the unit-test targets instead of hardcoding--format short-verboseso all summaries are driven by the same knob, but the current behavior is perfectly fine.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
.bingo/golangci-lint.sumis excluded by!**/*.sum.bingo/gotestsum.sumis excluded by!**/*.sum
📒 Files selected for processing (11)
.bingo/.gitignore(1 hunks).bingo/README.md(1 hunks).bingo/Variables.mk(1 hunks).bingo/go.mod(1 hunks).bingo/golangci-lint.mod(1 hunks).bingo/gotestsum.mod(1 hunks).bingo/variables.env(1 hunks)CLAUDE.md(1 hunks)Makefile(6 hunks)PREREQUISITES.md(1 hunks)README.md(0 hunks)
💤 Files with no reviewable changes (1)
- README.md
🚧 Files skipped from review as they are similar to previous changes (6)
- .bingo/golangci-lint.mod
- .bingo/gotestsum.mod
- .bingo/go.mod
- .bingo/README.md
- .bingo/Variables.mk
- .bingo/.gitignore
🧰 Additional context used
📓 Path-based instructions (2)
{Makefile,*.mk,**/Makefile,**/*.mk}
📄 CodeRabbit inference engine (CLAUDE.md)
Build Go binary using FIPS-compliant crypto with CGO_ENABLED=1 and GOEXPERIMENT=boringcrypto for enterprise/government deployments
Files:
Makefile
{Makefile,*.mk,**/Makefile,**/*.mk,docker-compose*,**/Dockerfile}
📄 CodeRabbit inference engine (CLAUDE.md)
Use Podman for containerized development and build consistency (database, code generation)
Files:
Makefile
🧠 Learnings (10)
📚 Learning: 2025-11-28T06:28:37.091Z
Learnt from: CR
Repo: openshift-hyperfleet/hyperfleet-api PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T06:28:37.091Z
Learning: Applies to {Makefile,*.mk,**/Makefile,**/*.mk} : Build Go binary using FIPS-compliant crypto with CGO_ENABLED=1 and GOEXPERIMENT=boringcrypto for enterprise/government deployments
Applied to files:
MakefilePREREQUISITES.md.bingo/variables.env
📚 Learning: 2025-11-28T06:28:37.091Z
Learnt from: CR
Repo: openshift-hyperfleet/hyperfleet-api PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T06:28:37.091Z
Learning: Use Go 1.24.9 or later for all builds and ensure Go version compatibility
Applied to files:
MakefilePREREQUISITES.md.bingo/variables.env
📚 Learning: 2025-11-28T06:28:37.091Z
Learnt from: CR
Repo: openshift-hyperfleet/hyperfleet-api PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T06:28:37.091Z
Learning: Applies to **/*_test.go : All unit tests must run with OCM_ENV=unit_testing environment variable for proper test isolation
Applied to files:
Makefile.bingo/variables.env
📚 Learning: 2025-11-28T06:28:37.091Z
Learnt from: CR
Repo: openshift-hyperfleet/hyperfleet-api PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T06:28:37.091Z
Learning: Applies to **/test/integration/**/*_test.go : All integration tests must run with OCM_ENV=integration_testing environment variable and fresh PostgreSQL database per test
Applied to files:
Makefile
📚 Learning: 2025-11-28T06:28:37.091Z
Learnt from: CR
Repo: openshift-hyperfleet/hyperfleet-api PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T06:28:37.091Z
Learning: Applies to **/test/integration/**/*.go : Integration tests must use Testcontainers to create isolated PostgreSQL instances for each test suite to ensure state isolation
Applied to files:
MakefilePREREQUISITES.md
📚 Learning: 2025-11-28T06:28:37.091Z
Learnt from: CR
Repo: openshift-hyperfleet/hyperfleet-api PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T06:28:37.091Z
Learning: Applies to {Makefile,*.mk,**/Makefile,**/*.mk,docker-compose*,**/Dockerfile} : Use Podman for containerized development and build consistency (database, code generation)
Applied to files:
PREREQUISITES.md
📚 Learning: 2025-11-28T06:28:37.091Z
Learnt from: CR
Repo: openshift-hyperfleet/hyperfleet-api PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T06:28:37.091Z
Learning: Applies to **/cmd/hyperfleet/environments/*.go : Use environment-based configuration via OCM_ENV variable (development, unit_testing, integration_testing, production) for environment-specific behavior
Applied to files:
.bingo/variables.env
📚 Learning: 2025-11-28T06:28:37.091Z
Learnt from: CR
Repo: openshift-hyperfleet/hyperfleet-api PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T06:28:37.091Z
Learning: Applies to openapi/openapi.yaml : Maintain openapi/openapi.yaml as the source of truth (32KB with $ref) and regenerate pkg/api/openapi/api/openapi.yaml (44KB fully resolved) via 'make generate' using Podman
Applied to files:
CLAUDE.md
📚 Learning: 2025-11-28T06:28:37.091Z
Learnt from: CR
Repo: openshift-hyperfleet/hyperfleet-api PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T06:28:37.091Z
Learning: Applies to **/pkg/api/*embed*.go : Embed OpenAPI specification at compile time using Go 1.16+ //go:embed directive for runtime availability and self-contained binary
Applied to files:
CLAUDE.md
📚 Learning: 2025-11-28T06:28:37.091Z
Learnt from: CR
Repo: openshift-hyperfleet/hyperfleet-api PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T06:28:37.091Z
Learning: Use TypeSpec to define API specifications, which compile to OpenAPI 3.0.3, then generate Go models using openapi-generator-cli v7.16.0
Applied to files:
CLAUDE.md
🔇 Additional comments (3)
.bingo/variables.env (1)
1-13: Bingo env helper looks consistent with generated templateThe GOBIN resolution and the version-suffixed
GOLANGCI_LINT/GOTESTSUMpaths are in line with standard Bingo output and should work fine when sourced in a typical bash/zsh shell. Given theDO NOT EDITnote and the fact this is generated, I wouldn’t hand-tune it further.PREREQUISITES.md (1)
50-63: Quick verification now matches Podman-based toolingUpdating the verification step to
podman --versionis consistent with the earlier Podman prerequisite and with the project guidance to use Podman for local containers and code generation. Looks good.Makefile (1)
3-4: Including Bingo variables centrally is appropriatePulling in
.bingo/Variables.mkat the top gives you a single source for pinned tool paths and build rules, which is exactly what Bingo expects. As long as.bingo/Variables.mkstays tracked in git, this is a solid way to keep tool versions reproducible.
Add bingo to manage Go tool dependencies with version pinning: - gotestsum v1.13.0 for test execution - golangci-lint v1.64.8 for linting This eliminates manual `go install` steps - tools auto-install on first use of `make test` or `make lint`. Ref: HYPERFLEET-282 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
381c18d to
24674a6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
Makefile (1)
241-245: Optional: switchrun/docsto use$(container_tool)/ Podman for consistencyThis target still uses
docker rundirectly, whereas the rest of the Makefile standardizes oncontainer_tool ?= podman; updating this to$(container_tool) run ...would align with the Podman-first guideline and keep container tooling consistent across targets.If you agree, I can propose a small diff to swap in
$(container_tool)here so local docs hosting also respects the Podman-based workflow.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
.bingo/golangci-lint.sumis excluded by!**/*.sum.bingo/gotestsum.sumis excluded by!**/*.sum
📒 Files selected for processing (11)
.bingo/.gitignore(1 hunks).bingo/README.md(1 hunks).bingo/Variables.mk(1 hunks).bingo/go.mod(1 hunks).bingo/golangci-lint.mod(1 hunks).bingo/gotestsum.mod(1 hunks).bingo/variables.env(1 hunks)CLAUDE.md(1 hunks)Makefile(7 hunks)PREREQUISITES.md(1 hunks)README.md(0 hunks)
💤 Files with no reviewable changes (1)
- README.md
🚧 Files skipped from review as they are similar to previous changes (7)
- .bingo/go.mod
- CLAUDE.md
- .bingo/.gitignore
- .bingo/README.md
- .bingo/golangci-lint.mod
- .bingo/gotestsum.mod
- .bingo/variables.env
🧰 Additional context used
📓 Path-based instructions (2)
{Makefile,*.mk,**/Makefile,**/*.mk}
📄 CodeRabbit inference engine (CLAUDE.md)
Build Go binary using FIPS-compliant crypto with CGO_ENABLED=1 and GOEXPERIMENT=boringcrypto for enterprise/government deployments
Files:
Makefile
{Makefile,*.mk,**/Makefile,**/*.mk,docker-compose*,**/Dockerfile}
📄 CodeRabbit inference engine (CLAUDE.md)
Use Podman for containerized development and build consistency (database, code generation)
Files:
Makefile
🧠 Learnings (9)
📚 Learning: 2025-11-28T06:28:37.091Z
Learnt from: CR
Repo: openshift-hyperfleet/hyperfleet-api PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T06:28:37.091Z
Learning: Applies to **/test/integration/**/*.go : Integration tests must use Testcontainers to create isolated PostgreSQL instances for each test suite to ensure state isolation
Applied to files:
PREREQUISITES.mdMakefile
📚 Learning: 2025-11-28T06:28:37.091Z
Learnt from: CR
Repo: openshift-hyperfleet/hyperfleet-api PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T06:28:37.091Z
Learning: Use Go 1.24.9 or later for all builds and ensure Go version compatibility
Applied to files:
PREREQUISITES.mdMakefile
📚 Learning: 2025-11-28T06:28:37.091Z
Learnt from: CR
Repo: openshift-hyperfleet/hyperfleet-api PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T06:28:37.091Z
Learning: Applies to {Makefile,*.mk,**/Makefile,**/*.mk,docker-compose*,**/Dockerfile} : Use Podman for containerized development and build consistency (database, code generation)
Applied to files:
PREREQUISITES.md
📚 Learning: 2025-11-28T06:28:37.091Z
Learnt from: CR
Repo: openshift-hyperfleet/hyperfleet-api PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T06:28:37.091Z
Learning: Applies to {Makefile,*.mk,**/Makefile,**/*.mk} : Build Go binary using FIPS-compliant crypto with CGO_ENABLED=1 and GOEXPERIMENT=boringcrypto for enterprise/government deployments
Applied to files:
PREREQUISITES.mdMakefile.bingo/Variables.mk
📚 Learning: 2025-11-28T06:28:37.091Z
Learnt from: CR
Repo: openshift-hyperfleet/hyperfleet-api PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T06:28:37.091Z
Learning: Applies to **/pkg/api/*embed*.go : Embed OpenAPI specification at compile time using Go 1.16+ //go:embed directive for runtime availability and self-contained binary
Applied to files:
Makefile
📚 Learning: 2025-11-28T06:28:37.091Z
Learnt from: CR
Repo: openshift-hyperfleet/hyperfleet-api PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T06:28:37.091Z
Learning: Applies to **/cmd/hyperfleet/environments/*.go : Use environment-based configuration via OCM_ENV variable (development, unit_testing, integration_testing, production) for environment-specific behavior
Applied to files:
Makefile
📚 Learning: 2025-11-28T06:28:37.091Z
Learnt from: CR
Repo: openshift-hyperfleet/hyperfleet-api PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T06:28:37.091Z
Learning: Applies to openapi/openapi.yaml : Maintain openapi/openapi.yaml as the source of truth (32KB with $ref) and regenerate pkg/api/openapi/api/openapi.yaml (44KB fully resolved) via 'make generate' using Podman
Applied to files:
Makefile
📚 Learning: 2025-11-28T06:28:37.091Z
Learnt from: CR
Repo: openshift-hyperfleet/hyperfleet-api PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T06:28:37.091Z
Learning: Applies to **/*_test.go : All unit tests must run with OCM_ENV=unit_testing environment variable for proper test isolation
Applied to files:
Makefile
📚 Learning: 2025-11-28T06:28:37.091Z
Learnt from: CR
Repo: openshift-hyperfleet/hyperfleet-api PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T06:28:37.091Z
Learning: Applies to **/test/integration/**/*_test.go : All integration tests must run with OCM_ENV=integration_testing environment variable and fresh PostgreSQL database per test
Applied to files:
Makefile
🔇 Additional comments (6)
PREREQUISITES.md (1)
50-63: Quick verification section now matches the updated tooling modelThe checks here (Go, Podman, psql, jq, optional ocm) are consistent with the prerequisites and with Bingo-managed gotestsum in the Makefile; no direct gotestsum install steps are needed anymore.
.bingo/Variables.mk (1)
1-37: Bingo-managed tool wiring looks correctThe host-aware, pinned builds for
golangci-lintandgotestsumviaGOBINand per-tool.modfiles are set up correctly and will integrate cleanly when included from the main Makefile; no manual edits needed given this is auto-generated.Makefile (4)
3-4: Including.bingo/Variables.mkcleanly integrates pinned toolingPulling in the Bingo-generated variables at the top centralizes tool paths and versions so
make lint/make testcan auto-install the right binaries; committed.bingo/artifacts make this safe for both local and CI usage.Please ensure your CI pipeline clones the repo with the
.bingodirectory included (no shallow/custom sparse checkout that would omit it) so these targets remain available.
116-119: Lint target now correctly depends on the Bingo-managed golangci-lintHaving
lint: $(GOLANGCI_LINT)ensures the pinned linter is built on first use and then reused, while keeping the existing arguments (-e unusedand package patterns) intact.Please run
make lintonce locally or in CI to confirm the Bingo-pinnedgolangci-lintversion behaves as expected with your current Go toolchain and codebase.
126-126: Binary build now aligns with FIPS/boringcrypto guidelineSetting
CGO_ENABLED=$(CGO_ENABLED) GOEXPERIMENT=boringcryptoon thebinarybuild matches the existinginstallbehavior and satisfies the requirement for FIPS-compliant crypto builds for the main hyperfleet binary.Please confirm your Go version and target platforms support the
boringcryptoexperiment (and that CI uses Go ≥ the documented minimum) so this flag doesn’t unexpectedly break builds.
163-164: Test targets correctly adopt Bingo-managed gotestsum and preserve env conventionsWiring
test,ci-test-unit,ci-test-integration, andtest-integrationto depend on$(GOTESTSUM)and invoke it centralizes the test runner version, while still honoringOCM_ENV=unit_testing/OCM_ENV=integration_testingand the Testcontainers-related settings for integration tests, which matches the existing testing guidelines.Please verify
make test,make ci-test-unit, and the integration test targets in your CI environment to ensure the pinnedgotestsumversion andTEST_SUMMARY_FORMATbehave as expected with your current test suites. (Based on learnings, this also keeps the required OCM_ENV values in place.)Also applies to: 176-177, 192-193, 207-208
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ciaranRoche, 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 |
Add bingo to manage Go tool dependencies with version pinning:
This eliminates manual
go installsteps - tools auto-install on first use ofmake testormake lint.Ref: HYPERFLEET-282
Summary by CodeRabbit
Chores
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.