-
Notifications
You must be signed in to change notification settings - Fork 1.2k
✨Add RELEASE_TAG to tools/setup-envtest to show binary version with setup-envtest version #3166
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
✨Add RELEASE_TAG to tools/setup-envtest to show binary version with setup-envtest version #3166
Conversation
a400b11
to
e6fb8d3
Compare
I think setup-envtest should show the exact version. We are also publishing setup-envtest binaries on every release and it's not ideal if that just shows the branch (there was some similar work in controller-gen recently: kubernetes-sigs/controller-tools#1046. In general I would expect setup-envtest and controller-gen to behave the same) |
This makes sense. I made the assumption with how we install to provide the same installation version technique. I can change this to provide the same as controller-gen. |
28eee84
to
7120bc5
Compare
7120bc5
to
51c6d75
Compare
5b38dbb
to
b81bc88
Compare
Signed-off-by: Troy Connor <[email protected]>
b81bc88
to
2cc7686
Compare
Thx! I'll cherry-pick so we can verify this e2e with the next patch release /cherry-pick release-0.20 |
@sbueringer: once the present PR merges, I will cherry-pick it on top of In 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 kubernetes-sigs/prow repository. |
/lgtm |
LGTM label has been added. Git tree hash: cc081df330d194cd9bc15b0206524629dec178d5
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sbueringer, troy0820 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@sbueringer: new pull request created: #3175 In 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 kubernetes-sigs/prow repository. |
import "runtime/debug" | ||
|
||
// Version to be set using ldflags: | ||
// -ldflags "-X sigs.k8s.io/controller-tools/pkg/version.version=v1.0.0" |
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.
// -ldflags "-X sigs.k8s.io/controller-tools/pkg/version.version=v1.0.0" | |
// -ldflags "-X sigs.k8s.io/controller-runtime/tools/setup-envtest/version.version=v1.0.0" | |
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.
@sbueringer I can make a PR for this to fix the godoc rendering with the correct comment.
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.
Ups. Yup, thx!
With the setup-envtest binary, it is difficult to determine the version of the binary that is installed. This will allow the user to use the command
setup-envtest version
to see what version of the binary is installed.Note: This is targeting the branch when built and not a specific tag. The setup-envtest instructions for installation shows to target the release branch for specific versionsThis will target the release tag defined in the GitHub action when binaries are built.
Resolves #3158