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

chore: Ensure protobuf codegen changes are in root directory #7392

Merged
merged 4 commits into from
Dec 13, 2021

Conversation

simster7
Copy link
Member

Signed-off-by: Simon Behar simbeh7@gmail.com

Don't bother creating a PR until you've done this:

  • Run make pre-commit -B to fix codegen, lint, and commit message problems.

Create your PR as a draft.

  • Your PR needs to pass the required checks before it can be approved. If the check is not required (e.g. E2E tests) it
    does not need to pass.
  • Once required tests have passed, you can make it "Ready for review".
  • Say how how you tested your changes. If you changed the UI, attach screenshots.

Tips:

  • If changes were requested, and you've made them, then dismiss the review to get it looked at again.
  • Add you organization to USERS.md if you like.
  • You can ask for help!

Signed-off-by: Simon Behar <simbeh7@gmail.com>
Copy link
Member Author

@simster7 simster7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Am I the only one with this problem? When running make codegen, protobuf changes that are supposed to be in pkg/... are instead written to v3/pkg/...:

$ git status
On branch master
Your branch is up to date with 'origin/master'.

Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
	modified:   manifests/base/crds/full/argoproj.io_clusterworkflowtemplates.yaml
	modified:   manifests/base/crds/full/argoproj.io_cronworkflows.yaml
	modified:   manifests/base/crds/full/argoproj.io_workflows.yaml
	modified:   manifests/base/crds/full/argoproj.io_workflowtasksets.yaml
	modified:   manifests/base/crds/full/argoproj.io_workflowtemplates.yaml
	modified:   pkg/apis/workflow/v1alpha1/http_types.go
	modified:   workflow/executor/agent.go

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	t.yaml
	v3/

$  rsync -a -v v3/ ./
building file list ... done
pkg/
pkg/apis/
pkg/apis/workflow/
pkg/apis/workflow/v1alpha1/
pkg/apis/workflow/v1alpha1/generated.pb.go
pkg/apis/workflow/v1alpha1/generated.proto

sent 1008604 bytes  received 88 bytes  2017384.00 bytes/sec
total size is 1008178  speedup is 1.00
$  git status
On branch master
Your branch is up to date with 'origin/master'.

Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
	modified:   manifests/base/crds/full/argoproj.io_clusterworkflowtemplates.yaml
	modified:   manifests/base/crds/full/argoproj.io_cronworkflows.yaml
	modified:   manifests/base/crds/full/argoproj.io_workflows.yaml
	modified:   manifests/base/crds/full/argoproj.io_workflowtasksets.yaml
	modified:   manifests/base/crds/full/argoproj.io_workflowtemplates.yaml
	modified:   pkg/apis/workflow/v1alpha1/http_types.go
	modified:   workflow/executor/agent.go

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   pkg/apis/workflow/v1alpha1/generated.pb.go
	modified:   pkg/apis/workflow/v1alpha1/generated.proto

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	t.yaml

Signed-off-by: Simon Behar <simbeh7@gmail.com>
Signed-off-by: Simon Behar <simbeh7@gmail.com>
Comment on lines +300 to +301
# These files are generated on a v3/ folder by the tool. Link them to the root folder
[ -e ./v3 ] || ln -s . v3
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should not have been removed in #6893

Another solution, if creating soft links is not acceptable is to copy the files manually after they are created:

...
# These files are generated on a v3/ folder. Move them to the root 
rsync -a -v v3/ ./ --remove-source-files
...

I like the link solution better though as it gives the tool access to the existing files if it needs them.

Signed-off-by: Simon Behar <simbeh7@gmail.com>
@alexec alexec merged commit ae91861 into argoproj:master Dec 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants