-
Couldn't load subscription status.
- Fork 119
Fix Unit tests could not run #253
Conversation
|
Hi @mochizuki875. 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. |
|
/assign @adrianludwin |
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.
Very cool change, thanks! That's been an annoying part of the setup for a while now.
Just one question before we submit. If you make a change, please squash your commits so there's only one commit in this PR - thanks :)
/ok-to-test
Makefile
Outdated
| @echo | ||
| @echo "If tests fail due to no matches for kind \"CustomResourceDefinition\" in version \"apiextensions.k8s.io/v1\"," | ||
| @echo "please remove the old kubebuilder and reinstall it - https://book.kubebuilder.io/quick-start.html#installation" | ||
| @echo |
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.
Can these lines be removed now? I think the makefile now does what this is telling the user to do?
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.
Can these lines be removed now?
I think so.
Now, kubebuilder is installed as single binary like this(/usr/local/bin/kubebuilder) not like previously.
So these lines may be useless and I removed them.
thx!
2bb930f to
d0cbcb3
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mochizuki875 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 |
|
Actually, there's a better way to do this - I've added setup-envtest to be hermetic as a part of #257. So you can cancel this PR, but thanks for submitting it as I've copied some of the key lines into my PR! |
E2Es broke a few days ago, likely when test-infra upgraded to 1.20. I also couldn't run staticcheck on my Google workstation, which has 1.20, with the same failure message. Upgrading staticcheck fixed the problem; I also took the opportunity to match the test-infra krte image as well as the Golang version (which caused some minor reformatting), and also made the integ tests hermetic by including the setup-envtest tool (bug kubernetes-retired#252, based on an approach suggested in kubernetes-retired#253). Tested: couldn't build on my workstation on Go 1.20 before this change; can after it. Can also run integ tests after deleting local output of setup-envtest.
E2Es broke a few days ago, likely when test-infra upgraded to 1.20. I also couldn't run staticcheck on my Google workstation, which has 1.20, with the same failure message. Upgrading staticcheck fixed the problem; I also took the opportunity to match the test-infra krte image as well as the Golang version (which caused some minor reformatting), and also made the integ tests hermetic by including the setup-envtest tool (bug kubernetes-retired#252, based on an approach suggested in kubernetes-retired#253). Tested: couldn't build on my workstation on Go 1.20 before this change; can after it. Can also run integ tests after deleting local output of setup-envtest.
|
This should be fixed now, please lmk if it's not! |
|
PR needs rebase. 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. |
|
@adrianludwin |
What type of PR is this?:
/kind bug
What this PR does / why we need it:
Fix
Makefileto setup envtest.When
make testis executed, downloadenvtest-setupand envtest binaries locally(/hack) if necessary.This fix references Makefile generated by kubebuilder.
Tested:
make testfails without this fix and passes with it.Which issue(s) this PR fixes:
#252