Skip to content

Conversation

@ciaranRoche
Copy link
Contributor

@ciaranRoche ciaranRoche commented Dec 2, 2025

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

Summary by CodeRabbit

  • Chores

    • Centralized and pinned development tool versions and install targets for consistent builds.
    • Switched build/test targets to use managed tool binaries and updated build flags.
    • Added repository ignore rules that default to ignoring files then whitelist key project files.
  • Documentation

    • Added guidance for the development tool workflow and environment setup.
    • Removed outdated manual installation steps for the test-summary tool and updated prerequisites.

✏️ Tip: You can customize this high-level summary in your review settings.

@openshift-ci openshift-ci bot requested review from jsell-rh and rafabene December 2, 2025 13:07
@openshift-ci openshift-ci bot added the approved label Dec 2, 2025
@coderabbitai
Copy link

coderabbitai bot commented Dec 2, 2025

Walkthrough

Adds 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 $(GOLANGCI_LINT) and $(GOTESTSUM) variables as prerequisites/commands. Documentation files (CLAUDE.md, PREREQUISITES.md, README.md) were edited to remove direct gotestsum installation instructions. .bingo/.gitignore defaults to ignoring all files and explicitly whitelists selected patterns and files.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Inspect .bingo/*.mod files for correct module declarations and pinned versions.
  • Verify .bingo/Variables.mk for correct host-aware GO environment usage, -modfile invocation, and GOBIN install paths.
  • Confirm Makefile include and that targets depend on and invoke $(GOLANGCI_LINT) and $(GOTESTSUM) correctly.
  • Check .bingo/variables.env for safe fallbacks (GOBIN -> GOPATH/bin) and no injection issues.
  • Review .bingo/.gitignore to ensure whitelist/exclusion patterns match intent and temporary patterns (e.g., *tmp.mod, *tmp.sum) are correct.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding bingo for Go tool dependency management. It is concise, specific, and directly reflects the core purpose of the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

@ciaranRoche ciaranRoche force-pushed the add-bingo-tool-management branch from 887ca37 to 381c18d Compare December 2, 2025 13:11
Copy link

@coderabbitai coderabbitai bot left a 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 binary target is missing GOEXPERIMENT=boringcrypto while the install target (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-api

Based on coding guidelines requiring FIPS-compliant crypto builds, this ensures consistency between make binary and make install.

♻️ Duplicate comments (1)
.bingo/gotestsum.mod (1)

1-5: Mirror the go directive fix from golangci-lint’s bingo module

This file has the same go 1.25.0 directive pattern as .bingo/golangci-lint.mod. Whatever you decide there (e.g. correcting to a valid go directive 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 to go mod download matches bingo-managed tooling

Switching this step from manual gotestsum installation to go mod download aligns with the new bingo-based flow where make test/make lint pull in pinned tooling automatically. The updated text is clear.

Optionally, you could add a brief note here that the first make test / make lint run will auto-build the pinned tools via bingo, so contributors know they don’t need separate go install steps.

.bingo/README.md (1)

1-13: Bingo README is clear and aligned with the Makefile integration

The README accurately describes how to install tools with bingo get, how to wire .bingo/Variables.mk into 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

📥 Commits

Reviewing files that changed from the base of the PR and between 87558ae and 887ca37.

⛔ Files ignored due to path filters (2)
  • .bingo/golangci-lint.sum is excluded by !**/*.sum
  • .bingo/gotestsum.sum is 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.md
  • 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: Use Go 1.24.9 or later for all builds and ensure Go version compatibility

Applied to files:

  • .bingo/variables.env
  • .bingo/README.md
  • 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:

  • .bingo/variables.env
  • .bingo/golangci-lint.mod
  • .bingo/gotestsum.mod
  • 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/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.mod
  • 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 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 correct

The 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 workflow

The 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 good

This helper correctly computes GOBIN and exposes shell variables for the version-suffixed tool binaries, matching how .bingo/Variables.mk builds 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 correct

The Variables.mk fragment correctly derives BINGO_DIR, GOBIN, and host GOOS/GOARCH and defines GOLANGCI_LINT / GOTESTSUM targets 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 instead

The go 1.25.0 format is valid in go.mod files — Go accepts major.minor.patch syntax 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.mk makes 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_ENV variables (unit_testing for unit tests; integration_testing for integration tests)

Test logic and flags are preserved.

Copy link

@coderabbitai coderabbitai bot left a 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 workflow

Switching this step from manually installing gotestsum to a generic go mod download fits the new Bingo-managed tooling flow and keeps the setup sequence clear. You might optionally add a brief note that make test / make lint will 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 to test, ci-test-unit, ci-test-integration, and test-integration and invoking $(GOTESTSUM) keeps all test flows on the pinned gotestsum version, while still honoring OCM_ENV=unit_testing / integration_testing and 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-verbose so 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

📥 Commits

Reviewing files that changed from the base of the PR and between 887ca37 and 381c18d.

⛔ Files ignored due to path filters (2)
  • .bingo/golangci-lint.sum is excluded by !**/*.sum
  • .bingo/gotestsum.sum is 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:

  • Makefile
  • PREREQUISITES.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:

  • Makefile
  • PREREQUISITES.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:

  • Makefile
  • 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,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 template

The GOBIN resolution and the version-suffixed GOLANGCI_LINT / GOTESTSUM paths are in line with standard Bingo output and should work fine when sourced in a typical bash/zsh shell. Given the DO NOT EDIT note and the fact this is generated, I wouldn’t hand-tune it further.

PREREQUISITES.md (1)

50-63: Quick verification now matches Podman-based tooling

Updating the verification step to podman --version is 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 appropriate

Pulling in .bingo/Variables.mk at 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.mk stays 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>
@ciaranRoche ciaranRoche force-pushed the add-bingo-tool-management branch from 381c18d to 24674a6 Compare December 2, 2025 13:28
Copy link

@coderabbitai coderabbitai bot left a 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: switch run/docs to use $(container_tool) / Podman for consistency

This target still uses docker run directly, whereas the rest of the Makefile standardizes on container_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

📥 Commits

Reviewing files that changed from the base of the PR and between 381c18d and 24674a6.

⛔ Files ignored due to path filters (2)
  • .bingo/golangci-lint.sum is excluded by !**/*.sum
  • .bingo/gotestsum.sum is 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.md
  • 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: Use Go 1.24.9 or later for all builds and ensure Go version compatibility

Applied to files:

  • PREREQUISITES.md
  • 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 {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.md
  • Makefile
  • .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 model

The 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 correct

The host-aware, pinned builds for golangci-lint and gotestsum via GOBIN and per-tool .mod files 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.mk cleanly integrates pinned tooling

Pulling in the Bingo-generated variables at the top centralizes tool paths and versions so make lint/make test can 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 .bingo directory 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-lint

Having lint: $(GOLANGCI_LINT) ensures the pinned linter is built on first use and then reused, while keeping the existing arguments (-e unused and package patterns) intact.

Please run make lint once locally or in CI to confirm the Bingo-pinned golangci-lint version behaves as expected with your current Go toolchain and codebase.


126-126: Binary build now aligns with FIPS/boringcrypto guideline

Setting CGO_ENABLED=$(CGO_ENABLED) GOEXPERIMENT=boringcrypto on the binary build matches the existing install behavior and satisfies the requirement for FIPS-compliant crypto builds for the main hyperfleet binary.

Please confirm your Go version and target platforms support the boringcrypto experiment (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 conventions

Wiring test, ci-test-unit, ci-test-integration, and test-integration to depend on $(GOTESTSUM) and invoke it centralizes the test runner version, while still honoring OCM_ENV=unit_testing/OCM_ENV=integration_testing and 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 pinned gotestsum version and TEST_SUMMARY_FORMAT behave 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

@rh-amarin
Copy link
Contributor

/lgtm

@openshift-ci
Copy link

openshift-ci bot commented Dec 3, 2025

[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

Details Needs approval from an approver in each of these files:
  • OWNERS [ciaranRoche,rh-amarin]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@rh-amarin rh-amarin merged commit fd74272 into openshift-hyperfleet:main Dec 3, 2025
2 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