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 GH action to run toxgen script periodically and have it submit a PR #4050

Open
sentrivana opened this issue Feb 13, 2025 · 0 comments · May be fixed by #4071
Open

Add GH action to run toxgen script periodically and have it submit a PR #4050

sentrivana opened this issue Feb 13, 2025 · 0 comments · May be fixed by #4071
Assignees
Labels
Component: Tests Dealing with tests

Comments

@sentrivana
Copy link
Contributor

No description provided.

@sentrivana sentrivana added the Component: Tests Dealing with tests label Feb 13, 2025
sentrivana added a commit that referenced this issue Feb 19, 2025
Add `fail_on_changes` to toxgen. The idea is that the script will now
have two modes:

- **Normal mode** (when `fail_on_changes` is `False`) that is used to
actually generate the `tox.ini` file. This [will
be](#4050) run in a
cron job in CI and create a PR with the updated test setup.
- The newly added **fail-on-changes mode** (when `fail_on_changes` is
`True`) that is used to detect manual changes to one of the affected
files without updating the rest (e.g. making a manual change to
`tox.ini` without updating the `tox.jinja` template). This will be run
in CI similar to the `fail_on_changes` check of `split-tox-gh-actions`.

The problem with detecting manual changes is that if we just reran the
script on each PR, chances are it would pull in new releases that are
not part of the `tox.ini` on master, making the file look different from
what was committed as if it had unrelated manual changes.

To counteract this, we now store the timestamp when the file was last
generated in `tox.ini`. We use this in fail-on-changes mode to filter
out releases that popped up after the file was last generated. This way,
the package versions should be the same and if there is anything
different in `tox.ini`, it's likely to be the manual changes that we
want to detect.

Closes #4051
@sentrivana sentrivana linked a pull request Feb 19, 2025 that will close this issue
@sentrivana sentrivana self-assigned this Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Tests Dealing with tests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant