You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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
This is happening because the controller-runtime needs higher version of
k8s.io/kube-openapi
which also comes with packagek8s.io/kube-openapi/spec
and it's conflicting with tidb-operator'sspec.Ref
fromgithub.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?
The text was updated successfully, but these errors were encountered: