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

Incompatible with crossplane/[email protected] #127

Closed
mamachanko opened this issue Aug 7, 2023 · 1 comment
Closed

Incompatible with crossplane/[email protected] #127

mamachanko opened this issue Aug 7, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@mamachanko
Copy link

What happened?

github.com/crossplane-contrib/[email protected] is incompatible with github.com/crossplane/[email protected] 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/[email protected]/apis/object/v1alpha1/management_policy_hack.go:72:46: undefined: xpv1.ManagementPolicy
../../../go/pkg/mod/github.com/crossplane-contrib/[email protected]/apis/object/v1alpha1/management_policy_hack.go:77:14: undefined: xpv1.ManagementFullControl
../../../go/pkg/mod/github.com/crossplane-contrib/[email protected]/apis/object/v1alpha1/management_policy_hack.go:81:46: undefined: xpv1.ManagementPolicy
../../../go/pkg/mod/github.com/crossplane-contrib/[email protected]/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 ⬆️

@mamachanko mamachanko added the bug Something isn't working label Aug 7, 2023
@mamachanko mamachanko changed the title Incompatible with crossplane/[email protected] Incompatible with crossplane/[email protected] Aug 7, 2023
@turkenh
Copy link
Collaborator

turkenh commented Aug 23, 2023

Fixed with #128

@turkenh turkenh closed this as completed Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants