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

Open
zmerlynn opened this issue Apr 19, 2024 · 3 comments · May be fixed by #3811
Open

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

zmerlynn opened this issue Apr 19, 2024 · 3 comments · May be fixed by #3811
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.

@Kalaiselvi84 Kalaiselvi84 linked a pull request May 8, 2024 that will close this issue
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
Development

Successfully merging a pull request may close this issue.

2 participants