setup-python icon indicating copy to clipboard operation
setup-python copied to clipboard

Failing with current ubuntu:latest container

Open ay0o opened this issue 1 year ago • 5 comments

Description: Starting somewhere between yesterday and today, setup-python is failing with the current ubuntu:latest container.

Action version: v4, v5

Platform:

  • [x] Ubuntu
  • [ ] macOS
  • [ ] Windows

Runner type:

  • [x] Hosted
  • [x] Self-hosted

Tools version: All versions.

Repro steps:
Use the action with any job with container: ubuntu:latest

Expected behavior: Python is configured

Actual behavior:

 Version 3.12 was not found in the local cache
  Error: The version '3.12' 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

Workaround: Instead of latest, use another tag such as 22.04.

ay0o avatar Apr 26 '24 09:04 ay0o

Hello @ay0o Thank you for creating this issue. We will investigate it and get back to you as soon as we have some feedback.

HarithaVattikuti avatar Apr 29 '24 03:04 HarithaVattikuti

this is the SHA of the current latest: sha256:562456a05a0dbd62a671c1854868862a4687bf979a96d48ae8e766642cd911e8

ay0o avatar Apr 29 '24 06:04 ay0o

Experienced the same error on our self-hosted runners using ubuntu:latest base image. Just as @ay0o suggested, using ubuntu:22.04 for latest 22.04 image fixed the issue. Seems that latest 24.04 image caused it https://hub.docker.com/layers/library/ubuntu/latest/images/sha256-28a2b328825ac02db5c29d9356bfba80ba6c4b6ebfcac5a91a4656fa3453775a?context=explore

bdlake avatar Apr 29 '24 20:04 bdlake

the content of /etc/lsb-release has not changed and uses the same format as expected by the code of the action in the _getOsVersion() function:

$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=24.04
DISTRIB_CODENAME=noble
DISTRIB_DESCRIPTION="Ubuntu 24.04 LTS"

Also, just in case something odd happened, os.platform() returns linux as expected:

> os.platform()
'linux'

EDIT:

ah well... never mind, the issue is as simple as Ubuntu 24.04 is missing here https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json

ay0o avatar May 01 '24 07:05 ay0o

So, in summary:

Ubuntu 24.04 was released a week ago and since then, marking the beginning of this issue because the tag latest replaced the previous version.

However, python-versions has not caught up with it and it's missing the release for 24.04.

ay0o avatar May 01 '24 07:05 ay0o

Ubuntu 24.04 is already available at https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json, hence solving this issue

ay0o avatar May 14 '24 13:05 ay0o

Hello @ay0o, Thank you once again for creating this issue. We have investigated the issue, actions/python-versions added the support for python-version : 3.12.3 for ubuntu-24.04 and ubuntu-latest tag is placed to 22.04 instead of 24.04. Please find the screenshots for reference. Please let us know in case of any further clarifications needed. image

image

aparnajyothi-y avatar May 14 '24 14:05 aparnajyothi-y

"Run actions/setup-python@v5" still fails for Python 3.8 in my GitHub actions with Ubuntu 24.04 (see example).

stweil avatar May 25 '24 07:05 stweil