kubernetes-sigs / kubebuilder-declarative-pattern

A toolkit for building declarative operators with kubebuilder
Apache License 2.0
257 stars 85 forks source link

Time to cut a new release? #407

Open tomasaschan opened 1 week ago

tomasaschan commented 1 week ago

In one of our projects, we have a dependency on sigs.k8s.io/kubebuilder-declarative-pattern v0.15.0-beta.1.0.20240926141202-cf8082c623b8 where the hash at the end points to the latest commit on master. Everything seems to work.

But if we do go get -u ./... && go mod tidy in this project, it selects v0.15.0-beta.2 which then seems to run into a bunch of compatibility issues with other k8s libraries:

λ go vet ./...                                                
# sigs.k8s.io/kubebuilder-declarative-pattern/commonclient
../../../pkg/mod/sigs.k8s.io/kubebuilder-declarative-pattern@v0.15.0-beta.2/commonclient/factory_cr15.go:14:28: not enough arguments in call to source.Kind
        have ("sigs.k8s.io/controller-runtime/pkg/cache".Cache, client.Object)
        want ("sigs.k8s.io/controller-runtime/pkg/cache".Cache, object, handler.TypedEventHandler[object, reconcile.Request], ...predicate.TypedPredicate[object])
../../../pkg/mod/sigs.k8s.io/kubebuilder-declarative-pattern@v0.15.0-beta.2/commonclient/restmapper_cr15.go:15:17: undefined: apiutil.NewDiscoveryRESTMapper
# sigs.k8s.io/kubebuilder-declarative-pattern/pkg/patterns/declarative/pkg/applier
../../../pkg/mod/sigs.k8s.io/kubebuilder-declarative-pattern@v0.15.0-beta.2/pkg/patterns/declarative/pkg/applier/direct.go:104:59: f.OpenAPIGetter undefined (type "k8s.io/kubectl/pkg/cmd/util".Factory has no field or method OpenAPIGetter)
../../../pkg/mod/sigs.k8s.io/kubebuilder-declarative-pattern@v0.15.0-beta.2/pkg/patterns/declarative/pkg/applier/direct.go:106:77: too many arguments in call to d.inner.NewFactory(opt).Validator
        have (string, *"k8s.io/cli-runtime/pkg/resource".QueryParamVerifier)
        want (string)
../../../pkg/mod/sigs.k8s.io/kubebuilder-declarative-pattern@v0.15.0-beta.2/pkg/patterns/declarative/pkg/applier/direct.go:138:24: cannot use sets.NewString() (value of type "k8s.io/apimachinery/pkg/util/sets".String) as "k8s.io/apimachinery/pkg/util/sets".Set["k8s.io/apimachinery/pkg/types".UID] value in struct literal
../../../pkg/mod/sigs.k8s.io/kubebuilder-declarative-pattern@v0.15.0-beta.2/pkg/patterns/declarative/pkg/applier/direct.go:139:24: cannot use sets.NewString() (value of type "k8s.io/apimachinery/pkg/util/sets".String) as "k8s.io/apimachinery/pkg/util/sets".Set[string] value in struct literal

Is it time to cut a new release to avoid these issues? What is the process for that?

cc @justinsb

tomasaschan commented 1 week ago

I found this document but it refers to the kuberentes-template project so I'm not sure how outdated it is...