Skip to content

fix: strip go.mod comments from Makefile tool versions - #144

Open
MaxRink wants to merge 1 commit into
telekom:mainfrom
MaxRink:fix/envtest-version
Open

fix: strip go.mod comments from Makefile tool versions#144
MaxRink wants to merge 1 commit into
telekom:mainfrom
MaxRink:fix/envtest-version

Conversation

@MaxRink

@MaxRink MaxRink commented Apr 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Makefile tool-version parsing now captures only version tokens from go.mod, preventing trailing comments such as // indirect from being included in go install arguments.

Changes

  • Restrict CONTROLLER_GEN_VERSION extraction to the token before the first space.
  • Apply the same parsing to ENVTEST_VERSION.

Validation

  • Checked both extraction patterns against go.mod at this PR head; they return version tokens without trailing comments.

@MaxRink
MaxRink requested a review from schrej as a code owner April 12, 2026 20:52
Copilot AI review requested due to automatic review settings April 12, 2026 20:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR hardens the build tooling by fixing how the Makefile extracts ENVTEST_VERSION from go.mod, ensuring trailing // indirect comments don’t get included and break go install for setup-envtest.

Changes:

  • Update the sed capture for ENVTEST_VERSION to stop at the first space, stripping any trailing comments.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Makefile Outdated
@MaxRink
MaxRink force-pushed the fix/envtest-version branch from 69b1dff to 9ecf247 Compare May 20, 2026 09:10
@MaxRink
MaxRink force-pushed the fix/envtest-version branch from 9ecf247 to 29d1a1d Compare June 7, 2026 15:38
@MaxRink MaxRink changed the title fix: strip go.mod comments from ENVTEST_VERSION sed extraction fix: strip go.mod comments from Makefile tool versions Aug 21, 2026
@MaxRink
MaxRink force-pushed the fix/envtest-version branch from 29d1a1d to 7398f8a Compare August 21, 2026 09:19
Extract only the version token for controller-gen and setup-envtest so trailing go.mod comments are not passed to go install.
@MaxRink
MaxRink force-pushed the fix/envtest-version branch from 7398f8a to 2bfa9d3 Compare August 21, 2026 09:25
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