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

Python 3.10.0-rc2 not behaving as expected on Github Actions #477

Closed
FollowTheProcess opened this issue Sep 14, 2021 · 6 comments
Closed
Assignees
Labels
ci Issues relating to nox's CI pipeline

Comments

@FollowTheProcess
Copy link
Collaborator

FollowTheProcess commented Sep 14, 2021

Describe the bug
I happened to notice that the Github Actions 3.10.0-rc2 runs were always successful even when others failed, which prompted me to take a look and I discovered that they are successful because nox is simply skipping citing interpreter not found (see below).

image

I introduced this in #475 because I did the same on some personal projects and saw CI "passing" so thought nothing of it! 🤦🏻

I'll assign this to myself because I'll be sorting it out for my own projects anyway so I'll upstream the solution I find 👍🏻

How to reproduce

Any 3.10.0-rc2 run on Github Actions should do this.

Expected behavior

Should have run nox with python3.10.

Edit: This seems to be because 3.10.0-rc.2 isn't encoded as such on the GHA runner:

image

So nox is doing exactly what it should be doing here and ignoring a missing interpreter. Should be a simple fix to the GHA file 🙂

@FollowTheProcess FollowTheProcess self-assigned this Sep 14, 2021
@FollowTheProcess FollowTheProcess added the ci Issues relating to nox's CI pipeline label Sep 14, 2021
@DiddiLeija
Copy link
Collaborator

I was trying something similar with DiddiLeija/text_formatter#43. The Python 3.10 tests are working fine on my case. I was using

     python-version: ["3.10.0-alpha - 3.10"]

And then I tried

    python-version: ["3.10.0-rc.2"]

On a "wontfix" pull request, I implemented a flake8 error to my code. flake8 found the errors as I expected.

I think there's a missing thing inside the build-py310 step.

@FollowTheProcess
Copy link
Collaborator Author

It's more to do with how we use it. We call nox and pass the matrix.python_version directly to nox --session which works as long as the python interpreter is located on the filesystem as the same path as it's identifier for the setup python action.

In the case of 3.10.0-rc.2 it's name does not match its path on the GHA runner so we'll have to handle this case, it'll just take some playing around to find the cleanest way of handling it.

@DiddiLeija
Copy link
Collaborator

Well, since you've separated the build-py310 step from the others, you can directly tell Nox to use Python 3.10:

        run: nox --non-interactive --session tests-3.10 -- --full-trace

This could be a workaround, until there's a final release for Python 3.10.

@DiddiLeija
Copy link
Collaborator

If you like this idea, tell me and I will post a PR to apply the changes.

@FollowTheProcess
Copy link
Collaborator Author

FollowTheProcess commented Sep 15, 2021

Yeah this would work. I've done this on my fork but unfortunately I think it could be more complex than that as we're now getting coverage failures (see here) so just trying to figure out why code might be uncovered on 3.10 but not on any other version.

It looks like it could be an upstream thing: nedbat/coveragepy#1106

@FollowTheProcess
Copy link
Collaborator Author

Closing in favour of #478

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Issues relating to nox's CI pipeline
Development

No branches or pull requests

2 participants