Skip to content

[SPARK-57277][INFRA] Prefix all CI cache keys with runner.os#56342

Open
zhengruifeng wants to merge 1 commit into
apache:masterfrom
zhengruifeng:ci-cache-key-runner-os-dev7
Open

[SPARK-57277][INFRA] Prefix all CI cache keys with runner.os#56342
zhengruifeng wants to merge 1 commit into
apache:masterfrom
zhengruifeng:ci-cache-key-runner-os-dev7

Conversation

@zhengruifeng
Copy link
Copy Markdown
Contributor

@zhengruifeng zhengruifeng commented Jun 5, 2026

What changes were proposed in this pull request?

Add ${{ runner.os }}- as a prefix to every cache key: and restore-keys: value in all CI workflow files that did not already have it:

  • build_and_test.yml: build-, docs-maven-, tpcds-
  • build_sparkr_window.yml: build-sparkr-windows-maven-
  • maven_test.yml: build-, java${{...}}-maven-
  • build_python_connect.yml / build_python_connect40.yml: build-spark-connect-python-only-, coursier-build-spark-connect-python-only-
  • python_hosted_runner_test.yml: build-
  • publish_snapshot.yml: snapshot-maven-

Keys that already carried the ${{ runner.os }}- prefix (e.g. ${{ runner.os }}-coursier-) are unchanged.

Why are the changes needed?

Without an OS prefix, cache entries from Linux, macOS, and Windows runners share the same key namespace. A cache written by one OS can be restored on another, causing subtle build failures or stale-artifact issues. Prefixing with ${{ runner.os }} ensures each OS has its own isolated cache.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

CI workflow change only; no code logic changed. The cache keys are verified by inspection.

Was this patch authored or co-authored using generative AI tooling?

Generated-by: Claude Sonnet 4.6

Add \${{ runner.os }}-  as a prefix to every cache key and restore-key
value in CI workflows that lacked it, so caches are isolated per OS and
never cross-pollute between Linux and Windows runners.

Generated-by: Claude Sonnet 4.6
@zhengruifeng zhengruifeng changed the title [CI] Prefix all CI cache keys with ${{ runner.os }} [CI] Prefix all CI cache keys with runner.os Jun 5, 2026
@zhengruifeng zhengruifeng changed the title [CI] Prefix all CI cache keys with runner.os [SPARK-57277][INFRA] Prefix all CI cache keys with runner.os Jun 5, 2026
@zhengruifeng zhengruifeng marked this pull request as ready for review June 5, 2026 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant