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

update-codegen.sh doesn't work outside of GOPATH #3884

Closed
vdemeester opened this issue Apr 15, 2021 · 4 comments · Fixed by #4465
Closed

update-codegen.sh doesn't work outside of GOPATH #3884

vdemeester opened this issue Apr 15, 2021 · 4 comments · Fixed by #4465
Labels
area/plumbing Issues or PRs related to the plumbing infrastructure but needing attention in a non-plumbing repo. kind/bug Categorizes issue or PR as related to a bug. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/backlog Higher priority than priority/awaiting-more-evidence.

Comments

@vdemeester
Copy link
Member

Running ./hack/update-codegen.sh from outside of GOPATH seems to be broken. It will create the files in ${GOPATH}/src/github.com/tektoncd/pipeline which, if you are not in GOPATH, won't update your working directory and thus won't work.

See below

$ pwd
/home/vincent/src/tektoncd/pipeline
$ ./hack/update-codegen-.sh 
Generating deepcopy funcs for resource:v1alpha1
Generating clientset for resource:v1alpha1 at github.com/tektoncd/pipeline/pkg/client/resource/clientsetGenerating listers for resource:v1alpha1 at github.com/tektoncd/pipeline/pkg/client/resource/listers
Generating informers for resource:v1alpha1 at github.com/tektoncd/pipeline/pkg/client/resource/informersGenerating deepcopy funcs for pipeline:v1alpha1,v1beta1
Generating clientset for pipeline:v1alpha1,v1beta1 at github.com/tektoncd/pipeline/pkg/client/clientset
Generating listers for pipeline:v1alpha1,v1beta1 at github.com/tektoncd/pipeline/pkg/client/listers
Generating informers for pipeline:v1alpha1,v1beta1 at github.com/tektoncd/pipeline/pkg/client/informers
Generating injection for resource:v1alpha1 at github.com/tektoncd/pipeline/pkg/client/resource/injectionGenerating injection for pipeline:v1alpha1,v1beta1 at github.com/tektoncd/pipeline/pkg/client/injection
warning: ignoring symlink /home/vincent/src/tektoncd/pipeline/cmd/controller/kodata/refs
warning: ignoring symlink /home/vincent/src/tektoncd/pipeline/cmd/controller/kodata/third_party
warning: ignoring symlink /home/vincent/src/tektoncd/pipeline/cmd/entrypoint/kodata/refs
warning: ignoring symlink /home/vincent/src/tektoncd/pipeline/cmd/entrypoint/kodata/third_party
warning: ignoring symlink /home/vincent/src/tektoncd/pipeline/cmd/git-init/kodata/refs
warning: ignoring symlink /home/vincent/src/tektoncd/pipeline/cmd/git-init/kodata/third_party
warning: ignoring symlink /home/vincent/src/tektoncd/pipeline/cmd/imagedigestexporter/kodata/refs
warning: ignoring symlink /home/vincent/src/tektoncd/pipeline/cmd/imagedigestexporter/kodata/third_partywarning: ignoring symlink /home/vincent/src/tektoncd/pipeline/cmd/kubeconfigwriter/kodata/refs
warning: ignoring symlink /home/vincent/src/tektoncd/pipeline/cmd/kubeconfigwriter/kodata/third_party
warning: ignoring symlink /home/vincent/src/tektoncd/pipeline/cmd/nop/kodata/refs
warning: ignoring symlink /home/vincent/src/tektoncd/pipeline/cmd/nop/kodata/third_party
warning: ignoring symlink /home/vincent/src/tektoncd/pipeline/cmd/pullrequest-init/kodata/refs
warning: ignoring symlink /home/vincent/src/tektoncd/pipeline/cmd/pullrequest-init/kodata/third_party
warning: ignoring symlink /home/vincent/src/tektoncd/pipeline/cmd/webhook/kodata/refs
warning: ignoring symlink /home/vincent/src/tektoncd/pipeline/cmd/webhook/kodata/third_party
go: finding module for package github.com/tektoncd/pipeline/pkg/client/injection/informers/pipeline/v1beta1/pipelinerun
go: finding module for package github.com/tektoncd/pipeline/pkg/client/injection/client
go: finding module for package github.com/tektoncd/pipeline/pkg/client/injection/informers/pipeline/v1alpha1/condition
go: finding module for package github.com/tektoncd/pipeline/pkg/client/injection/informers/pipeline/v1beta1/clustertask
go: finding module for package github.com/tektoncd/pipeline/pkg/client/clientset/versioned
go: finding module for package github.com/tektoncd/pipeline/pkg/client/injection/informers/pipeline/v1alpha1/run
go: finding module for package github.com/tektoncd/pipeline/pkg/client/injection/informers/pipeline/v1beta1/pipeline
go: finding module for package github.com/tektoncd/pipeline/pkg/client/listers/pipeline/v1alpha1
go: finding module for package github.com/tektoncd/pipeline/pkg/client/injection/informers/pipeline/v1beta1/task
go: finding module for package github.com/tektoncd/pipeline/pkg/client/injection/informers/pipeline/v1beta1/taskrun
go: finding module for package github.com/tektoncd/pipeline/pkg/client/injection/reconciler/pipeline/v1beta1/pipelinerun
go: finding module for package github.com/tektoncd/pipeline/pkg/client/listers/pipeline/v1beta1
go: finding module for package github.com/tektoncd/pipeline/pkg/client/resource/injection/informers/resource/v1alpha1/pipelineresource
go: finding module for package github.com/tektoncd/pipeline/pkg/client/resource/listers/resource/v1alpha1
go: finding module for package github.com/tektoncd/pipeline/pkg/client/injection/reconciler/pipeline/v1beta1/taskrun
go: finding module for package github.com/tektoncd/pipeline/pkg/client/clientset/versioned/scheme
go: finding module for package github.com/tektoncd/pipeline/pkg/client/clientset/versioned/fake
go: finding module for package github.com/tektoncd/pipeline/pkg/client/clientset/versioned/typed/pipeline/v1alpha1
go: finding module for package github.com/tektoncd/pipeline/pkg/client/clientset/versioned/typed/pipeline/v1beta1
go: finding module for package github.com/tektoncd/pipeline/pkg/client/informers/externalversions/pipeline/v1alpha1
go: finding module for package github.com/tektoncd/pipeline/pkg/client/informers/externalversions/pipeline/v1beta1
go: finding module for package github.com/tektoncd/pipeline/pkg/client/injection/client/fake
go: finding module for package github.com/tektoncd/pipeline/pkg/client/injection/informers/pipeline/v1alpha1/condition/fake
go: finding module for package github.com/tektoncd/pipeline/pkg/client/injection/informers/pipeline/v1alpha1/run/fake
go: finding module for package github.com/tektoncd/pipeline/pkg/client/injection/informers/pipeline/v1beta1/clustertask/fake
go: finding module for package github.com/tektoncd/pipeline/pkg/client/injection/informers/pipeline/v1beta1/pipeline/fake
go: finding module for package github.com/tektoncd/pipeline/pkg/client/injection/informers/pipeline/v1beta1/pipelinerun/fake
go: finding module for package github.com/tektoncd/pipeline/pkg/client/injection/informers/pipeline/v1beta1/task/fake
go: finding module for package github.com/tektoncd/pipeline/pkg/client/injection/informers/pipeline/v1beta1/taskrun/fake
go: finding module for package github.com/tektoncd/pipeline/pkg/client/resource/clientset/versioned
go: finding module for package github.com/tektoncd/pipeline/pkg/client/resource/clientset/versioned/fakego: finding module for package github.com/tektoncd/pipeline/pkg/client/resource/clientset/versioned/typed/resource/v1alpha1
go: finding module for package github.com/tektoncd/pipeline/pkg/client/resource/informers/externalversions/resource/v1alpha1
go: finding module for package github.com/tektoncd/pipeline/pkg/client/resource/injection/client/fake
go: finding module for package github.com/tektoncd/pipeline/pkg/client/resource/injection/informers/resource/v1alpha1/pipelineresource/fake
go: finding module for package github.com/tektoncd/pipeline/pkg/client/injection/informers/pipeline/v1alpha1/clustertask/fake
go: finding module for package github.com/tektoncd/pipeline/pkg/client/injection/informers/pipeline/v1alpha1/pipeline/fake
go: finding module for package github.com/tektoncd/pipeline/pkg/client/injection/informers/pipeline/v1alpha1/pipelinerun/fake
go: finding module for package github.com/tektoncd/pipeline/pkg/client/injection/informers/pipeline/v1alpha1/task/fake
go: finding module for package github.com/tektoncd/pipeline/pkg/client/injection/informers/pipeline/v1alpha1/taskrun/fake
github.com/tektoncd/pipeline/pkg/controller imports
        github.com/tektoncd/pipeline/pkg/client/listers/pipeline/v1alpha1: no matching versions for query "latest"
github.com/tektoncd/pipeline/pkg/reconciler/pipelinerun imports
        github.com/tektoncd/pipeline/pkg/client/clientset/versioned: no matching versions for query "latest"
github.com/tektoncd/pipeline/pkg/reconciler/pipelinerun imports
        github.com/tektoncd/pipeline/pkg/client/injection/client: no matching versions for query "latest"
github.com/tektoncd/pipeline/pkg/reconciler/pipelinerun imports
        github.com/tektoncd/pipeline/pkg/client/injection/informers/pipeline/v1alpha1/condition: no matching versions for query "latest"
github.com/tektoncd/pipeline/pkg/reconciler/pipelinerun imports
        github.com/tektoncd/pipeline/pkg/client/injection/informers/pipeline/v1alpha1/run: no matching versions for query "latest"
github.com/tektoncd/pipeline/pkg/reconciler/pipelinerun imports
        github.com/tektoncd/pipeline/pkg/client/injection/informers/pipeline/v1beta1/clustertask: no matching versions for query "latest"
github.com/tektoncd/pipeline/pkg/reconciler/pipelinerun imports
        github.com/tektoncd/pipeline/pkg/client/injection/informers/pipeline/v1beta1/pipeline: no matching versions for query "latest"
github.com/tektoncd/pipeline/pkg/reconciler/pipelinerun imports
        github.com/tektoncd/pipeline/pkg/client/injection/informers/pipeline/v1beta1/pipelinerun: no matching versions for query "latest"
github.com/tektoncd/pipeline/pkg/reconciler/pipelinerun imports
        github.com/tektoncd/pipeline/pkg/client/injection/informers/pipeline/v1beta1/task: no matching versions for query "latest"
github.com/tektoncd/pipeline/pkg/reconciler/pipelinerun imports
        github.com/tektoncd/pipeline/pkg/client/injection/informers/pipeline/v1beta1/taskrun: no matching versions for query "latest"
github.com/tektoncd/pipeline/pkg/reconciler/pipelinerun imports
        github.com/tektoncd/pipeline/pkg/client/injection/reconciler/pipeline/v1beta1/pipelinerun: no matching versions for query "latest"
github.com/tektoncd/pipeline/pkg/reconciler/pipelinerun imports
        github.com/tektoncd/pipeline/pkg/client/listers/pipeline/v1beta1: no matching versions for query "latest"
github.com/tektoncd/pipeline/pkg/reconciler/pipelinerun imports
        github.com/tektoncd/pipeline/pkg/client/resource/injection/informers/resource/v1alpha1/pipelineresource: no matching versions for query "latest"
github.com/tektoncd/pipeline/pkg/reconciler/pipelinerun imports
        github.com/tektoncd/pipeline/pkg/client/resource/listers/resource/v1alpha1: no matching versions for query "latest"
github.com/tektoncd/pipeline/pkg/reconciler/taskrun imports
        github.com/tektoncd/pipeline/pkg/client/injection/reconciler/pipeline/v1beta1/taskrun: no matching versions for query "latest"
github.com/tektoncd/pipeline/pkg/remote/oci imports
        github.com/tektoncd/pipeline/pkg/client/clientset/versioned/scheme: no matching versions for query "latest"
github.com/tektoncd/pipeline/test imports
        github.com/tektoncd/pipeline/pkg/client/clientset/versioned/fake: no matching versions for query "latest"
github.com/tektoncd/pipeline/test imports
        github.com/tektoncd/pipeline/pkg/client/clientset/versioned/typed/pipeline/v1alpha1: no matching versions for query "latest"
github.com/tektoncd/pipeline/test imports
        github.com/tektoncd/pipeline/pkg/client/clientset/versioned/typed/pipeline/v1beta1: no matching versions for query "latest"
github.com/tektoncd/pipeline/test imports
        github.com/tektoncd/pipeline/pkg/client/informers/externalversions/pipeline/v1alpha1: no matching versions for query "latest"
github.com/tektoncd/pipeline/test imports
        github.com/tektoncd/pipeline/pkg/client/informers/externalversions/pipeline/v1beta1: no matching versions for query "latest"
github.com/tektoncd/pipeline/test imports
        github.com/tektoncd/pipeline/pkg/client/injection/client/fake: no matching versions for query "latest"
github.com/tektoncd/pipeline/test imports
        github.com/tektoncd/pipeline/pkg/client/injection/informers/pipeline/v1alpha1/condition/fake: no matching versions for query "latest"
github.com/tektoncd/pipeline/test imports
        github.com/tektoncd/pipeline/pkg/client/injection/informers/pipeline/v1alpha1/run/fake: no matching versions for query "latest"
github.com/tektoncd/pipeline/test imports
        github.com/tektoncd/pipeline/pkg/client/injection/informers/pipeline/v1beta1/clustertask/fake: no matching versions for query "latest"
github.com/tektoncd/pipeline/test imports
        github.com/tektoncd/pipeline/pkg/client/injection/informers/pipeline/v1beta1/pipeline/fake: no matching versions for query "latest"
github.com/tektoncd/pipeline/test imports
        github.com/tektoncd/pipeline/pkg/client/injection/informers/pipeline/v1beta1/pipelinerun/fake: no matching versions for query "latest"
github.com/tektoncd/pipeline/test imports
        github.com/tektoncd/pipeline/pkg/client/injection/informers/pipeline/v1beta1/task/fake: no matching versions for query "latest"
github.com/tektoncd/pipeline/test imports
        github.com/tektoncd/pipeline/pkg/client/injection/informers/pipeline/v1beta1/taskrun/fake: no matching versions for query "latest"
github.com/tektoncd/pipeline/test imports
        github.com/tektoncd/pipeline/pkg/client/resource/clientset/versioned: no matching versions for query "latest"
github.com/tektoncd/pipeline/test imports
        github.com/tektoncd/pipeline/pkg/client/resource/clientset/versioned/fake: no matching versions for query "latest"
github.com/tektoncd/pipeline/test imports
        github.com/tektoncd/pipeline/pkg/client/resource/clientset/versioned/typed/resource/v1alpha1: no matching versions for query "latest"
github.com/tektoncd/pipeline/test imports
        github.com/tektoncd/pipeline/pkg/client/resource/informers/externalversions/resource/v1alpha1: no matching versions for query "latest"
github.com/tektoncd/pipeline/test imports
        github.com/tektoncd/pipeline/pkg/client/resource/injection/client/fake: no matching versions for query "latest"
github.com/tektoncd/pipeline/test imports
        github.com/tektoncd/pipeline/pkg/client/resource/injection/informers/resource/v1alpha1/pipelineresource/fake: no matching versions for query "latest"
github.com/tektoncd/pipeline/test/v1alpha1 imports
        github.com/tektoncd/pipeline/pkg/client/injection/informers/pipeline/v1alpha1/clustertask/fake: no matching versions for query "latest"
github.com/tektoncd/pipeline/test/v1alpha1 imports
        github.com/tektoncd/pipeline/pkg/client/injection/informers/pipeline/v1alpha1/pipeline/fake: no matching versions for query "latest"
github.com/tektoncd/pipeline/test/v1alpha1 imports
        github.com/tektoncd/pipeline/pkg/client/injection/informers/pipeline/v1alpha1/pipelinerun/fake: no matching versions for query "latest"
github.com/tektoncd/pipeline/test/v1alpha1 imports
        github.com/tektoncd/pipeline/pkg/client/injection/informers/pipeline/v1alpha1/task/fake: no matching versions for query "latest"
github.com/tektoncd/pipeline/test/v1alph`a1 imports
        github.com/tektoncd/pipeline/pkg/client/injection/informers/pipeline/v1alpha1/taskrun/fake: no matching versions for query "latest"
$ ls -l ${GOPATH}/src/github.com/tektoncd/pipeline/pkg/client 
drwxr-xr-x - vincent 15 Apr 06:11 clientset
drwxr-xr-x - vincent 15 Apr 06:12 informers
drwxr-xr-x - vincent 15 Apr 06:15 injection
drwxr-xr-x - vincent 15 Apr 06:12 listers
drwxr-xr-x - vincent 15 Apr 06:14 resource

We may want to update the script based on what has been done upstream in knative (even though I am not sure if it supports or not being run outside of GOPATH).

Note that ./hack/update-openapi.sh is also broken when not in GOPATH.

/kind bug

@tekton-robot tekton-robot added the kind/bug Categorizes issue or PR as related to a bug. label Apr 15, 2021
@vdemeester vdemeester added the area/plumbing Issues or PRs related to the plumbing infrastructure but needing attention in a non-plumbing repo. label Apr 15, 2021
@vdemeester
Copy link
Member Author

my temporary workaround is to link my current pwd to ${GOPATH}/src/github.com/tektoncd/pipeline but we should ensure this work.

@vdemeester
Copy link
Member Author

Note that this is also the case for ./hack/update-openapigen.sh 🙃
One other workaround (that we could automate in the scripts is the following)

$ mkdir -p .gopath/src/github.com/tektoncd
mkdir: created directory '.gopath'
mkdir: created directory '.gopath/src'
mkdir: created directory '.gopath/src/github.com'
mkdir: created directory '.gopath/src/github.com/tektoncd'
$ ln -s $(pwd) $(pwd)/.gopath/src/github.com/tektoncd/pipeline
$ ls -l .gopath/src/github.com/tektoncd
lrwxrwxrwx 13 vincent 17 May 15:11 pipeline -> /tmp/pipeline
$ export GOPATH=/tmp/pipeline/.gopath
$ ./hack/update-codegen.sh
# […]
$ ./hack/update-codegen.sh
# […]

@tekton-robot
Copy link
Collaborator

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale with a justification.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close with a justification.
If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle stale

Send feedback to tektoncd/plumbing.

@tekton-robot tekton-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 15, 2021
@vdemeester
Copy link
Member Author

/lifecycle frozen
This needs to be fixed somehow 🙃

@tekton-robot tekton-robot added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Oct 15, 2021
@jerop jerop added the priority/backlog Higher priority than priority/awaiting-more-evidence. label Nov 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/plumbing Issues or PRs related to the plumbing infrastructure but needing attention in a non-plumbing repo. kind/bug Categorizes issue or PR as related to a bug. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/backlog Higher priority than priority/awaiting-more-evidence.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants