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

Make codegen fails with missing permissions on some environments #21623

Open
3 tasks
reggie-k opened this issue Jan 22, 2025 · 1 comment · May be fixed by #21667
Open
3 tasks

Make codegen fails with missing permissions on some environments #21623

reggie-k opened this issue Jan 22, 2025 · 1 comment · May be fixed by #21667
Labels
bug Something isn't working component:dev-env

Comments

@reggie-k
Copy link
Member

Checklist:

  • I've searched in the docs and FAQ for my answer: https://bit.ly/argocd-faq.
  • I've included steps to reproduce the bug.
  • I've pasted the output of argocd version.

Describe the bug

For some local environments, make codegen fails with a message about missing permissions in the /go folder

To Reproduce

This does not reproduce for me, but does for this case:
#21557 (comment)

Expected behavior

make codegen succeeds

Screenshots

Version

Paste the output from `argocd version` here.

Logs

Paste any relevant application logs here.
@reggie-k reggie-k added bug Something isn't working component:dev-env labels Jan 22, 2025
@dudo
Copy link

dudo commented Jan 25, 2025

To add some validation to this, this is the error I receive when I run make codegen on master.

/sbin:/bin:/usr/local/go/bin:/go/bin:/go/src/github.com/argoproj/argo-cd/hack
++ go env GOPATH
+ GOPATH=/go
+ GOPATH_PROJECT_ROOT=/go/src/github.com/argoproj/argo-cd
+ go version
go version go1.23.5 linux/arm64
+ protoc --version
libprotoc 27.2
+ swagger version
version: v0.28.0
commit: (unknown, mod sum: "h1:cFzm/DrsqKiDeBpzRDu5N3vjraU3O9IfpFfz+TscKWY=")
+ jq --version
jq-1.7
+ export GO111MODULE=off
+ GO111MODULE=off
+ PACKAGES=(github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1)
+ APIMACHINERY_PKGS=(+k8s.io/apimachinery/pkg/util/intstr +k8s.io/apimachinery/pkg/api/resource +k8s.io/apimachinery/pkg/runtime/schema +k8s.io/apimachinery/pkg/runtime k8s.io/apimachinery/pkg/apis/meta/v1 k8s.io/api/core/v1 k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1)
+ export GO111MODULE=on
+ GO111MODULE=on
+ '[' -e ./v3 ']'
+ ln -s . v3
+ '[' -e /go/src/github.com/argoproj/argo-cd ']'
+ '[' -d /dist/protoc-include ']'
+ protoc_include=/dist/protoc-include
+ rm -rf /go/src/github.com/gogo/protobuf
+ mkdir -p /go/src/github.com/gogo
mkdir: cannot create directory '/go/src/github.com/gogo': Permission denied
+ rm -rf /go/src/k8s.io/apimachinery
+ mkdir -p /go/src/k8s.io
mkdir: cannot create directory '/go/src/k8s.io': Permission denied
+ rm -rf /go/src/k8s.io/api
+ mkdir -p /go/src/k8s.io
mkdir: cannot create directory '/go/src/k8s.io': Permission denied
+ rm -rf /go/src/k8s.io/apiextensions-apiserver
+ mkdir -p /go/src/k8s.io
mkdir: cannot create directory '/go/src/k8s.io': Permission denied
++ IFS=,
++ echo github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1
++ IFS=,
++ echo +k8s.io/apimachinery/pkg/util/intstr,+k8s.io/apimachinery/pkg/api/resource,+k8s.io/apimachinery/pkg/runtime/schema,+k8s.io/apimachinery/pkg/runtime,k8s.io/apimachinery/pkg/apis/meta/v1,k8s.io/api/core/v1,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1
+ go-to-protobuf --go-header-file=/go/src/github.com/argoproj/argo-cd/hack/custom-boilerplate.go.txt --packages=github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1 --apimachinery-packages=+k8s.io/apimachinery/pkg/util/intstr,+k8s.io/apimachinery/pkg/api/resource,+k8s.io/apimachinery/pkg/runtime/schema,+k8s.io/apimachinery/pkg/runtime,k8s.io/apimachinery/pkg/apis/meta/v1,k8s.io/api/core/v1,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1 --proto-import=/go/src/github.com/argoproj/argo-cd/vendor --proto-import=/dist/protoc-include --output-dir=/go/src/
2025/01/25 04:41:14 protoc -I . -I /go/src/ -I /go/src/github.com/argoproj/argo-cd/vendor -I /dist/protoc-include --gogo_out=/go/src/ /go/src/k8s.io/api/core/v1/generated.proto
2025/01/25 04:41:14 Could not make proto path relative: /go/src/k8s.io/api/core/v1/generated.proto: No such file or directory

2025/01/25 04:41:14 Unable to run protoc on k8s.io.api.core.v1: exit status 1
make: *** [Makefile:210: protogen-fast] Error 1
make: *** [codegen] Error 2

@dudo dudo linked a pull request Jan 25, 2025 that will close this issue
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working component:dev-env
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants