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

Strange lint CI failure? #545

Closed
FollowTheProcess opened this issue Dec 28, 2021 · 6 comments · Fixed by #547
Closed

Strange lint CI failure? #545

FollowTheProcess opened this issue Dec 28, 2021 · 6 comments · Fixed by #547
Labels
bug ci Issues relating to nox's CI pipeline upstream This is a bug in one of our dependencies

Comments

@FollowTheProcess
Copy link
Collaborator

FollowTheProcess commented Dec 28, 2021

Describe the bug

Noticed a lint job failure after merging #543 (which had no such failure on the PR):

See here

image

I tried re-running but got the same outcome, then on my fork I tried adding python -m pip install --upgrade pip setuptools wheel to all CI jobs but got the same outcome

Edit: Also tried injecting setuptools directly into the nox session with session.install("setuptools", "pre-commit"), same result

Edit2: It seemed to always happen on isort so I tried removing it from the pre-commit config but it then just failed on black with the exact same error

How to reproduce

Look at the CI lint job, it seems to happen on re-runs

Expected behavior

Should run to success like in the PR

@FollowTheProcess FollowTheProcess added bug ci Issues relating to nox's CI pipeline labels Dec 28, 2021
@cjolowicz
Copy link
Collaborator

I could only skim through them, but the failure may be related to these issues:

Would updating setuptools in the runner's Python installation help?

python -m pip install -U setuptools

I'm assuming here that which python prints /opt/hostedtoolcache/Python/3.9.9/x64/bin/python, as that's the runner's Python installation. Maybe add that line to the workflow when testing.

@FollowTheProcess
Copy link
Collaborator Author

FollowTheProcess commented Dec 28, 2021

I'm assuming here that which python prints /opt/hostedtoolcache/Python/3.9.9/x64/bin/python, as that's the runner's Python installation. Maybe add that line to the workflow when testing.

Yep!

I tried python -m pip install -U setuptools too to no avail: here

Very strange

I can't replicate it locally either with makes me think it's a GHA runner related thing?

@cjolowicz
Copy link
Collaborator

I tried python -m pip install -U setuptools too to no avail: here

You need to invoke this outside of the virtualenv created by Nox.

Alternatively, use the full path:

/opt/hostedtoolcache/Python/3.9.9/x64/bin/python -m pip install -U setuptools

@cjolowicz
Copy link
Collaborator

Sorry I didn't see you were already doing this.

@FollowTheProcess
Copy link
Collaborator Author

There was a new release of virtualenv today which bumped the embedded version of setuptools, that's next on my list!

@FollowTheProcess
Copy link
Collaborator Author

FollowTheProcess commented Dec 28, 2021

It looks like virtualenv is the culprit! See my now passing lint run here

Pinning virtualenv to 20.10.0 inside the lint session has fixed it.

pre-commit depends on virtualenv>=20.0.8

So it must have pulled in today's 20.11.0, I guess they released it in between the PR and the CI run after the merge.

virtualenv 20.11.0 bumps the embedded setuptools from 58.3.0 to 59.4.0 so I guess there is a breaking change in there somewhere. Weird that I couldn't reproduce locally though, even with these versions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug ci Issues relating to nox's CI pipeline upstream This is a bug in one of our dependencies
Development

Successfully merging a pull request may close this issue.

3 participants