actions / setup-python

Set up your GitHub Actions workflow with a specific version of Python
MIT License
1.59k stars 504 forks source link

Support os-release standard #890

Open aaroncameron-wk opened 2 weeks ago

aaroncameron-wk commented 2 weeks ago

Description: When PipCache attempts to generate pip cache keys and invokes getLinuxInfo while running on Amazon Linux 2023, the following error occurs:

Error: Unable to locate executable file: lsb_release. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.

This is also triggered when attempting to report errors when searching for Python versions, so this action fails to even give helpful error information when a missing lsb_release isn't even the issue.

This is caused by the dependency on lsb_release, which is not available on Amazon Linux 2023:

AL2023 doesn't ship with the lsb_release command, and doesn't include the system-lsb-core package. Software should complete the transition to the os-release standard to maintain compatibility with Amazon Linux and other major Linux distributions.

An alternative is the os-release standard. Using this, at least as a fallback, would go a long way in improving the limited support of AL2023.

Action version: 5.1.0

Platform:

Runner type:

Tools version: N/A

Repro steps:
Run this action on an Amazon Linux 2023 self-hosted runner with cache: 'pip'.

Expected behavior: Action behaves as expected with pip dependencies cached.

Actual behavior:

Error: Unable to locate executable file: lsb_release. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.

aparnajyothi-y commented 2 weeks ago

Hello @aaroncameron-wk, Thank you for creating this issue and we will look into it :)

mahabaleshwars commented 2 days ago

Hello @aaroncameron-wk, Thank you for your insightful comments. At present, 'setup-python' utilizes 'lsb_release' for 'cache:pip' execution. The 'actions/cache' feature can be used for caching. However, please be aware that even though Amazon Linux 2023 supports GLIBC 2.34, the caching process demands an upgrade to GLIBC 2.35.