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

Add check that go generate do not produce changes for the branch #30

Open
1 task
denis-tingaikin opened this issue Feb 29, 2024 · 2 comments
Open
1 task
Assignees

Comments

@denis-tingaikin
Copy link
Member

denis-tingaikin commented Feb 29, 2024

Motivation

When we add a patch for the govpp we should make sure that we don't have a diff when run go generate.

TODO

  • Add a ci job for checking that go generate doesn't produce any diff

References

Incident #29
Similar job https://github.com/networkservicemesh/.github/blob/main/.github/workflows/cmd-gogenerate.yaml

@VitalyGushin
Copy link
Collaborator

@denis-tingaikin Seems like the desired behaviour is already implemented here:

- name: Generate files
run: go generate ./...
- name: Check for changes in generated code
run: |
git diff -- binapi || (echo "Rerun go generate ./... locally and resubmit" && exit -1)

@denis-tingaikin
Copy link
Member Author

It seems like it doesn't work; see #27. There is green CI, but actually go generate was required. That is what we did after #29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Moved to next release
Status: Blocked
Development

No branches or pull requests

2 participants