tox-gh icon indicating copy to clipboard operation
tox-gh copied to clipboard

Possible regression with tox-gh v1.4.4

Open Zeitsperre opened this issue 1 year ago • 4 comments

It appears that some behaviour has changed in v1.4.4 and is preventing the proper environment from being run. See: https://github.com/Ouranosinc/figanos/actions/runs/11669868968/job/32492859426

Note in the logs that tox-gh is correctly identifying that it is running in GitHub Workflows:

ROOT: running tox-gh
ROOT: tox-gh set py310-coveralls

But after running the tests for the proper environment, it continues with others:

...
py310: OK ✔ in 1 minute 9.64 seconds
  py311: skipped because could not find python interpreter with spec(s): py311
  py311: SKIP ⚠ in 0.01 seconds
  py312: skipped because could not find python interpreter with spec(s): py312
  py312: SKIP ⚠ in 0.01 seconds
  py313: skipped because could not find python interpreter with spec(s): py313
  py313: SKIP ⚠ in 0.01 seconds
  docs: setuptools-75.3.0-py3-none-any.whl already present in /home/runner/.local/share/virtualenv/wheel/3.10/embed/3/setuptools.json
  docs: wheel-0.44.0-py3-none-any.whl already present in /home/runner/.local/share/virtualenv/wheel/3.10/embed/3/wheel.json
  docs: pip-24.3.1-py3-none-any.whl already present in /home/runner/.local/share/virtualenv/wheel/3.10/embed/3/pip.json
...

The previous versions running in my CI (tox==4.21.0, tox-gh==1.3.2) worked as expected.

Zeitsperre avatar Nov 04 '24 18:11 Zeitsperre

PR welcome to fix it 🤔

gaborbernat avatar Nov 05 '24 20:11 gaborbernat

I'd be interested to try my hand at figuring out where the problem is, but I wouldn't know where to start. How exactly does the hook get called for tox-gh? I'm guessing that tox.plugin.impl is called during setup?

Zeitsperre avatar Nov 05 '24 20:11 Zeitsperre

Yeah tox uses pluggy to allow code injection, see the impl annotations here https://github.com/tox-dev/tox-gh/blob/main/src/tox_gh/plugin.py#L64

https://tox.wiki/en/latest/plugins.html documents each end point and when is called

gaborbernat avatar Nov 05 '24 20:11 gaborbernat

This seems to occur only with tox.ini configuration. Migrating to pyproject.toml resulted in proper operation.

kurtraschke avatar Nov 06 '24 02:11 kurtraschke

I suspect this happens when tox must provision itself (i.e. when there is a requires section).

tucked avatar Nov 06 '25 00:11 tucked