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

dependency on kustomize causing compilation issues #19

Closed
pvenu-Google opened this issue Apr 23, 2021 · 10 comments
Closed

dependency on kustomize causing compilation issues #19

pvenu-Google opened this issue Apr 23, 2021 · 10 comments
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@pvenu-Google
Copy link

Relevant section of the go.mod file is as below -:
k8s.io/api v0.19.4
k8s.io/apiextensions-apiserver v0.19.4 // indirect
k8s.io/apimachinery v0.19.4
k8s.io/cli-runtime v0.19.4
k8s.io/client-go v0.19.4

On compiling some kubectl plugin code, i get this error -:
go vet ./...

sigs.k8s.io/kustomize/pkg/transformers/config

vendor/sigs.k8s.io/kustomize/pkg/transformers/config/factorycrd.go:71:47: cannot use api.Schema.SchemaProps.Properties (type spec.SchemaProperties) as type myProperties in argument to looksLikeAk8sType
make: *** [Makefile:95: vet] Error 2

Graph dependency shows -:
go mod graph | grep kustomize
k8s.io/cli-runtime@v0.19.4 sigs.k8s.io/kustomize@v2.0.3+incompatible

Similar issue also noted by helm package users
kubernetes-sigs/kustomize#3262

Looks like the latest version v0.21.0 uses a fixed version of kustomize in the go.mod file.
Could we get a patch release for v0.19.x or v0.20.x ?
Its going to be a while till we get to use kubernetes1.21 and it seems that anything below cli-runtime@v0.21.0 is unusable at this time ? If not, please let me know what i could do as a work around ?

The kustomize version in the mod file is quite old and it looks like the kustomize package structure has changed along the way.

@monopole
Copy link
Contributor

monopole commented May 5, 2021

@monopole
Copy link
Contributor

monopole commented May 5, 2021

tl;dr anyone depending on k8s.io v0.20.x (or older) packages will have to avoid depending on anything that depends on k8s.io/kube-openapi past v0.0.0-20210323165736-1a6458611d18.

@pvenu-Google
Copy link
Author

Thanks monopole.
So i am using cli-runtime 19.4 which seems to be using a much older version of kube-openapi, but i still see the issue.

go mod graph | grep kube-openapi
k8s.io/code-generator@v0.19.2 k8s.io/kube-openapi@v0.0.0-20200805222855-6aeccd4b50c6
k8s.io/apimachinery@v0.19.4 k8s.io/kube-openapi@v0.0.0-20200805222855-6aeccd4b50c6
k8s.io/apiserver@v0.19.4 k8s.io/kube-openapi@v0.0.0-20200805222855-6aeccd4b50c6
k8s.io/apiextensions-apiserver@v0.19.4 k8s.io/kube-openapi@v0.0.0-20200805222855-6aeccd4b50c6
k8s.io/cli-runtime@v0.19.4 k8s.io/kube-openapi@v0.0.0-20200805222855-6aeccd4b50c6
k8s.io/code-generator@v0.19.4 k8s.io/kube-openapi@v0.0.0-20200805222855-6aeccd4b50c6
k8s.io/apiserver@v0.19.2 k8s.io/kube-openapi@v0.0.0-20200805222855-6aeccd4b50c6
k8s.io/apiextensions-apiserver@v0.19.2 k8s.io/kube-openapi@v0.0.0-20200805222855-6aeccd4b50c6
k8s.io/kube-openapi@v0.0.0-20200805222855-6aeccd4b50c6 sigs.k8s.io/yaml@v1.1.0
k8s.io/kube-openapi@v0.0.0-20200805222855-6aeccd4b50c6 sigs.k8s.io/structured-merge-diff/v4@v4.0.1
k8s.io/kube-openapi@v0.0.0-20200805222855-6aeccd4b50c6 k8s.io/gengo@v0.0.0-20200413195148-3a45101e95ac
k8s.io/kube-openapi@v0.0.0-20200805222855-6aeccd4b50c6 gopkg.in/yaml.v2@v2.2.2
k8s.io/kube-openapi@v0.0.0-20200805222855-6aeccd4b50c6 golang.org/x/tools@v0.0.0-20181011042414-1f849cf54d09
k8s.io/kube-openapi@v0.0.0-20200805222855-6aeccd4b50c6 golang.org/x/net@v0.0.0-20200324143707-d3edc9973b7e
k8s.io/kube-openapi@v0.0.0-20200805222855-6aeccd4b50c6 github.com/stretchr/testify@v1.3.0
k8s.io/kube-openapi@v0.0.0-20200805222855-6aeccd4b50c6 github.com/spf13/pflag@v0.0.0-20170130214245-9ff6c6923cff
k8s.io/kube-openapi@v0.0.0-20200805222855-6aeccd4b50c6 github.com/onsi/gomega@v0.0.0-20170829124025-dcabb60a477c
k8s.io/kube-openapi@v0.0.0-20200805222855-6aeccd4b50c6 github.com/onsi/ginkgo@v0.0.0-20170829012221-11459a886d9c
k8s.io/kube-openapi@v0.0.0-20200805222855-6aeccd4b50c6 github.com/munnerz/goautoneg@v0.0.0-20120707110453-a547fc61f48d
k8s.io/kube-openapi@v0.0.0-20200805222855-6aeccd4b50c6 github.com/mailru/easyjson@v0.0.0-20160728113105-d5b7844b561a
k8s.io/kube-openapi@v0.0.0-20200805222855-6aeccd4b50c6 github.com/json-iterator/go@v1.1.6
k8s.io/kube-openapi@v0.0.0-20200805222855-6aeccd4b50c6 github.com/googleapis/gnostic@v0.4.1
k8s.io/kube-openapi@v0.0.0-20200805222855-6aeccd4b50c6 github.com/google/gofuzz@v1.0.0
k8s.io/kube-openapi@v0.0.0-20200805222855-6aeccd4b50c6 github.com/google/go-cmp@v0.4.0
k8s.io/kube-openapi@v0.0.0-20200805222855-6aeccd4b50c6 github.com/golang/protobuf@v1.3.3
k8s.io/kube-openapi@v0.0.0-20200805222855-6aeccd4b50c6 github.com/go-openapi/swag@v0.0.0-20160704191624-1d0bd113de87
k8s.io/kube-openapi@v0.0.0-20200805222855-6aeccd4b50c6 github.com/go-openapi/spec@v0.0.0-20160808142527-6aced65f8501
k8s.io/kube-openapi@v0.0.0-20200805222855-6aeccd4b50c6 github.com/go-openapi/jsonreference@v0.0.0-20160704190145-13c6e3589ad9
k8s.io/kube-openapi@v0.0.0-20200805222855-6aeccd4b50c6 github.com/go-openapi/jsonpointer@v0.0.0-20160704185906-46af16f9f7b1
k8s.io/kube-openapi@v0.0.0-20200805222855-6aeccd4b50c6 github.com/ghodss/yaml@v0.0.0-20150909031657-73d445a93680
k8s.io/kube-openapi@v0.0.0-20200805222855-6aeccd4b50c6 github.com/emicklei/go-restful@v0.0.0-20170410110728-ff4f55a20633
k8s.io/kube-openapi@v0.0.0-20200805222855-6aeccd4b50c6 github.com/davecgh/go-spew@v1.1.0
k8s.io/kube-openapi@v0.0.0-20200805222855-6aeccd4b50c6 github.com/PuerkitoBio/urlesc@v0.0.0-20160726150825-5bd2802263f2
k8s.io/kube-openapi@v0.0.0-20200805222855-6aeccd4b50c6 github.com/PuerkitoBio/purell@v1.0.0
k8s.io/kube-openapi@v0.0.0-20200805222855-6aeccd4b50c6 github.com/NYTimes/gziphandler@v0.0.0-20170623195520-56545f4a5d46
k8s.io/apimachinery@v0.19.2 k8s.io/kube-openapi@v0.0.0-20200805222855-6aeccd4b50c6
k8s.io/kube-openapi@v0.0.0-20200805222855-6aeccd4b50c6 k8s.io/klog/v2@v2.0.0

@pvenu-Google
Copy link
Author

The reason for kube-openapi@v0.0.0-20200805222855-6aeccd4b50c6 not working even though it was older than the recommended v0.0.0-20210323165736-1a6458611d18 was because the go-openapi/spec package also had a version dependency.

This commit changed the properties field type in the schema struct which caused the same error to pop up.

go-openapi/spec@55f43ac

I used v0.19.6 and the compilation issue went away

@monopole
Copy link
Contributor

monopole commented Jun 1, 2021

IMO, this can be closed.

@pvenu-Google
Copy link
Author

pvenu-Google commented Jun 7, 2021 via email

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 5, 2021
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Oct 5, 2021
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

@k8s-ci-robot
Copy link
Contributor

@k8s-triage-robot: Closing this issue.

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

4 participants