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

Upgrade dependency versions #5546

Open
rajsuvariya opened this issue Feb 12, 2024 · 0 comments
Open

Upgrade dependency versions #5546

rajsuvariya opened this issue Feb 12, 2024 · 0 comments

Comments

@rajsuvariya
Copy link
Contributor

Bug Report

What version of Kubernetes are you using?
Client Version: v1.24.1
Kustomize Version: v4.5.4
Server Version: v1.24.17

What version of TiDB Operator are you using?
v1.4.1

What storage classes exist in the Kubernetes cluster and what are used for PD/TiKV pods?
NA

What's the status of the TiDB cluster pods?
NA

What did you do?
I am trying to develop a new operator using operator-sdk which needs to get and update tidb cluster resource. For that reason I am trying to add github.com/pingcap/tidb-operator/pkg/apis as dep in my project. However, it's failing my builds with below error

BLRETV-C02GL33D:maintenance-operator raj.suvariya$ go build -a -o manager cmd/main.go
# github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1
../../../../pkg/mod/github.com/pingcap/tidb-operator/pkg/[email protected]/pingcap/v1alpha1/openapi_generated.go:449:11: cannot use spec.Schema{…} (value of type "github.com/go-openapi/spec".Schema) as "k8s.io/kube-openapi/pkg/validation/spec".Schema value in struct literal
../../../../pkg/mod/github.com/pingcap/tidb-operator/pkg/[email protected]/pingcap/v1alpha1/openapi_generated.go:457:21: cannot use ref("k8s.io/apimachinery/pkg/api/resource.Quantity") (value of type "k8s.io/kube-openapi/pkg/validation/spec".Ref) as "github.com/go-openapi/spec".Ref value in struct literal
../../../../pkg/mod/github.com/pingcap/tidb-operator/pkg/[email protected]/pingcap/v1alpha1/openapi_generated.go:463:21: cannot use ref("k8s.io/apimachinery/pkg/api/resource.Quantity") (value of type "k8s.io/kube-openapi/pkg/validation/spec".Ref) as "github.com/go-openapi/spec".Ref value in struct literal
../../../../pkg/mod/github.com/pingcap/tidb-operator/pkg/[email protected]/pingcap/v1alpha1/openapi_generated.go:469:21: cannot use ref("k8s.io/apimachinery/pkg/api/resource.Quantity") (value of type "k8s.io/kube-openapi/pkg/validation/spec".Ref) as "github.com/go-openapi/spec".Ref value in struct literal
../../../../pkg/mod/github.com/pingcap/tidb-operator/pkg/[email protected]/pingcap/v1alpha1/openapi_generated.go:490:11: cannot use spec.Schema{…} (value of type "github.com/go-openapi/spec".Schema) as "k8s.io/kube-openapi/pkg/validation/spec".Schema value in struct literal
../../../../pkg/mod/github.com/pingcap/tidb-operator/pkg/[email protected]/pingcap/v1alpha1/openapi_generated.go:532:11: cannot use spec.Schema{…} (value of type "github.com/go-openapi/spec".Schema) as "k8s.io/kube-openapi/pkg/validation/spec".Schema value in struct literal
../../../../pkg/mod/github.com/pingcap/tidb-operator/pkg/[email protected]/pingcap/v1alpha1/openapi_generated.go:580:11: cannot use spec.Schema{…} (value of type "github.com/go-openapi/spec".Schema) as "k8s.io/kube-openapi/pkg/validation/spec".Schema value in struct literal
../../../../pkg/mod/github.com/pingcap/tidb-operator/pkg/[email protected]/pingcap/v1alpha1/openapi_generated.go:699:11: cannot use spec.Schema{…} (value of type "github.com/go-openapi/spec".Schema) as "k8s.io/kube-openapi/pkg/validation/spec".Schema value in struct literal
../../../../pkg/mod/github.com/pingcap/tidb-operator/pkg/[email protected]/pingcap/v1alpha1/openapi_generated.go:720:13: cannot use ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.BackupSpec") (value of type "k8s.io/kube-openapi/pkg/validation/spec".Ref) as "github.com/go-openapi/spec".Ref value in struct literal
../../../../pkg/mod/github.com/pingcap/tidb-operator/pkg/[email protected]/pingcap/v1alpha1/openapi_generated.go:759:16: cannot use ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.Backup") (value of type "k8s.io/kube-openapi/pkg/validation/spec".Ref) as "github.com/go-openapi/spec".Ref value in struct literal
../../../../pkg/mod/github.com/pingcap/tidb-operator/pkg/[email protected]/pingcap/v1alpha1/openapi_generated.go:759:16: too many errors

This is happening because the controller-runtime needs higher version of k8s.io/kube-openapi which also comes with package k8s.io/kube-openapi/spec and it's conflicting with tidb-operator's spec.Ref from github.com/go-openapi/spec.

What did you expect to see?
No error, tidb-operator using the latest version of dependencies.

What did you see instead?
Errors, due to older version of dependencies getting conflict errors.

Can you fix this by upgrading the dependencies to latest versions?

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