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

Fail CI if a PR updates an example without modifying the version #3794

Closed
zmerlynn opened this issue Apr 19, 2024 · 5 comments · Fixed by #3940
Closed

Fail CI if a PR updates an example without modifying the version #3794

zmerlynn opened this issue Apr 19, 2024 · 5 comments · Fixed by #3940
Labels
good first issue These are great first issues. If you are looking for a place to start, start here! kind/feature New features for Agones

Comments

@zmerlynn
Copy link
Collaborator

If someone modifies anything in examples/foo, there should be a corresponding change to the version := line in the Makefile. This should be easy to catch in CI. This would catch some of the common cases like #3793 (which should have been flagged), and also fail Dependabot PRs against examples/ early.

If we want to get fancy, there's technically files like README.md that can be ignored in every directory.

@zmerlynn zmerlynn added kind/feature New features for Agones good first issue These are great first issues. If you are looking for a place to start, start here! labels Apr 19, 2024
@Kalaiselvi84
Copy link
Contributor

@zmerlynn, The version value in the Makefile should be incremented only if there are any changes in the following files: main.go, Dockerfile, Dockerfile.windows, go.mod, and go.sum.

The following files can be ignored:
*.md, *.yaml, *.pb, *.tpl, *.tf, *.csproj, *.cs, *.txt, *.cc, OWNERS, *.json, .gitignore, *.toml, *.sh, *.xml, *.meta, *.asset.

Please let me know if I have included any files in the ignored list by mistakenly.

@zmerlynn
Copy link
Collaborator Author

zmerlynn commented May 3, 2024

I would tend towards to a denylist but make it less broad. In particular, things like .sh, .toml, .asset, .csproj are all part of the build, so maybe ignore: *.md, *.yaml, OWNERS, .gitignore

In addition, if you want you can add to each of the version files (probably right above the version or on the same line?) a comment line # Change this to ignore the version change presubmit: XYZ. Basically, show the user some way if they trip the presubmit to have it ignored, and an easy way is a line that will show up in the diff.

@Kalaiselvi84
Copy link
Contributor

Update: I'm working on this issue and have noticed that the script should ignore comments. I'm currently looking into this.

wheatear-dev added a commit to wheatear-dev/agones that referenced this issue Aug 10, 2024
…g the version

Further to issue googleforgames#3794, if any files change within an example - outside of a
simple denylist - and the version in its Makefile is not updated, this new tool
will fail the CI pipeline.
wheatear-dev added a commit to wheatear-dev/agones that referenced this issue Aug 10, 2024
Further to issue googleforgames#3794, if any files change within an example - outside of a
simple denylist - and the version in its Makefile is not updated, this new tool
will fail the CI pipeline.
wheatear-dev added a commit to wheatear-dev/agones that referenced this issue Aug 11, 2024
Further to issue googleforgames#3794, if any files change within an example - outside
of a simple denylist - and the version in its Makefile is not updated,
this new tool will fail the CI pipeline.
wheatear-dev added a commit to wheatear-dev/agones that referenced this issue Aug 11, 2024
Further to issue googleforgames#3794, if any files change within an example - outside
of a simple denylist - and the version in its Makefile is not updated,
this new tool will fail the CI pipeline
Copy link

'This issue is marked as Stale due to inactivity for more than 30 days. To avoid being marked as 'stale' please add 'awaiting-maintainer' label or add a comment. Thank you for your contributions '

@github-actions github-actions bot added the stale Pending closure unless there is a strong objection. label Oct 15, 2024
@markmandel
Copy link
Member

This is being worked on, so bumping.

@github-actions github-actions bot removed the stale Pending closure unless there is a strong objection. label Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue These are great first issues. If you are looking for a place to start, start here! kind/feature New features for Agones
Projects
None yet
3 participants