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

cannot use "github.com/go-openapi/spec".Schema{...} (type "github.com/go-openapi/spec".Schema) as type "k8s.io/kube-openapi/pkg/validation/spec".Schema in field value #1576

Closed
Neytoph opened this issue Apr 20, 2022 · 1 comment

Comments

@Neytoph
Copy link

Neytoph commented Apr 20, 2022

my env:

go version

   go1.17 linux/amd64

go.mod

k8s.io/api v0.23.1
k8s.io/apimachinery v0.23.1
k8s.io/client-go v0.23.1
k8s.io/klog v1.0.0
k8s.io/kubernetes v1.23.1
github.com/kubeflow/training-operator v1.4.0

when i build go project, i got
# github.com/kubeflow/common/pkg/apis/common/v1 /root/go/pkg/mod/github.com/kubeflow/common@v0.4.1/pkg/apis/common/v1/openapi_generated.go:306:3: cannot use "github.com/go-openapi/spec".Schema{...} (type "github.com/go-openapi/spec".Schema) as type "k8s.io/kube-openapi/pkg/validation/spec".Schema in field value /root/go/pkg/mod/github.com/kubeflow/common@v0.4.1/pkg/apis/common/v1/openapi_generated.go:342:8: cannot use ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time") (type "k8s.io/kube-openapi/pkg/validation/spec".Ref) as type "github.com/go-openapi/spec".Ref in field value /root/go/pkg/mod/github.com/kubeflow/common@v0.4.1/pkg/apis/common/v1/openapi_generated.go:348:8: cannot use ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time") (type "k8s.io/kube-openapi/pkg/validation/spec".Ref) as type "github.com/go-openapi/spec".Ref in field value /root/go/pkg/mod/github.com/kubeflow/common@v0.4.1/pkg/apis/common/v1/openapi_generated.go:362:3: cannot use "github.com/go-openapi/spec".Schema{...} (type "github.com/go-openapi/spec".Schema) as type "k8s.io/kube-openapi/pkg/validation/spec".Schema in field value /root/go/pkg/mod/github.com/kubeflow/common@v0.4.1/pkg/apis/common/v1/openapi_generated.go:374:11: cannot use ref("github.com/kubeflow/common/pkg/apis/common/v1.JobCondition") (type "k8s.io/kube-openapi/pkg/validation/spec".Ref) as type "github.com/go-openapi/spec".Ref in field value /root/go/pkg/mod/github.com/kubeflow/common@v0.4.1/pkg/apis/common/v1/openapi_generated.go:388:11: cannot use ref("github.com/kubeflow/common/pkg/apis/common/v1.ReplicaStatus") (type "k8s.io/kube-openapi/pkg/validation/spec".Ref) as type "github.com/go-openapi/spec".Ref in field value /root/go/pkg/mod/github.com/kubeflow/common@v0.4.1/pkg/apis/common/v1/openapi_generated.go:397:8: cannot use ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time") (type "k8s.io/kube-openapi/pkg/validation/spec".Ref) as type "github.com/go-openapi/spec".Ref in field value /root/go/pkg/mod/github.com/kubeflow/common@v0.4.1/pkg/apis/common/v1/openapi_generated.go:403:8: cannot use ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time") (type "k8s.io/kube-openapi/pkg/validation/spec".Ref) as type "github.com/go-openapi/spec".Ref in field value /root/go/pkg/mod/github.com/kubeflow/common@v0.4.1/pkg/apis/common/v1/openapi_generated.go:409:8: cannot use ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time") (type "k8s.io/kube-openapi/pkg/validation/spec".Ref) as type "github.com/go-openapi/spec".Ref in field value /root/go/pkg/mod/github.com/kubeflow/common@v0.4.1/pkg/apis/common/v1/openapi_generated.go:438:8: cannot use ref("k8s.io/api/core/v1.PodTemplateSpec") (type "k8s.io/kube-openapi/pkg/validation/spec".Ref) as type "github.com/go-openapi/spec".Ref in field value /root/go/pkg/mod/github.com/kubeflow/common@v0.4.1/pkg/apis/common/v1/openapi_generated.go:438:8: too many errors

it seem like tektoncd/pipeline#4320 but i can't fix it

@Neytoph
Copy link
Author

Neytoph commented Apr 20, 2022

i fix it by
add require an old kube-openapi
k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20211110012726-3cc51fd1e909

@Neytoph Neytoph closed this as completed Apr 20, 2022
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

No branches or pull requests

1 participant