Skip to content

Github Actions issue with tox #819

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

Closed
chris-langfield opened this issue Dec 23, 2022 · 4 comments · Fixed by #820
Closed

Github Actions issue with tox #819

chris-langfield opened this issue Dec 23, 2022 · 4 comments · Fixed by #820
Assignees
Labels
bug Something isn't working CI Continuous Integration

Comments

@chris-langfield
Copy link
Collaborator

chris-langfield commented Dec 23, 2022

As of this morning our tox build workflow is failing on Github Actions.

During attempted execution of the following command:

sh -c 'pip freeze | cut -d@ -f1 | cut -d= -f1 | xargs -n1 pip install -U'

Tox itself fails with the message:

py3.8-dev: failed with sh is not allowed, use allowlist_externals to allow it

(also happening for other environments)

https://github.com/ComputationalCryoEM/ASPIRE-Python/actions/runs/3766988114/jobs/6404083720
https://github.com/ComputationalCryoEM/ASPIRE-Python/actions/runs/3766921945

Test run including a naive addition to the check step that finds the sh installed on the runner:

https://github.com/ComputationalCryoEM/ASPIRE-Python/actions/runs/3766977486

@chris-langfield chris-langfield added bug Something isn't working CI Continuous Integration labels Dec 23, 2022
@chris-langfield chris-langfield self-assigned this Dec 23, 2022
@chris-langfield
Copy link
Collaborator Author

chris-langfield commented Dec 23, 2022

Okay, pretty sure we know what's going on:

From tox 3.x -> tox 4.x there have been changes regarding using commands not already in the tox environment, causing the error above.

We have not caught these until now because we have only been testing using tox 3.x:

@chris-langfield
Copy link
Collaborator Author

What's interesting is that between the last passing GA workflow and the one that failed, the behavior of the Install dependencies step changed. In particular, pip used to pick up a tox==3.28 in addition to latest tox and ended up using that one for some reason:

Old:

Requirement already satisfied: pip in /opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages (22.3.1)
Collecting tox
  Downloading tox-4.0.16-py3-none-any.whl (143 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 143.9/143.9 kB 3.5 MB/s eta 0:00:00
Collecting tox-gh-actions
  Downloading tox_gh_actions-2.12.0-py2.py3-none-any.whl (11 kB)

     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.6/42.6 kB 12.9 MB/s eta 

[...]

Collecting tox
  Downloading tox-3.28.0-py2.py3-none-any.whl (86 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 86.8/86.8 kB 26.1 MB/s eta 

[...]

Successfully installed ... tox-3.28.0 tox-gh-actions-2.12.0 ...

New:

Requirement already satisfied: pip in /opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages (22.3.1)
Collecting tox
  Downloading tox-4.0.16-py3-none-any.whl (143 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 143.9/143.9 kB 4.3 MB/s eta 0:00:00
Collecting tox-gh-actions
  Downloading tox_gh_actions-3.0.0-py2.py3-none-any.whl (9.7 kB)

[...]

Successfully installed ... tox-4.0.16 tox-gh-actions-3.0.0  ...

@chris-langfield
Copy link
Collaborator Author

Possible culprit: https://github.com/actions/setup-python/releases/tag/v4.4.0 released yesterday

@chris-langfield
Copy link
Collaborator Author

Still curious about what exactly happened there but the patch is in regardless

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CI Continuous Integration
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant