-
Notifications
You must be signed in to change notification settings - Fork 2.8k
chore(controller-gen): move tools under go tools #5878
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
base: master
Are you sure you want to change the base?
chore(controller-gen): move tools under go tools #5878
Conversation
Signed-off-by: ivan katliarchuk <[email protected]>
Signed-off-by: ivan katliarchuk <[email protected]>
Pull Request Test Coverage Report for Build 18130553619Details
💛 - Coveralls |
Signed-off-by: ivan katliarchuk <[email protected]>
Signed-off-by: ivan katliarchuk <[email protected]>
Signed-off-by: ivan katliarchuk <[email protected]>
Signed-off-by: ivan katliarchuk <[email protected]>
Signed-off-by: ivan katliarchuk <[email protected]>
Signed-off-by: ivan katliarchuk <[email protected]>
Signed-off-by: ivan katliarchuk <[email protected]>
Signed-off-by: ivan katliarchuk <[email protected]>
Signed-off-by: ivan katliarchuk <[email protected]>
Signed-off-by: ivan katliarchuk <[email protected]>
Signed-off-by: ivan katliarchuk <[email protected]>
tool ( | ||
github.com/google/yamlfmt/cmd/yamlfmt | ||
github.com/mikefarah/yq/v4 | ||
sigs.k8s.io/controller-tools/cmd/controller-gen |
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.
Shouldn't we have a version set here ?
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.
Like the v0.17.2 ?
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.
Yeah, this is just my understing
The selected lines in go.tool.mod list tools without versions because, in a Go toolchain file, the tool block specifies the import paths of command-line tools to be installed, not their versions. The actual versions are managed in the require block below, which ensures the correct versions are used when the tools are installed. This separation keeps the tool list clean and version management centralized.
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.
Example for vacuum
tool github.com/daveshanley/vacuum
Line 113 in c1894f8
github.com/daveshanley/vacuum v0.17.8 // indirect |
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.
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.
I'll pin similar question mattermost/mattermost-plugin-starter-template#217 (comment). There are multiple links to read trhough pros/cons if you have spare time.
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.
To me also it's not a blocker, just weird.
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.
/lgtm
@AndrewCharlesHay @vflaux Any comments ?
/approve |
/approve cancel |
[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.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What does it do ?
While was testing PR #5814 find out that generated code is missing update.
The change was introduced here #5659
Solution is from here https://www.alexedwards.net/blog/how-to-manage-tool-dependencies-in-go-1.24-plus#using-a-separate-modfile-for-tools
follow-up:
vaccum
tool under go.tools.modMotivation
Add unit-tests for CRD generators in follow-up code, similar to https://github.com/kubernetes-sigs/external-dns/tree/master/internal/gen/docs
More