-
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
🐛 For go/v3 plugin: Avoid to add duplicated code fragments #2619
Conversation
Hi @mrkm4ntr. 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/plugins/golang/v3/scaffolds/internal/templates/api/webhook_suitetest.go
Show resolved
Hide resolved
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 🥇
Following some questions:
a) Is your goal here to begin to use "k8s.io/api/admission/v1" instead of "k8s.io/api/admission/v1beta1"?
b) Why it is a bug? Could you please clarifies? what are the problems faced because of this? Could please raise an issue for that? Then, we can properly check it. WDYT?
Additionally, see that: when we change any scaffold we need to use the command make generate
to update the samples under the testdata dir.
Sorry, my main goal is deduplicate following code. This is added again and again per every kubebuilder create webhook. err = admissionv1beta1.AddToScheme(scheme)
Expect(err).NotTo(HaveOccurred()) I will change the PR title and commit message. I also addressed this TODO message, but I will split this PR from this.
|
Of course, I already executed |
ad9a02d
to
4506768
Compare
4506768
to
252a250
Compare
@camilamacedo86 Thank you for your comments. I changed the goal of this PR. PTAL. |
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 the contribution and for work on the review of this PR 🥇
It makes sense for me 👍
/approved
/ok-to-test
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: camilamacedo86, mrkm4ntr 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 |
/hold cancel |
/test pull-kubebuilder-e2e-k8s-1-18-8 |
/lgtm |
Every time we create webhook for existing project, the following duplicated code are injected.