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

Seemingly correct version and environment not being recognized #125

Closed
1 of 7 tasks
aronchick opened this issue Jul 30, 2020 · 9 comments
Closed
1 of 7 tasks

Seemingly correct version and environment not being recognized #125

aronchick opened this issue Jul 30, 2020 · 9 comments
Assignees
Labels
bug Something isn't working

Comments

@aronchick
Copy link

Describe the bug
A clear and concise description of what the bug is.
I have a simple setup python job at the top of my workflow.

      - name: Set up Python 3.7.7
        id: python_setup
        uses: actions/setup-python@v2
        with:
          python-version: '3.7.x'
          architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified

However, when I run it, it doesn't seem to work. The weird thing is that you can see that the lines appear to pass correctly, but the test still fails.

[Lint and Test/Lint and Test    ]   💬  ::debug::check 3.7.8 satisfies 3.7.x
[Lint and Test/Lint and Test    ]   💬  ::debug::x64===x64 && darwin===linux
[Lint and Test/Lint and Test    ]   💬  ::debug::x64===x64 && linux===linux
[Lint and Test/Lint and Test    ]   💬  ::debug::x64===x64 && linux===linux
[Lint and Test/Lint and Test    ]   💬  ::debug::x64===x64 && linux===linux
[Lint and Test/Lint and Test    ]   💬  ::debug::x64===x64 && win32===linux
[Lint and Test/Lint and Test    ]   💬  ::debug::x86===x64 && win32===linux
[Lint and Test/Lint and Test    ]   💬  ::debug::check 3.7.7 satisfies 3.7.x
[Lint and Test/Lint and Test    ]   💬  ::debug::x64===x64 && darwin===linux
[Lint and Test/Lint and Test    ]   💬  ::debug::x64===x64 && linux===linux
[Lint and Test/Lint and Test    ]   💬  ::debug::x64===x64 && linux===linux
[Lint and Test/Lint and Test    ]   💬  ::debug::x64===x64 && linux===linux
[Lint and Test/Lint and Test    ]   💬  ::debug::x64===x64 && win32===linux
[Lint and Test/Lint and Test    ]   💬  ::debug::x86===x64 && win32===linux
[Lint and Test/Lint and Test    ]   💬  ::debug::check 3.7.6 satisfies 3.7.x
[Lint and Test/Lint and Test    ]   💬  ::debug::x64===x64 && darwin===linux
[Lint and Test/Lint and Test    ]   💬  ::debug::x64===x64 && linux===linux
[Lint and Test/Lint and Test    ]   💬  ::debug::x64===x64 && linux===linux
[Lint and Test/Lint and Test    ]   💬  ::debug::x64===x64 && linux===linux
[Lint and Test/Lint and Test    ]   💬  ::debug::x64===x64 && win32===linux
[Lint and Test/Lint and Test    ]   💬  ::debug::x86===x64 && win32===linux
[Lint and Test/Lint and Test    ]   💬  ::debug::check 3.7.5 satisfies 3.7.x
[Lint and Test/Lint and Test    ]   💬  ::debug::x64===x64 && darwin===linux
[Lint and Test/Lint and Test    ]   💬  ::debug::x64===x64 && linux===linux
[Lint and Test/Lint and Test    ]   💬  ::debug::x64===x64 && linux===linux
[Lint and Test/Lint and Test    ]   💬  ::debug::x64===x64 && linux===linux
[Lint and Test/Lint and Test    ]   💬  ::debug::x64===x64 && win32===linux
[Lint and Test/Lint and Test    ]   💬  ::debug::x86===x64 && win32===linux
[Lint and Test/Lint and Test    ]   💬  ::debug::check 3.6.11 satisfies 3.7.x
[Lint and Test/Lint and Test    ]   💬  ::debug::check 3.6.10 satisfies 3.7.x
[Lint and Test/Lint and Test    ]   💬  ::debug::check 3.6.9 satisfies 3.7.x
[Lint and Test/Lint and Test    ]   💬  ::debug::check 3.6.8 satisfies 3.7.x
[Lint and Test/Lint and Test    ]   💬  ::debug::check 3.6.7 satisfies 3.7.x
[Lint and Test/Lint and Test    ]   💬  ::debug::check 3.5.9 satisfies 3.7.x
[Lint and Test/Lint and Test    ]   💬  ::debug::check 3.5.4 satisfies 3.7.x
[Lint and Test/Lint and Test    ]   💬  ::debug::check 3.4.10 satisfies 3.7.x
[Lint and Test/Lint and Test    ]   💬  ::debug::check 3.3.7 satisfies 3.7.x
[Lint and Test/Lint and Test    ]   💬  ::debug::check 2.7.18 satisfies 3.7.x
[Lint and Test/Lint and Test    ]   💬  ::debug::check 2.7.17 satisfies 3.7.x
[Lint and Test/Lint and Test    ]   ❗  ::error::Version 3.7.x with arch x64 not found%0AThe list of all available versions can be found here: https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json
[Lint and Test/Lint and Test    ]   ❌  Failure - Set up Python 3.7.7

Which version of the action are you using?

  • v1
  • v2
  • Some other tag (such as v2.0.1 or master)

Environment

  • self-hosted
  • Linux
  • Windows
  • Mac

If applicable, please specify if you're using a container

Python Versions
Please list all of the effected versions of Python (3.8.2, etc.)
3.7.x

To Reproduce
Steps to reproduce the behavior:

  1. Set up a VM with the following: Linux cloudVM 5.3.0-1032-azure #33~18.04.1-Ubuntu SMP Fri Jun 26 15:01:15 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
  2. Have a workflow with the job included.
  3. Run the workflow.

Run/Repo Url
If applicable, and if your repo/run is public, please include a URL so it is easier for us to investigate.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

@aronchick aronchick added the bug Something isn't working label Jul 30, 2020
@aronchick aronchick changed the title Weird bug under Ubuntu? Seemingly correct version and environment not being recognized Jul 30, 2020
@RomainMuller
Copy link

I'm also hitting this with 3.6 (as 3.6.x). Interestingly, it works in "real" GitHub Actions, but it does not work locally using nektos/act.

@akhter-ali
Copy link

Running into the same with local runners.

@varunpalekar
Copy link

varunpalekar commented Aug 15, 2020

I also face same issue with local runner (nektos/act)

[pre-commit/pre-commit                        ]   🐳  docker cp src=/home/.cache/act/actions-setup-python@v2 dst=/actions/
[pre-commit/pre-commit                        ] Exec command '[mkdir -p /actions/]'
DEBU[0002] Writing tarball /tmp/act818063525 from /home/.cache/act/actions-setup-python@v2
DEBU[0002] Stripping prefix:/home/.cache/act/ src:/home/.cache/act/actions-setup-python@v2
[pre-commit/pre-commit                        ] Extracting content from '/tmp/act818063525' to '/actions/'
[pre-commit/pre-commit                        ] Exec command '[node /actions/actions-setup-python@v2/dist/index.js]'
[pre-commit/pre-commit                        ]   💬  ::debug::Semantic version spec of 3.6.10 is 3.6.10
[pre-commit/pre-commit                        ]   💬  ::debug::isExplicit: 3.6.10
[pre-commit/pre-commit                        ]   💬  ::debug::explicit? true
[pre-commit/pre-commit                        ]   💬  ::debug::checking cache: /opt/hostedtoolcache/Python/3.6.10/x64
[pre-commit/pre-commit                        ]   💬  ::debug::not found
| Version 3.6.10 was not found in the local cache
[pre-commit/pre-commit                        ]   💬  ::debug::check 3.9.0-rc.1 satisfies 3.6.10
[pre-commit/pre-commit                        ]   💬  ::debug::check 3.9.0-beta.5 satisfies 3.6.10
[pre-commit/pre-commit                        ]   💬  ::debug::check 3.9.0-beta.4 satisfies 3.6.10
[pre-commit/pre-commit                        ]   💬  ::debug::check 3.8.5 satisfies 3.6.10
[pre-commit/pre-commit                        ]   💬  ::debug::check 3.8.4 satisfies 3.6.10
[pre-commit/pre-commit                        ]   💬  ::debug::check 3.8.3 satisfies 3.6.10
[pre-commit/pre-commit                        ]   💬  ::debug::check 3.8.2 satisfies 3.6.10
[pre-commit/pre-commit                        ]   💬  ::debug::check 3.8.1 satisfies 3.6.10
[pre-commit/pre-commit                        ]   💬  ::debug::check 3.8.0 satisfies 3.6.10
[pre-commit/pre-commit                        ]   💬  ::debug::check 3.7.8 satisfies 3.6.10
[pre-commit/pre-commit                        ]   💬  ::debug::check 3.7.7 satisfies 3.6.10
[pre-commit/pre-commit                        ]   💬  ::debug::check 3.7.6 satisfies 3.6.10
[pre-commit/pre-commit                        ]   💬  ::debug::check 3.7.5 satisfies 3.6.10
[pre-commit/pre-commit                        ]   💬  ::debug::check 3.6.11 satisfies 3.6.10
[pre-commit/pre-commit                        ]   💬  ::debug::check 3.6.10 satisfies 3.6.10
[pre-commit/pre-commit                        ]   💬  ::debug::x64===x64 && darwin===linux
[pre-commit/pre-commit                        ]   💬  ::debug::x64===x64 && linux===linux
[pre-commit/pre-commit                        ]   💬  ::debug::x64===x64 && linux===linux
[pre-commit/pre-commit                        ]   💬  ::debug::x64===x64 && linux===linux
[pre-commit/pre-commit                        ]   💬  ::debug::check 3.6.9 satisfies 3.6.10
[pre-commit/pre-commit                        ]   💬  ::debug::check 3.6.8 satisfies 3.6.10
[pre-commit/pre-commit                        ]   💬  ::debug::check 3.6.7 satisfies 3.6.10
[pre-commit/pre-commit                        ]   💬  ::debug::check 3.5.9 satisfies 3.6.10
[pre-commit/pre-commit                        ]   💬  ::debug::check 3.5.4 satisfies 3.6.10
[pre-commit/pre-commit                        ]   💬  ::debug::check 3.4.10 satisfies 3.6.10
[pre-commit/pre-commit                        ]   💬  ::debug::check 3.3.7 satisfies 3.6.10
[pre-commit/pre-commit                        ]   💬  ::debug::check 2.7.18 satisfies 3.6.10
[pre-commit/pre-commit                        ]   💬  ::debug::check 2.7.17 satisfies 3.6.10
[pre-commit/pre-commit                        ]   ❗  ::error::Version 3.6.10 with arch x64 not found%0AThe list of all available versions can be found here: https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json
[pre-commit/pre-commit                        ]   ❌  Failure - actions/setup-python@v2
DEBU[0004] exit with `FAILURE`: 1
DEBU[0004] exit with `FAILURE`: 1
Error: exit with `FAILURE`: 1

@carlthome
Copy link

Same issue here! My workaround for now is to run the job inside a container instead but ultimately I'd like to know that my Python application works on different OS:es so would still like to see this resolved.

@MrZilinXiao
Copy link

Same issue when using act!

@RomainMuller
Copy link

So - I suspect the culprit is actually different platform versions, which you can see in the manifest: https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json

Those are actually (silently) checked for in @actions/tool-cache: https://github.com/actions/toolkit/blob/af821474235d3c5e1f49cee7c6cf636abb0874c4/packages/tool-cache/src/manifest.ts#L87-L96

When using nektos/act, you'd want to ensure act is using an image that has is based off one supported platform image (per it's LSB tags). For example, adding -P ubuntu-latest=nektos/act-environments-ubuntu:18.04 to the act invocation or in .actrc (careful - the nektos/act-environments-ubuntu:18.04 image is HUGE).

@AutomatedTester
Copy link

This seems to have started 2 days ago on the Selenium project.

- name: Set up Python 3.7
  uses: actions/setup-python@v2
  with:
       python-version: 3.7

In this run , we are setting 3.7 but the error below shows that python 3.6.9 is the runtime that is being used.

assert sys.version_info >= (3, 7), f"To generate the CDP code requires python 3.7 or later. Executing python is {sys.version_info}"
AssertionError: To generate the CDP code requires python 3.7 or later. Executing python is sys.version_info(major=3, minor=6, micro=9, releaselevel='final', serial=0)

@yousefamar
Copy link

FYI, @RomainMuller hit the nail on the head, and there's a lighter workaround here: nektos/act#251

@e-korolevskii e-korolevskii self-assigned this Jul 7, 2022
@e-korolevskii
Copy link
Contributor

Hello everyone!
I understand that a lot of time has passed and I apologize for that. Unfortunately, this bug cannot be reproduced at this time. Plus, it uses an outdated version of action.
Please let us know if this is still relevant for you, otherwise I'm going to close this issue.

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

No branches or pull requests

9 participants