Skip to content

[FEATURE] Enable github action "setup-python" for those images. #19

Open
@anetbnd

Description

@anetbnd

Is your feature request related to a problem? Please describe.

The github action "setup-python" (https://github.com/actions/setup-python) is some kind of standard action when testing python related code with different python versions. It creates an virtual environment for every workflow and provides a fresh an clean python setup.

However it seems to not work correctly with the Fedora bases images, provided from RedHat. It always complains, that the right python version could not be found:

##[debug]Evaluating condition for step: 'Set up Python'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: Set up Python
##[debug]Register post job cleanup for action: actions/setup-python@v2
##[debug]Loading inputs
##[debug]Evaluating: env.PYTHON_VERSION
##[debug]Evaluating Index:
##[debug]..Evaluating env:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'PYTHON_VERSION'
##[debug]=> '3.9'
##[debug]Result: '3.9'
##[debug]Evaluating: github.token
##[debug]Evaluating Index:
##[debug]..Evaluating github:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'token'
##[debug]=> '***'
##[debug]Result: '***'
##[debug]Loading env
Run actions/setup-python@v2
##[debug]Semantic version spec of 3.9 is 3.9
##[debug]isExplicit: 
##[debug]explicit? false
##[debug]evaluating 0 versions
##[debug]match not found
Version 3.9 was not found in the local cache
##[debug]set auth
##[debug]check 3.11.0-alpha.6 satisfies 3.9
##[debug]check 3.11.0-alpha.5 satisfies 3.9
##[debug]check 3.11.0-alpha.4 satisfies 3.9
##[debug]check 3.11.0-alpha.3 satisfies 3.9
##[debug]check 3.11.0-alpha.2 satisfies 3.9
##[debug]check 3.11.0-alpha.1 satisfies 3.9
##[debug]check 3.10.4 satisfies 3.9
##[debug]check 3.10.3 satisfies 3.9
##[debug]check 3.10.2 satisfies 3.9
##[debug]check 3.10.1 satisfies 3.9
##[debug]check 3.10.0 satisfies 3.9
##[debug]check 3.10.0-rc.2 satisfies 3.9
##[debug]check 3.10.0-rc.1 satisfies 3.9
##[debug]check 3.10.0-beta.4 satisfies 3.9
##[debug]check 3.10.0-beta.3 satisfies 3.9
##[debug]check 3.10.0-beta.2 satisfies 3.9
##[debug]check 3.10.0-beta.1 satisfies 3.9
##[debug]check 3.10.0-alpha.7 satisfies 3.9
##[debug]check 3.10.0-alpha.6 satisfies 3.9
##[debug]check 3.10.0-alpha.5 satisfies 3.9
##[debug]check 3.10.0-alpha.4 satisfies 3.9
##[debug]check 3.10.0-alpha.3 satisfies 3.9
##[debug]check 3.10.0-alpha.2 satisfies 3.9
##[debug]check 3.10.0-alpha.1 satisfies 3.9
##[debug]check 3.9.12 satisfies 3.9
##[debug]x64===x64 && darwin===linux
##[debug]x64===x64 && linux===linux
##[debug]x64===x64 && linux===linux
##[debug]x64===x64 && win32===linux
##[debug]x86===x64 && win32===linux
##[debug]check 3.9.11 satisfies 3.9
##[debug]x64===x64 && darwin===linux
##[debug]x64===x64 && linux===linux
##[debug]x64===x64 && linux===linux
##[debug]x64===x64 && win32===linux
##[debug]x86===x64 && win32===linux
##[debug]check 3.9.10 satisfies 3.9
##[debug]x64===x64 && darwin===linux
##[debug]x64===x64 && linux===linux
##[debug]x64===x64 && linux===linux
##[debug]x64===x64 && win32===linux
##[debug]x86===x64 && win32===linux
##[debug]check 3.9.9 satisfies 3.9
##[debug]x64===x64 && darwin===linux
##[debug]x64===x64 && linux===linux
##[debug]x64===x64 && linux===linux
##[debug]x64===x64 && win32===linux
##[debug]x86===x64 && win32===linux
##[debug]check 3.9.8 satisfies 3.9
##[debug]x64===x64 && darwin===linux
##[debug]x64===x64 && linux===linux
##[debug]x64===x64 && linux===linux
##[debug]x64===x64 && win32===linux
##[debug]x86===x64 && win32===linux
##[debug]check 3.9.7 satisfies 3.9
##[debug]x64===x64 && darwin===linux
##[debug]x64===x64 && linux===linux
##[debug]x64===x64 && linux===linux
##[debug]x64===x64 && win32===linux
##[debug]x86===x64 && win32===linux
##[debug]check 3.9.6 satisfies 3.9
##[debug]x64===x64 && darwin===linux
##[debug]x64===x64 && linux===linux
##[debug]x64===x64 && linux===linux
##[debug]x64===x64 && win32===linux
##[debug]x86===x64 && win32===linux
##[debug]check 3.9.5 satisfies 3.9
##[debug]x64===x64 && darwin===linux
##[debug]x64===x64 && linux===linux
##[debug]x64===x64 && linux===linux
##[debug]x64===x64 && linux===linux
##[debug]x64===x64 && win32===linux
##[debug]x86===x64 && win32===linux
##[debug]check 3.9.4 satisfies 3.9
##[debug]x64===x64 && darwin===linux
##[debug]x64===x64 && linux===linux
##[debug]x64===x64 && linux===linux
##[debug]x64===x64 && linux===linux
##[debug]x64===x64 && win32===linux
##[debug]x86===x64 && win32===linux
##[debug]check 3.9.3 satisfies 3.9
##[debug]x64===x64 && darwin===linux
##[debug]x64===x64 && linux===linux
##[debug]x64===x64 && linux===linux
##[debug]x64===x64 && linux===linux
##[debug]x64===x64 && win32===linux
##[debug]x86===x64 && win32===linux
##[debug]check 3.9.2 satisfies 3.9
##[debug]x64===x64 && darwin===linux
##[debug]x64===x64 && linux===linux
##[debug]x64===x64 && linux===linux
##[debug]x64===x64 && linux===linux
##[debug]x64===x64 && win32===linux
##[debug]x86===x64 && win32===linux
##[debug]check 3.9.2-rc.1 satisfies 3.9
##[debug]check 3.9.1 satisfies 3.9
##[debug]x64===x64 && darwin===linux
##[debug]x64===x64 && linux===linux
##[debug]x64===x64 && linux===linux
##[debug]x64===x64 && linux===linux
##[debug]x64===x64 && win32===linux
##[debug]x86===x64 && win32===linux
##[debug]check 3.9.1-rc.1 satisfies 3.9
##[debug]check 3.9.0 satisfies 3.9
##[debug]x64===x64 && darwin===linux
##[debug]x64===x64 && linux===linux
##[debug]x64===x64 && linux===linux
##[debug]x64===x64 && linux===linux
##[debug]x64===x64 && win32===linux
##[debug]x86===x64 && win32===linux
##[debug]check 3.9.0-rc.2 satisfies 3.9
##[debug]check 3.9.0-rc.1 satisfies 3.9
##[debug]check 3.9.0-beta.5 satisfies 3.9
##[debug]check 3.9.0-beta.4 satisfies 3.9
##[debug]check 3.8.12 satisfies 3.9
##[debug]check 3.8.11 satisfies 3.9
##[debug]check 3.8.10 satisfies 3.9
##[debug]check 3.8.9 satisfies 3.9
##[debug]check 3.8.8 satisfies 3.9
##[debug]check 3.8.7 satisfies 3.9
##[debug]check 3.8.6 satisfies 3.9
##[debug]check 3.8.5 satisfies 3.9
##[debug]check 3.8.4 satisfies 3.9
##[debug]check 3.8.3 satisfies 3.9
##[debug]check 3.8.2 satisfies 3.9
##[debug]check 3.8.1 satisfies 3.9
##[debug]check 3.8.0 satisfies 3.9
##[debug]check 3.7.12 satisfies 3.9
##[debug]check 3.7.11 satisfies 3.9
##[debug]check 3.7.10 satisfies 3.9
##[debug]check 3.7.9 satisfies 3.9
##[debug]check 3.7.8 satisfies 3.9
##[debug]check 3.7.7 satisfies 3.9
##[debug]check 3.7.6 satisfies 3.9
##[debug]check 3.7.5 satisfies 3.9
##[debug]check 3.7.1 satisfies 3.9
##[debug]check 3.6.15 satisfies 3.9
##[debug]check 3.6.14 satisfies 3.9
##[debug]check 3.6.13 satisfies 3.9
##[debug]check 3.6.12 satisfies 3.9
##[debug]check 3.6.11 satisfies 3.9
##[debug]check 3.6.10 satisfies 3.9
##[debug]check 3.6.9 satisfies 3.9
##[debug]check 3.6.8 satisfies 3.9
##[debug]check 3.6.7 satisfies 3.9
##[debug]check 3.5.10 satisfies 3.9
##[debug]check 3.5.9 satisfies 3.9
##[debug]check 3.5.4 satisfies 3.9
##[debug]check 3.4.10 satisfies 3.9
##[debug]check 3.4.4 satisfies 3.9
##[debug]check 3.3.7 satisfies 3.9
##[debug]check 3.3.5 satisfies 3.9
##[debug]check 3.2.5 satisfies 3.9
##[debug]check 3.1.4 satisfies 3.9
##[debug]check 3.0.1 satisfies 3.9
##[debug]check 2.7.18 satisfies 3.9
##[debug]check 2.7.17 satisfies 3.9
Error: Version 3.9 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
##[debug]Node Action run completed with exit code 1
##[debug]Finishing: Set up Python

There is also a description available how to get it running for self hosted runner: https://github.com/actions/setup-python#using-setup-python-with-a-self-hosted-runner
I tried it out, but it did not help.

I think the issue is, that all precompiled python versions that are available are just there for Ubuntu but not for Fedora, that's why it says it cannot find a proper python package to install on the runner.

Describe the solution you'd like

I would like to have a OpenShift supported image, where the "setup-python" action can be run out of the box without ugly workarounds.

Describe alternatives you've considered

The alternative would be to change the "setup-python" action in a way, that it selects the right python version from pre-installed python versions, which are installed directly into the image (let's say for example python 3.8 to 3.10).

Additional context

I tried it with the image quay.io/redhat-github-actions/runner:v1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions