-
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
⚠️ Remove options.WarningHandler #2903
⚠️ Remove options.WarningHandler #2903
Conversation
- Removal does not change the default behavior of the client, which is to de-duplicate and surface API warnings. - Uses config.WarningHandler to override default behavior. Describes this in the client.New godoc, adds an example test to demonstrate it, and a unit test to verify it.
@dlipovetsky: 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-sigs/prow repository. I understand the commands that are listed here. |
Thx! /lgtm |
LGTM label has been added. Git tree hash: 2623bb44e8684a5b63a238d1fd1b8a384e7ff334
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alvaroaleman, dlipovetsky 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 |
…troller-runtime (#7979) # Description A [recent change](kubernetes-sigs/controller-runtime#2903) to the [`controller-runtime`](https://github.com/kubernetes-sigs/controller-runtime/) package caused Radius compilation errors and test failures, as referenced in #7882. Breaking changes in `controller-runtime` include the removal of a configuration option, and a new validation that prevents duplicate controller names. This PR makes changes to update the packages referenced, fix the compilation errors, and address the test failures. Changes include: - Updates to `go.mod` and `go.sum`. - Fixed compiler errors by moving the warning suppression configuration from the `controller-runtime/pkg/client` options to `client-go/rest/Config`, as required by the changes in `controller-runtime`. - Fixed broken tests by adding the `SkipNameValidation` configuration parameter to unit tests for creating new controllers. - Some refactoring of commonly shared test functions and constants in `cli/controller/reconciler` into `shared-test.go`. > NOTE: The compilation fix in this PR did not change the behavior of the `rad` cli--only the tests were changed. The assumption is that `rad` does not ever create controllers with duplicate names, so suppressing the duplicate controller name validation is not necessary, even though it is necessary in the automated tests. ## Type of change - This pull request fixes a bug in Radius and has an approved issue (issue link required). Fixes: #7882 ## Contributor checklist Please verify that the PR meets the following requirements, where applicable: - [ ] An overview of proposed schema changes is included in a linked GitHub issue. - [ ] A design document PR is created in the [design-notes repository](https://github.com/radius-project/design-notes/), if new APIs are being introduced. - [ ] If applicable, design document has been reviewed and approved by Radius maintainers/approvers. - [ ] A PR for the [samples repository](https://github.com/radius-project/samples) is created, if existing samples are affected by the changes in this PR. - [ ] A PR for the [documentation repository](https://github.com/radius-project/docs) is created, if the changes in this PR affect the documentation or any user facing updates are made. - [ ] A PR for the [recipes repository](https://github.com/radius-project/recipes) is created, if existing recipes are affected by the changes in this PR. --------- Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>
As a follow-up to #2887, and #2896, this removes client.Options.WarningHandler.
Instead of using client.Options.WarningHandler users define config.WarningHandler. This change:
Note: Because the PR changes the go module public API, the "pull-controller-runtime-apidiff" test fails, as expected.