✨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 <troy0820@users.noreply.github.com>
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 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 kubernetes-sigs/prow repository. |
|
/lgtm |
|
LGTM label has been added. DetailsGit 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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@sbueringer: new pull request created: #3175 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 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.
| // -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.
@sbueringer I can make a PR for this to fix the godoc rendering with the correct comment.
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 versionto 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