-
Notifications
You must be signed in to change notification settings - Fork 96
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
Fix compiler and test failures with latest version of sigs.k8s.io/controller-runtime #7979
Fix compiler and test failures with latest version of sigs.k8s.io/controller-runtime #7979
Conversation
Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>
@@ -74,7 +77,7 @@ func SetupDeploymentTest(t *testing.T) (*mockRadiusClient, client.Client) { | |||
err = (&DeploymentReconciler{ | |||
Client: mgr.GetClient(), | |||
Scheme: mgr.GetScheme(), | |||
EventRecorder: mgr.GetEventRecorderFor("recipe-controller"), | |||
EventRecorder: mgr.GetEventRecorderFor("deployment-controller"), |
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.
👍
Looks like
Do you know if I agree with suppressing the warning. It's probably being triggered because our tests will register a new instance of the same controller for each test. |
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.
Changes in this PR so far look right 👍. Will look again after you resolve build issues.
I'm having an issue with the Validation to prevent duplication of controller names was added in PR2902, and a few days later PR2918 added the |
Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>
Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>
Thanks. Based on this comment, we're in exactly the same test scenario as the user here: kubernetes-sigs/controller-runtime#2902 (comment) Sounds like it's intended we use |
@rynowak I needed to bump the |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7979 +/- ##
=======================================
Coverage 60.61% 60.62%
=======================================
Files 534 534
Lines 28488 28484 -4
=======================================
Hits 17269 17269
+ Misses 9702 9698 -4
Partials 1517 1517 ☔ View full report in Codecov by Sentry. |
Radius functional test overview
Click here to see the list of tools in the current test run
Test Status⌛ Building Radius and pushing container images for functional tests... |
Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>
Radius functional test overview
Click here to see the list of tools in the current test run
Test Status⌛ Building Radius and pushing container images for functional tests... |
Description
A recent change to the
controller-runtime
package caused Radius compilation errors and test failures, as referenced in #7882. Breaking changes incontroller-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:
go.mod
andgo.sum
.controller-runtime/pkg/client
options toclient-go/rest/Config
, as required by the changes incontroller-runtime
.SkipNameValidation
configuration parameter to unit tests for creating new controllers.cli/controller/reconciler
intoshared-test.go
.Type of change
Fixes: #7882
Contributor checklist
Please verify that the PR meets the following requirements, where applicable: