-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
✨ (go/v4) : Ensure versioning of tools and binaries installed via Makefile #3718
✨ (go/v4) : Ensure versioning of tools and binaries installed via Makefile #3718
Conversation
|
Welcome @lukas016! |
Hi @lukas016. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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/test-infra repository. |
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 ✅
/assign @camilamacedo86 |
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.
Thank you for your contribution 🥇
Could you please:
a) Run make generate
then the changes made will result in the samples under testdata and docs
b) Squash the commits. we can only merge when we have 1 commit in the PR
/ok-to-test
Could you please give a help 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.
Thanks for the contribution! The changes look good to me. One thing to add is that the underlying KB binaries which are installed by setup-envtest would still remain until they are cleaned up. This is something we need not handle here, but just mentioning because a full cleanup would still not occur as mentioned in the issue.
Thinking about it, an alternative to handle it is to do a setup-envtest cleanup
if we identify a mismatched version from use
command. But we can handle that in follow up.
@lukas016 we still need to run make generate
to update the testdata.
I will implement suggestions today and i will call make generate too. |
da193a0
to
0f9becb
Compare
i fixed all conversions, called |
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.
Could you please rebase with master?
It has changes that are merged already.
Thank you
0f9becb
to
cce61e1
Compare
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 did not test manually but for me shows fine
/lgtm
rm -rf $(LOCALBIN)/kustomize; \ | ||
fi | ||
test -s $(LOCALBIN)/kustomize || GOBIN=$(LOCALBIN) GO111MODULE=on go install sigs.k8s.io/kustomize/kustomize/v5@$(KUSTOMIZE_VERSION) | ||
$(call go-install-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/v5,$(KUSTOMIZE_VERSION)) |
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.
@varshaprasad96 @everettraven It seems to make a lot of sense for Kubebuilder since we do not support any other language. However, I just want to come to your attention because when the bump of a new release is done in Operator SDK for Helm/Ansible plugins, it will be required. Just take this line and replace it to use the script instead since going installed locally is not a pre-requisite.
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.
Based in the comment #3718 (review) either
it seems ready to go, so I am approving this one.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: camilamacedo86, lukas016, mateusoliveira43 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 |
@@ -54,9 +58,30 @@ func (f *Makefile) SetTemplateDefaults() error { | |||
f.Image = "controller:latest" | |||
} | |||
|
|||
if f.ControllerRuntimeReleaseBranchName == "" { |
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.
@mateusoliveira43 @varshaprasad96
This part we will need to came back to use latest
we cannot relay on the branch.
We need to relay on the tag
Downloading sigs.k8s.io/controller-runtime/tools/[email protected]
go: sigs.k8s.io/controller-runtime/tools/[email protected]: sigs.k8s.io/controller-runtime/tools/[email protected]: invalid version: unknown revision release-0.17
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, checked and the last release is 0.17, but there is no branch to it. Probably need some change in controller-runtime to allow use of non-latest with setup-envtest
Fixes #3715
PR solves primary issue with synchronization of tools version between developers where older copies of repo can use older versions of binaries and it isn't updated by makefile.
PR unified way how tools are installed and adding better support for versioning of binary based on binary names.
It add new function into makefile and modified installation targets for tools.
It contains more specific version of tool setup-envtest, which was set to release-0.16 branch because this tools doesn't support proper versioning. It isn't ideally solution but still better as latest.
output: