Skip to content

Conversation

@eifinger
Copy link
Collaborator

Summary

  • Adds OS name and version (e.g., ubuntu-22.04, macos-14, windows-2022) to cache keys to prevent binary incompatibility when GitHub updates runner images
  • Fixes issue where cached uv binaries compiled against older glibc/library versions fail on newer runner OS versions

Changes

  • Added getOSNameVersion() function to src/utils/platforms.ts with OS-specific detection for Linux (via /etc/os-release), macOS (Darwin kernel version mapping), and Windows
  • Updated cache key format to include OS version, bumped CACHE_VERSION to "2"
  • Added cache-key output to expose the generated cache key for debugging
  • Added test-cache-key-os-version job testing across multiple OS versions
  • Updated docs/caching.md with cache key documentation

Closes #703

Adds OS name and version (e.g., ubuntu-22.04, macos-14, windows-2022) to the
cache key to prevent binary incompatibility issues when GitHub runner images
change.

Changes:
- Add getOSNameVersion() to detect OS name and version
- Include OS version in cache key (bump CACHE_VERSION to 2)
- Add cache-key output for debugging and testing
- Add test-cache-key-os-version workflow job
- Update test-musl to verify alpine in cache key
- Document cache key components in docs/caching.md

Closes #703
@eifinger eifinger force-pushed the os-version-in-cache-key branch from 9f4dde8 to b7255b1 Compare December 13, 2025 16:17
@eifinger eifinger merged commit 58b6d7b into main Dec 13, 2025
97 checks passed
@eifinger eifinger deleted the os-version-in-cache-key branch December 13, 2025 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Support OS-version specific cache keys to avoid binary incompatibility

2 participants