Skip to content

Upgrade k8s.io/{apimachinery,api,client-go} to v0.26.2 #1719

@a-hilaly

Description

@a-hilaly

I attempted to update k8s.io/{apimachinery,api,client-go} to v0.26.2 to address several security issues present in the current version we use (v0.23.0). Pasting the compilation errors below:

go test  ./...
# sigs.k8s.io/controller-runtime/pkg/cache
../../../../go/pkg/mod/sigs.k8s.io/controller-runtime@v0.11.0/pkg/cache/informer_cache.go:144:9: cannot use i.Informer (variable of type "k8s.io/client-go/tools/cache".SharedIndexInformer) as Informer value in return statement: "k8s.io/client-go/tools/cache".SharedIndexInformer does not implement Informer (wrong type for method AddEventHandler)
		have AddEventHandler("k8s.io/client-go/tools/cache".ResourceEventHandler) ("k8s.io/client-go/tools/cache".ResourceEventHandlerRegistration, error)
		want AddEventHandler("k8s.io/client-go/tools/cache".ResourceEventHandler)
../../../../go/pkg/mod/sigs.k8s.io/controller-runtime@v0.11.0/pkg/cache/informer_cache.go:158:9: cannot use i.Informer (variable of type "k8s.io/client-go/tools/cache".SharedIndexInformer) as Informer value in return statement: "k8s.io/client-go/tools/cache".SharedIndexInformer does not implement Informer (wrong type for method AddEventHandler)
		have AddEventHandler("k8s.io/client-go/tools/cache".ResourceEventHandler) ("k8s.io/client-go/tools/cache".ResourceEventHandlerRegistration, error)
		want AddEventHandler("k8s.io/client-go/tools/cache".ResourceEventHandler)
?   	github.com/aws-controllers-k8s/runtime/apis/core/v1alpha1	[no test files]
?   	github.com/aws-controllers-k8s/runtime/mocks/apimachinery/pkg/apis/meta/v1	[no test files]
?   	github.com/aws-controllers-k8s/runtime/mocks/apimachinery/pkg/runtime	[no test files]
?   	github.com/aws-controllers-k8s/runtime/mocks/apimachinery/pkg/runtime/schema	[no test files]
?   	github.com/aws-controllers-k8s/runtime/mocks/controller-runtime/pkg/client	[no test files]
# github.com/aws-controllers-k8s/runtime/pkg/compare_test [github.com/aws-controllers-k8s/runtime/pkg/compare.test]
pkg/compare/meta_test.go:49:6: ob1.SetClusterName undefined (type *unstructured.Unstructured has no field or method SetClusterName)
pkg/compare/meta_test.go:51:6: ob2.SetClusterName undefined (type *unstructured.Unstructured has no field or method SetClusterName)
pkg/compare/meta_test.go:55:6: ob2.SetClusterName undefined (type *unstructured.Unstructured has no field or method SetClusterName)
FAIL	github.com/aws-controllers-k8s/runtime/pkg/compare [build failed]
FAIL	github.com/aws-controllers-k8s/runtime/pkg/condition [build failed]
?   	github.com/aws-controllers-k8s/runtime/pkg/errors	[no test files]
?   	github.com/aws-controllers-k8s/runtime/pkg/metrics	[no test files]
FAIL	github.com/aws-controllers-k8s/runtime/pkg/config [build failed]
ok  	github.com/aws-controllers-k8s/runtime/pkg/requeue	1.203s
FAIL	github.com/aws-controllers-k8s/runtime/pkg/runtime [build failed]
ok  	github.com/aws-controllers-k8s/runtime/pkg/runtime/cache	8.935s
ok  	github.com/aws-controllers-k8s/runtime/pkg/tags	1.083s
ok  	github.com/aws-controllers-k8s/runtime/pkg/util	0.939s
FAIL
make: *** [test] Error 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/runtimeIssues or PRs as related to controller runtime, common reconciliation logic, etckind/enhancementCategorizes issue or PR as related to existing feature enhancements.needs-priorityIndicates a PR lacks a `priority/foo` label and requires one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions