NE-2094: Use go.mod tool directives - #316
Conversation
Go 1.24 introduced the `tool` directive in go.mod for tracking executable tool dependencies, replacing the previous tools.go blank-import convention. Migrate the five executable tool imports to go.mod tool directives and retain tools/tools.go only for the non-executable CRD manifests data package, which cannot use the `tool` directive. This commit resolves NE-2094. https://issues.redhat.com/browse/NE-2094 * go.mod: Add tool directive block for golangci-lint, yq/v4, setup-envtest, controller-gen, kustomize/v5. Remove their entries from the require block. * go.sum: Refresh checksums. * tools/tools.go: Remove executable tool blank imports (golangci-lint, yq/v4, setup-envtest, controller-gen, kustomize/v5). Keep only the non-executable crd-manifests import. Remove redundant +build constraint. Add package comment explaining purpose. * vendor/: Update vendored dependencies. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@Miciah: This pull request references NE-2094 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
[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 |
|
No actionable comments were generated in the recent review. 🎉 📝 WalkthroughWalkthroughUpdated Suggested reviewers: Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 error)
✅ Passed checks (14 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (2.12.2)Error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions Comment |
|
@Miciah: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Go 1.24 introduced the
tooldirective ingo.modfor tracking executable tool dependencies, replacing the previoustools.goblank-import convention. Migrate the five executable tool imports togo.modtooldirectives and retaintools/tools.goonly for the non-executable CRD manifests data package, which cannot use thetooldirective.