Add RHEL support and include Linux distro in cache keys - #1323
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds RHEL-aware Python release resolution and standardizes Linux cache keys by incorporating Linux distro name + version across pip/pipenv/poetry (while keeping Windows/macOS keys unchanged).
Changes:
- Add RHEL-specific manifest filtering during Python version resolution.
- Add a shared
getLinuxInfoKeySegment()helper and use it to include Linux distro info in pip/pipenv/poetry cache keys. - Make Linux distro detection more resilient by falling back from
lsb_releaseto/etc/os-release.
Reviewed changes
Copilot reviewed 6 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/utils.ts | Adds fallback Linux distro detection via /etc/os-release when lsb_release fails. |
| src/install-python.ts | Adds RHEL detection and custom manifest matching for platform: rhel. |
| src/cache-distributions/cache-distributor.ts | Introduces shared Linux distro cache-key segment helper (incl. RHEL major-version logic). |
| src/cache-distributions/pip-cache.ts | Switches pip cache keys to use the shared Linux distro key segment helper. |
| src/cache-distributions/pipenv-cache.ts | Adds Linux distro segment to pipenv cache keys via shared helper. |
| src/cache-distributions/poetry-cache.ts | Adds Linux distro segment to poetry cache keys via shared helper. |
| dist/setup/index.js | Regenerated bundled output reflecting the source changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description:
Impact:
One-time cache regeneration for Linux pipenv/poetry users on the first run. Windows and macOS keys are unchanged.
Check list: