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

setup-python step fails on non Ubuntu self hosted runners #69

Closed
goffinfnbs opened this issue Nov 15, 2023 · 7 comments
Closed

setup-python step fails on non Ubuntu self hosted runners #69

goffinfnbs opened this issue Nov 15, 2023 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@goffinfnbs
Copy link

goffinfnbs commented Nov 15, 2023

Describe the bug

Non portable step within the action.

When running this action on a self hosted non Ubuntu distro (we use RHEL self hosted runners internally) the setup-python step within the action.yml fails with the error:

Run actions/setup-python@v4
Installed versions
  Version 3.10 was not found in the local cache
  Error: The version '3.10' with architecture 'x64' was not found for this operating system.
  The list of all available versions can be found here: https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json

This is a known issue, discussions around can be seen here:

Version 3.10 with arch x64 not found · Issue #401 · actions/setup-python (github.com)

Unable to Set-up Python · Issue #585 · actions/setup-python (github.com)

Also, for corporate use, it is common for access to the Internet to download software to be managed via a proxy, such as an Artifactory remote. In those cases setup-xxx actions may also fail.

To Reproduce
Steps to reproduce the behavior:

  1. Call the action on a runner that is NOT a recent version of Ubuntu

Expected behavior
Either the action should provide an input to allow by-pass of the step (document a pre-req that a compatible version of python must be installed prior to calling the action if you don't want to (or can't) use the default) or the step should be removed entirely from the action and a pre-req added to the doc.

The problem really lays with the setup-python action, however, since that is embedded within THIS action there is no way to avoid the error other than to maintain a custom version which is not ideal.

Screenshots
image

Additional context
This is a corporate environment running RHEL based self hosted GHA runners. Internet downloads for actions are only allowed via our Artifactory remotes. We can install python on our runners but ATM there is no way to skip the setup-python step within this action which will fail on RHEL.

Arguably there really shouldn't be a non-portable step inside the action !?

@sven0219
Copy link

sven0219 commented Nov 29, 2023

I encountered the same problem
/etc/os-release

PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

error
image

@GeekMasher GeekMasher self-assigned this Dec 13, 2023
@GeekMasher GeekMasher added the bug Something isn't working label Dec 13, 2023
@GeekMasher
Copy link
Collaborator

@goffinfnbs @sven0219 Thanks for raising this. Let me take a look this week and see if I can reproduce this. I might request more information

@GeekMasher
Copy link
Collaborator

@goffinfnbs @sven0219 I have made some small changes to the Action v2.6.0 which should help with this. This change is here #76

Please let me know if this has helped

@sven0219
Copy link

sven0219 commented Dec 14, 2023

HI @GeekMasher , it's works for me , thanks
2.5.0
image
2.6.0
image

@goffinfnbs
Copy link
Author

@GeekMasher I can confirm that this action DOES now operate successfully on our self-hosted runners when we run setup-python before it is called.

Looks like you took the opportunity to merge quite a number of other changes also.

I did note that you added the requirement in the announcement, but I wonder whether access to a supported version of python on the runner or installed before executing the action ought to also be documented in the README (some gnarly console output if you don't) ?

@GeekMasher
Copy link
Collaborator

I started documenting this during the process but I should update the README too

@GeekMasher
Copy link
Collaborator

Closing this issue as seems to have resolved the 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

3 participants