Context
T345152 is for the CI job on`operations/puppet` not noticing changes made to the requirements file. The reason is the container image has the requirements pre installed (by running tox --notest when building the image) and tox version 3 was unable to detect changes (tox #149) which is addressed by tox version 4 which is a major rewrite.
I have upgraded the releng/operations-puppet image to use tox (and attached patches to T345152), but being a major rewrite, there are more than a few fixes needed. Some indications are listed at upstream guide Upgrading to tox v4.
«« Code search for tox.ini »»
Some issues I have noticed so far:
- tox:jenkins is no more supported (T345607)
- usedevelop=true not working when skipsdist=true T346238
- tox -e someenv path1 path2 is no more supported. The paths need to be separated by a double dash: tox -e someenv -- path1 path2
- whitelist_externals is no more recognized and should be replaced by allowlist_externals
- Python 2.7 is no more recognized since tox delegates the discovery to virtualenv. That has been addressed by pinning virtualenv to 20.21.1.
- TOX_TESTENV_PASSENV no more supported (discussion 2681), we rely on it to pass environment variable from CI such as XDG_CACHE_HOME.
- Can't reuse env_dir between environments (issue 425) since each env_dir is tied to the environment name defined in tox. There is a plugin for that: tox-ignore-env-name-mismatch
- Comments in tox.ini are handled differently, notably it does not recognized an indented comment in a multilne option such as:
[flake8] extend_ignore = # expected 2 blank lines, found 1 E302
# expected 2 blank lines, found 1 ends up being passed as is. The fix is to deindent it in order for tox to recognize it as a comment :)
This task is to track fallout and adjustments to be made to any affected repositories.