crossplane-contrib/provider-kubernetes

Incompatible with crossplane/crossplane-runtime@v0.20.x

mamachanko opened this issue · 1 comments

What happened?

github.com/crossplane-contrib/provider-kubernetes@v0.9.0 is incompatible with github.com/crossplane/provider-runtime@v0.20.0 even though it's tracking its rc. I had assumed they would be compatible.

It would be nice to be able to use the latest releases of of both, rather than depending on prereleases. This also presents a constraint when mitigating potential CVEs.

How can we reproduce it?

go.mod:

module github.com/mamachanko/crossplane-compatibility

go 1.20

require (
	github.com/crossplane-contrib/provider-kubernetes v0.9.0
	github.com/crossplane/crossplane v1.13.1
	github.com/crossplane/crossplane-runtime v0.20.0
)

# ...

main.go:

package main

import (
	"log"

	xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1"
	xpxv1 "github.com/crossplane/crossplane/apis/apiextensions/v1"
	xpk8sv1alpha1 "github.com/crossplane-contrib/provider-kubernetes/apis/object/v1alpha1"
)

func main() {
  log.Printf("%+v", xpv1.SecretReference{})
  log.Printf("%+v", xpxv1.Composition{})
  log.Printf("%+v", xpk8sv1alpha1.Object{})
}

Build:

❯ go run .
# github.com/crossplane-contrib/provider-kubernetes/apis/object/v1alpha1
../../../go/pkg/mod/github.com/crossplane-contrib/provider-kubernetes@v0.9.0/apis/object/v1alpha1/management_policy_hack.go:72:46: undefined: xpv1.ManagementPolicy
../../../go/pkg/mod/github.com/crossplane-contrib/provider-kubernetes@v0.9.0/apis/object/v1alpha1/management_policy_hack.go:77:14: undefined: xpv1.ManagementFullControl
../../../go/pkg/mod/github.com/crossplane-contrib/provider-kubernetes@v0.9.0/apis/object/v1alpha1/management_policy_hack.go:81:46: undefined: xpv1.ManagementPolicy
../../../go/pkg/mod/github.com/crossplane-contrib/provider-kubernetes@v0.9.0/apis/object/v1alpha1/zz_generated.managedlist.go:26:14: cannot use &l.Items[i] (value of type *Object) as "github.com/crossplane/crossplane-runtime/pkg/resource".Managed value in assignment: *Object does not implement "github.com/crossplane/crossplane-runtime/pkg/resource".Managed (missing method GetManagementPolicies)

What environment did it happen in?

Crossplane version: see go.mod ⬆️

Fixed with #128