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

Support os-release standard

Open aaroncameron-wk opened this issue 1 year ago • 4 comments

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:

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

Runner type:

  • [ ] Hosted
  • [x] Self-hosted

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.

aaroncameron-wk avatar Jun 10 '24 23:06 aaroncameron-wk

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

aparnajyothi-y avatar Jun 11 '24 14:06 aparnajyothi-y

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.

mahabaleshwars avatar Jun 24 '24 14:06 mahabaleshwars

Hello @aaroncameron-wk, Just a friendly reminder to check if the issue has been resolved.

mahabaleshwars avatar Jul 11 '24 14:07 mahabaleshwars

Hello @aaroncameron-wk, could you please confirm if the feedback addresses your concern?

mahabaleshwars avatar Jul 25 '24 07:07 mahabaleshwars

Hello @aaroncameron-wk, please review the feedback provided above. we are closing this issue now. Feel free to reach out to us for any other issues.

mahabaleshwars avatar Aug 06 '24 06:08 mahabaleshwars