-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
✨ Use ErrorIfCRDPathMissing in EnvTest #1765
✨ Use ErrorIfCRDPathMissing in EnvTest #1765
Conversation
Welcome @jamielennox! |
Hi @jamielennox. 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. |
pkg/plugin/v2/scaffolds/internal/templates/controller/controller_suitetest.go
Outdated
Show resolved
Hide resolved
pkg/plugin/v3/scaffolds/internal/templates/config/controller/controller_suitetest.go
Outdated
Show resolved
Hide resolved
I'm not sure how you handle changes here. You can squash the PR or i can merge them and force push. Let me know. |
Hi @jamielennox You need to squash the commits into 1 commit and force push. Thanks |
d1bf808
to
ee14f79
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.
Code-wise, the change LGTM. I don't know what is implied by this flag so someone with better knowledge about EnvTest
should aprove it.
/lgtm
It is a good to have functionality, when the CRD path specified envtest is not present, it throws error (which it should be). With current implementation even if the CRD is not present, the scaffolded suite doesn't throw error. Running tests before
Running tests before
Running test with these changes after
IMO, this change is LGTM. PTAL for |
/approve |
pkg/plugin/v3/scaffolds/internal/templates/config/controller/controller_suitetest.go
Outdated
Show resolved
Hide resolved
/hold Until the fix #1770 get merged and this one realised with master. |
HI @jamielennox, Could you please rebase it with the master, run make generate and push? /hold |
ee14f79
to
6db8400
Compare
I've very simply rebased this, reading #1770 maybe we want to only set true on WireResource? |
Probably yes |
6db8400
to
33f9e41
Compare
Hi @jamielennox, Could you check what will be the behaviour faced after this change in the scenario #1765 (comment)? Could you please let us know? |
Hi @jamielennox, Could you please get it rebased with the master for we are able to move forward with it? |
pkg/plugin/v3/scaffolds/internal/templates/controllers/controller_suitetest.go
Outdated
Show resolved
Hide resolved
33f9e41
to
be655b3
Compare
pkg/plugins/golang/v3/scaffolds/internal/templates/api/webhook_suitetest.go
Outdated
Show resolved
Hide resolved
be655b3
to
2813b8f
Compare
The error message if the path to CRDs is missing is misleading. envtest.Environment has an option to throw a sensible error here if the path is wrong and for kubebuilder it would be likely we always want to upload our CRDs.
2813b8f
to
0a5c604
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.
/approve
/test pull-kubebuilder-e2e-k8s-1-16-15 |
/restest |
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.
It receives approval of 2 very active contributors/maintainers (@prafull01 and @Adirio)
The changes here shows fine for me as well.
Great job @jamielennox 🥇
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Adirio, camilamacedo86, jamielennox, prafull01 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 |
/lgtm |
The error message if the path to CRDs is missing is misleading.
envtest.Environment has an option to throw a sensible error here if the
path is wrong and for kubebuilder it would be likely we always want to
upload our CRDs.