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-local error: Could not make proto path relative: No such file or directory #21469

Closed
3 tasks
reggie-k opened this issue Jan 13, 2025 · 0 comments · Fixed by #21473
Closed
3 tasks
Assignees
Labels
bug Something isn't working component:docs version:2.14 Latest confirmed affected version is 2.14

Comments

@reggie-k
Copy link
Member

reggie-k commented Jan 13, 2025

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

Upon running make codegen local, I receive: Could not make proto path relative: 025/01/13 11:40:17 protoc -I . -I /Users/codefresh/go/src/ -I /Users/codefresh/GolandProjects/argo-cd/vendor -I /Users/codefresh/GolandProjects/argo-cd/dist/protoc-include --gogo_out=/Users/codefresh/go/src/ /Users/codefresh/go/src/github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1/generated.proto
2025/01/13 11:40:17 Could not make proto path relative: /Users/codefresh/go/src/github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1/generated.proto: No such file or directory

The reason is that codegen-local is using ~/go/src/ ($GOPATH) during run, and in my case, while the Argo CD repo was cloned under ~/GolandProjects/argo-cd, there also existed an older clone inder $GOPATH, so the old files in $GOPATH were used.
While investigating this, it became clear that we don't require the repo to be cloned under $GOPATH anymore, it can be cloned anywhere, and that GOPATH should not be used unless the active repo WAS cloned there initially.
So the docs should be updated with removing the requirement for $GOPATH and the above clarification.
To Reproduce

Clone the Argo CD repo to any path NOT under ~/go/src/ .
Then clone the Argo CD repo to ~/go/src, and checkout some really old release branch.
run make codegen-local on the FIRST repo and observe it fails.

Additionally, the docs for contributors about the available make targets are not up to date, so it is beneficial to update those.

Expected behavior

make codegen-local finishes successfully

Screenshots

Version
Latest commit on master branch

v2.14.0+4d98359

Logs

Paste any relevant application logs here.
@reggie-k reggie-k added bug Something isn't working component:docs version:2.14 Latest confirmed affected version is 2.14 labels Jan 13, 2025
@reggie-k reggie-k self-assigned this Jan 13, 2025
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:docs version:2.14 Latest confirmed affected version is 2.14
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant