Tox jobs got upgraded to tox 4 (T345152) and as part of the rewrite upstream dropped support for the `tox:jenkins` section. In the #upstream [[ https://github.com/tox-dev/tox/pull/1902/commits/d91c021eac8462f353972df5035dc9ca0350def1 | documentation for the breaking change ]]:
> People who still want Jenkins override support may create a tox plugin to achieve this functionality
We typically use `tox:jenkins` to override the list of environments and/or ensuring to not skip on missing interpreters.
Examples
https://gerrit.wikimedia.org/r/c/labs/tools/wikinity/+/954748
```
lang=ini,name=tox.ini
[tox]
envlist = lint,test
skipsdist = True
[tox:jenkins]
envlist = lint,jenkins
[testenv]
setenv =
jenkins: FLASK_CONFIG_FILE = wikimedia_config.yaml
[testenv:jenkins]
```
Under Jenkins tox runs `test` instead of `jenkins` and `FLASK_CONFIG_FILE` environment variable is not set which leads to the failure.
Another example is Quibble which has tox environment using whatever python3 version is available while on Jenkins we run against explicit python versions (3.7, 3.8, 3.9):
```
lang=ini,name=tox.ini
[tox]
envlist = check, py3-lint, black, py3-unit, integration
[tox:jenkins]
envlist = check, py{37,38,39}-{lint}, black, py{37,38,39}-{unit}, doc
```