Skip to content
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

Test Failures with latest version of sigs.k8s.io/controller-runtime #7882

Closed
1 task
lakshmimsft opened this issue Sep 4, 2024 · 4 comments · Fixed by #7979
Closed
1 task

Test Failures with latest version of sigs.k8s.io/controller-runtime #7882

lakshmimsft opened this issue Sep 4, 2024 · 4 comments · Fixed by #7979
Assignees
Labels
bug Something is broken or not working as expected important This item is a high priority Issue we intend to address as soon as possible triaged This issue has been reviewed and triaged

Comments

@lakshmimsft
Copy link
Contributor

lakshmimsft commented Sep 4, 2024

Steps to reproduce

  1. Checkout branch of latest dependabot PR with updates to sigs.k8s.io/controller-runtime eg. Bump the all group with 9 updates #7878
  2. run
           go get -u sigs.k8s.io/controller-runtime@latest
           go get -u k8s.io/client-go@latest

ensure go.mod is updated with sigs.k8s.io/controller-runtime v0.19.0 and k8s.io/client-go v0.31.0
4. run go mod tidy
5. run make build. Update code for errors (remove field WarningHandler as indicated in build errors):

        pkg/ucp/dataprovider/factory.go:67:3: unknown field WarningHandler in struct literal of type client.Options
        pkg/ucp/dataprovider/factory.go:67:33: undefined: runtimeclient.WarningHandlerOptions   
  1. make build should now run fine.
  2. run make test. this should return errors similar to for ~9 unit tests testing reconciler:
=== FAIL: pkg/controller/reconciler Test_DeploymentReconciler_ChangeEnvironmentAndApplication (0.00s)
    deployment_reconciler_test.go:81: 
                Error Trace:    ../pkg/controller/reconciler/deployment_reconciler_test.go:81
                                                        ../pkg/controller/reconciler/deployment_reconciler_test.go:142
                Error:          Received unexpected error:
                                controller with name deployment already exists. Controller names must be unique to avoid multiple controllers reporting to the same metric
                Test:           Test_DeploymentReconciler_ChangeEnvironmentAndApplication

=== FAIL: pkg/controller/reconciler Test_DeploymentReconciler_RadiusEnabled_ThenRadiusDisabled (0.00s)
    deployment_reconciler_test.go:81: 
                Error Trace:    ../pkg/controller/reconciler/deployment_reconciler_test.go:81
                                                        ../pkg/controller/reconciler/deployment_reconciler_test.go:216
                Error:          Received unexpected error:
                                controller with name deployment already exists. Controller names must be unique to avoid multiple controllers reporting to the same metric
                Test:           Test_DeploymentReconciler_RadiusEnabled_ThenRadiusDisabled

Observed behavior

Unit Tests for controller failing with latest version of sigs.k8s.io/controller-runtime and related dependencies

Desired behavior

Unit tests should not fail

Workaround

Currently, we have not yet updated the codebase to the latest version of sigs.k8s.io/controller-runtime and it's related dependencies.

rad Version

The latest version of the envtest tool used for unit testing in the controller-runtime project appears to be v0.17.0. We need to investigate if there is an incompatibility issue or if a code update is needed to ensure unit tests run successfully.

Operating system

No response

Additional context

No response

Would you like to support us?

  • Yes, I would like to support you

AB#13145

@lakshmimsft lakshmimsft added the bug Something is broken or not working as expected label Sep 4, 2024
@radius-triage-bot
Copy link

👋 @lakshmimsft Thanks for filing this bug report.

A project maintainer will review this report and get back to you soon. If you'd like immediate help troubleshooting, please visit our Discord server.

For more information on our triage process please visit our triage overview

@lakshmimsft lakshmimsft changed the title Unit Test Failure with latest version of sigs.k8s.io/controller-runtime Test Failures with latest version of sigs.k8s.io/controller-runtime Sep 4, 2024
@lakshmimsft lakshmimsft added the triaged This issue has been reviewed and triaged label Sep 5, 2024
@radius-triage-bot
Copy link

👍 We've reviewed this issue and have agreed to add it to our backlog. Please subscribe to this issue for notifications, we'll provide updates when we pick it up.

We also welcome community contributions! If you would like to pick this item up sooner and submit a pull request, please visit our contribution guidelines and assign this to yourself by commenting "/assign" on this issue.

For more information on our triage process please visit our triage overview

@lakshmimsft lakshmimsft added the important This item is a high priority Issue we intend to address as soon as possible label Sep 5, 2024
@radius-triage-bot
Copy link

We've prioritized work on this issue. Please subscribe to this issue for notifications, we'll provide updates as we make progress.

We also welcome community contributions! If you would like to pick this item up sooner and submit a pull request, please visit our contribution guidelines and assign this to yourself by commenting "/assign" on this issue.

For more information on our triage process please visit our triage overview

@brooke-hamilton
Copy link
Member

This PR removed WarningHandlerOptions: kubernetes-sigs/controller-runtime#2903

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken or not working as expected important This item is a high priority Issue we intend to address as soon as possible triaged This issue has been reviewed and triaged
Projects
None yet
2 participants