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

controller-runtime version 0.14.X incompatible with client-go 0.27 #606

Closed
Huang-Wei opened this issue Jul 26, 2023 · 3 comments · Fixed by #608
Closed

controller-runtime version 0.14.X incompatible with client-go 0.27 #606

Huang-Wei opened this issue Jul 26, 2023 · 3 comments · Fixed by #608
Milestone

Comments

@Huang-Wei
Copy link
Contributor

Huang-Wei commented Jul 26, 2023

Usually the first step after releasing is to bump the k8s deps in master branch. But in local testing, it turns out a change in client-go caused all controller-runtime 0.14.X versions incompatible.

@Huang-Wei Huang-Wei added this to the v1.27 milestone Jul 26, 2023
@Huang-Wei
Copy link
Contributor Author

when bumping controller-runtime, I hit 2 issues:

One is:

⇒  go mod tidy
sigs.k8s.io/scheduler-plugins/cmd/scheduler imports
	k8s.io/kubernetes/cmd/kube-scheduler/app imports
	k8s.io/apiserver/pkg/server imports
	k8s.io/apiserver/pkg/registry/generic imports
	k8s.io/apiserver/pkg/storage/storagebackend/factory imports
	go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc tested by
	go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc.test imports
	google.golang.org/grpc/interop imports
	golang.org/x/oauth2/google imports
	cloud.google.com/go/compute/metadata: ambiguous import: found package cloud.google.com/go/compute/metadata in multiple modules:
	cloud.google.com/go v0.97.0 (/Users/weih/go/pkg/mod/cloud.google.com/go@v0.97.0/compute/metadata)
	cloud.google.com/go/compute/metadata v0.2.0 (/Users/weih/go/pkg/mod/cloud.google.com/go/compute/metadata@v0.2.0)

This can be fixed by go get cloud.google.com/go/compute/metadata first and then go mod tidy.

The next one is:

⇒  go test ./cmd/...
# sigs.k8s.io/scheduler-plugins/pkg/controllers
pkg/controllers/elasticquota_controller.go:176:12: source.Kind (value of type func(cache "sigs.k8s.io/controller-runtime/pkg/cache".Cache, object client.Object) source.SyncingSource) is not a type
pkg/controllers/podgroup_controller.go:194:12: source.Kind (value of type func(cache "sigs.k8s.io/controller-runtime/pkg/cache".Cache, object client.Object) source.SyncingSource) is not a type
pkg/controllers/podgroup_controller.go:195:39: cannot use r.podToPodGroup (value of type func(obj client.Object) []reconcile.Request) as handler.MapFunc value in argument to handler.EnqueueRequestsFromMapFunc
ok  	sigs.k8s.io/scheduler-plugins/cmd/scheduler	29.525s
FAIL

working on it...

@zwpaper
Copy link
Member

zwpaper commented Jul 27, 2023

the second one seems familiar to me, I would help to fix it before the other migrations if you have not yet fixed it. @Huang-Wei

@Huang-Wei
Copy link
Contributor Author

Huang-Wei commented Jul 27, 2023

Thanks @zwpaper . I think I fixed the second one as well. But somehow there is another UT failure.

If you'd like to take a stab, I will upload my (temporary) PR, and then you take over from there. so you don't need to start from scratch, WDYT?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants