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

self-hosted runner failing while trying to get version #96

Closed
4 tasks
tabossert opened this issue May 23, 2020 · 9 comments
Closed
4 tasks

self-hosted runner failing while trying to get version #96

tabossert opened this issue May 23, 2020 · 9 comments
Assignees
Labels
bug Something isn't working

Comments

@tabossert
Copy link

Describe the bug
Getting the following error when running
Version 3.x was not found in the local cache ##[error]Version 3.x with arch x64 not found The list of all available versions can be found here: https://raw.githubusercontent.com/actions/python-versions/master/versions-manifest.json

I have tried both v1 and v2 of setup-python and have tried setting a specific version or latest minor like above. I am running an amazon-linux runner and I am wondering if this will only work on Ubuntu. Could you provide some guidance. Thanks

Which version of the action are you using?

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

Environment

  • [ X ] self-hosted
  • [ X ] Linux
  • Windows
  • Mac

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

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

To Reproduce
Steps to reproduce the behavior:

  1. Add setup action step to actions file
  2. Set Actions file to use self-hosted runner
  3. Run action

Run/Repo Url
Private repo

Screenshots
Screen Shot 2020-05-23 at 9 49 06 AM

Additional context
The runner is using amazon-linux2 based ami

@tabossert tabossert added the bug Something isn't working label May 23, 2020
@tabossert
Copy link
Author

Seems it does work on Ubuntu with same config, might be good to add that this is Ubuntu only in readme for self-hosted

@etienne-napoleone
Copy link

I also can't run those steps locally with act on mac

@konradpabjan
Copy link
Collaborator

konradpabjan commented May 26, 2020

Officially we only support Python for the environments that are listed out here: https://github.com/actions/virtual-environments#available-environments

We compile Python from source for Ubuntu 1604, 1804 and Mac (10.15), the available versions for download are listed out here: https://github.com/actions/python-versions/blob/master/versions-manifest.json

If you have a local runner with something like Ubuntu 1904, then the platform_version will be different so nothing will be found in the manifest and the action will fail with the error you see. Same thing applies to Mac if you're using something other than 10.15.

The fact is it's not working on an amazon-linux runner is expected and we do not plan on supporting Python for configurations other than what we have in virtual-environments.

There are two things we can do here

  • Update the README (we accept PRs 😃 )
    • Mention we only support the same platforms as those listed in virtual-environments
    • Explain why we only support those platforms
      - Maintenance, maintenance, maintenance
      - For Ubuntu and Mac, we compile from source so it is impossible to support all Linux distros and we have no plans to support more.
      - For Windows we download and use the MSI installers so those should work on all versions
  • Even more logging and a better error message that says exactly why no version was found. It's very ambiguous right now.

@mariocesar
Copy link

mariocesar commented Jul 29, 2020

Having the same issue with Ubuntu 18.04, I tried some other workarounds like setting the env RUNNER_TOOL_CACHE
RUNNER_TEMP to writable directories, but no change it still fails to get the python version.

Is for sure this is related to the Ubuntu version where the runner is ?

@ukstv
Copy link

ukstv commented Oct 3, 2020

Hit this too. This seems like an issue in https://github.com/actions/toolkit. It reads version from /etc/lsb-release which seems to be deprecated in favour of /etc/os-release. That is, in most of the Linux distributions os-release is present, while lsb-release is not. The actions toolkit then can not figure version of the distro. Proposed fix in actions/toolkit#594

@melroyvandenberg
Copy link

Help!?

@DavidGOrtega
Copy link

DavidGOrtega commented Feb 15, 2021

👋 we hit this within an ubuntu 18.04 image, I mean a self hosted runner being executed within an ubuntu 18.04

Version 3.8.4 was not found in the local cache
Version 3.8.4 is available for downloading
Download from "https://github.com/actions/python-versions/releases/download/3.8.4-96744/python-3.8.4-linux-18.04-x64.tar.gz"
Extract downloaded archive
/bin/tar xz --warning=no-unknown-keyword -C /__w/_temp/d4bf8825-2e51-48df-9471-1f742c18aa34 -f /__w/_temp/38e5f214-9cc7-44e5-b389-3dfaf10504b0
Execute installation script
Check if Python hostedtoolcache folder exist...
Creating Python hostedtoolcache folder...
Create Python 3.8.4 folder
Copy Python binaries to hostedtoolcache folder
Create additional symlinks (Required for the UsePythonVersion Azure Pipelines task and the setup-python GitHub Action)
Upgrading PIP...
Looking in links: /tmp/tmpj2_2nn33
Requirement already satisfied: setuptools in /__t/Python/3.8.4/x64/lib/python3.8/site-packages (47.1.0)
Requirement already satisfied: pip in /__t/Python/3.8.4/x64/lib/python3.8/site-packages (20.1.1)
Collecting pip
Downloading pip-21.0.1-py3-none-any.whl (1.5 MB)
Installing collected packages: pip
Successfully installed pip-21.0.1
Create complete file
Error: Version 3.8.4 with arch x64 not found
The list of all available versions can be found here: https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json

To give a bit of more context, its our own AMI based on Ubuntu 18.04

@DavidGOrtega
Copy link

As you can see @konradpabjan we even find the proper version and we download it

Download from "https://github.com/actions/python-versions/releases/download/3.8.4-96744/python-3.8.4-linux-18.04-x64.tar.gz"
Extract downloaded archive

But then the error is hit

@e-korolevskii
Copy link
Contributor

Hello here!
I apologize for the delay.
Please let us know if this is still relevant for you, otherwise I'm going to close this issue.

@e-korolevskii e-korolevskii self-assigned this Jul 7, 2022
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

8 participants