-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
⚠️ feat: new features about support warning with webhook #2014
Conversation
Hi @STRRL. 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.
Thanks for your PR @STRRL!
I'm not familiar enough with project conventions to provide detailed feedback. From the library user perspective, one e2e test would be nice, with a code example how errors can be created, but I don't know if there are facilities prepared to have something like this and it's perhaps out of scope for this PR.
Overall it looks OK. Unfortunately, I don't have resources to test with with CABPK at the moment to verify e2e that the warnings produced are nicely showed by kubectl
.
/ok-to-test |
/test pull-controller-runtime-test-master |
6f227af
to
f246cc3
Compare
happy to see new progress on this PR; I have fixed the test cases and linter :) PTAL @camilamacedo86 |
Would this implementation effectively supersede the existing high-level validator interfaces? At first glance, it seems like it has identical functionality except that it can also return warnings? I worry about maintaining both (almost identical) implementations over time. I commented over on the issue, but I think we could use the existing interfaces and have a custom error type that includes the warnings like you suggest. |
I agree. We should definitely avoid introducing a third set of interfaces. I'll continue on the issue. Let's keep the discussion there for now to avoid concurrent threads. |
just mention the discussion result: we prefer to break the API instead of introducing a new type called |
Hi! I have updated this PR with these changes:
|
/cc @invidian @sbueringer |
Thx sorry for the late response, will review soon |
Signed-off-by: STRRL <im@strrl.dev>
@STRRL: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
Looks good thx! @STRRL can you please squash the commits? /lgtm |
/assign @vincepri |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: STRRL, vincepri 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 |
- controller runtime v0.15 contains breaking changes where Validator interfaces have been modified to include warning in return types: kubernetes-sigs/controller-runtime#2014 other breaking changes do not affect us
- controller runtime v0.15 contains breaking changes where Validator interfaces have been modified to include warning in return types: kubernetes-sigs/controller-runtime#2014 other breaking changes do not affect us
https://github.com/kubernetes-sigs/controller-runtime/releases/tag/v0.15.0 * Make `*http.Client` configurable and use/share the same client by default kubernetes-sigs/controller-runtime#2122 * Remove dependency injection functions kubernetes-sigs/controller-runtime#2134, kubernetes-sigs/controller-runtime#2120 * Add context to EventHandler(s) kubernetes-sigs/controller-runtime#2139 * `Validator` and `CustomValidator` interfaces have been modified to allow returning warnings kubernetes-sigs/controller-runtime#2014 * operator-framework is also pinned to ecb9be48837 until a new release is cut supporting controller-runtime v0.15.0 Signed-off-by: Lee Yarwood <lyarwood@redhat.com>
https://github.com/kubernetes-sigs/controller-runtime/releases/tag/v0.15.0 * Make `*http.Client` configurable and use/share the same client by default kubernetes-sigs/controller-runtime#2122 * Remove dependency injection functions kubernetes-sigs/controller-runtime#2134, kubernetes-sigs/controller-runtime#2120 * Add context to EventHandler(s) kubernetes-sigs/controller-runtime#2139 * `Validator` and `CustomValidator` interfaces have been modified to allow returning warnings kubernetes-sigs/controller-runtime#2014 * operator-framework is also pinned to ecb9be48837 until a new release is cut supporting controller-runtime v0.15.0 Signed-off-by: Lee Yarwood <lyarwood@redhat.com>
https://github.com/kubernetes-sigs/controller-runtime/releases/tag/v0.15.0 * Make `*http.Client` configurable and use/share the same client by default kubernetes-sigs/controller-runtime#2122 * Remove dependency injection functions kubernetes-sigs/controller-runtime#2134, kubernetes-sigs/controller-runtime#2120 * Add context to EventHandler(s) kubernetes-sigs/controller-runtime#2139 * `Validator` and `CustomValidator` interfaces have been modified to allow returning warnings kubernetes-sigs/controller-runtime#2014 * operator-framework is also pinned to ecb9be48837 until a new release is cut supporting controller-runtime v0.15.0 Signed-off-by: Lee Yarwood <lyarwood@redhat.com>
Signed-off-by: STRRL im@strrl.dev
close #1896
Two new interfaces
ValidatorWarn
andCustomValidatorWarn
, for support warnings in validating webhooks.