Skip to content

HYPERFLEET-1098 - fix: make go mod tidy and make generate work#163

Open
rh-amarin wants to merge 1 commit into
openshift-hyperfleet:mainfrom
rh-amarin:HYPERFLEET-1098
Open

HYPERFLEET-1098 - fix: make go mod tidy and make generate work#163
rh-amarin wants to merge 1 commit into
openshift-hyperfleet:mainfrom
rh-amarin:HYPERFLEET-1098

Conversation

@rh-amarin
Copy link
Copy Markdown
Contributor

Summary

When introducing #155 it broke go mod tidy which will remove the import of the hyperfleet-api-spec making make generate to fail later

This PR restores the import to satisfy the build tooling

@openshift-ci openshift-ci Bot requested review from kuudori and rafabene May 15, 2026 17:38
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 15, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign ciaranroche for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 15, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 961fbfd6-7019-4285-bfe7-2edad467f5a3

📥 Commits

Reviewing files that changed from the base of the PR and between d898158 and 2820411.

📒 Files selected for processing (1)
  • hack/tools.go

📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Updated tooling configuration to ensure proper dependency management for build tools and modules.

Walkthrough

This PR adds a single file, hack/tools.go, which follows the standard Go pattern for managing tooling dependencies. The file uses a //go:build tools build constraint to exclude it from runtime builds and contains a blank import of github.com/openshift-hyperfleet/hyperfleet-api-spec/schemas. This pattern ensures the dependency is recorded in the module's go.mod file without being compiled into the final binary.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly references the issue (HYPERFLEET-1098) and describes the main fix: restoring go mod tidy and make generate functionality after a breaking change.
Description check ✅ Passed The description is directly related to the changeset, explaining the problem caused by PR 155, the impact on build tooling, and how this PR restores the necessary import.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Comment thread hack/tools.go
Comment on lines +1 to +5
//go:build tools

package hack

import _ "github.com/openshift-hyperfleet/hyperfleet-api-spec/schemas"
Copy link
Copy Markdown
Contributor

@pnguyen44 pnguyen44 May 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR places it at hack/tools.go. Was hack/ a deliberate choice? It does seem like a natural fit since the directory already holds build tooling, and it keeps the root directory clean. If hack/ is the preferred location, can you update the ticket acceptance criteria to match?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants