[MINOR][CI] Move Delta Spark UT caches to Apache Stash - #12820
Conversation
Move the native, Maven, and sbt dependency caches off the repository-wide GitHub Actions cache quota. Share the existing CentOS 7 ccache stash and serialize the matrix cache writer. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Moves the Delta Spark UT GitHub Actions workflow caches from actions/cache to Apache Stash to avoid consuming the repository-wide GitHub Actions cache quota.
Changes:
- Replaced ccache, Maven, and sbt/Ivy/Coursier caching with Apache Stash restore/save steps.
- Added tooling installation (python3 +
gh+jq) required for Stash restores in CentOS-based jobs. - Updated cache keys/behavior (e.g., stable ccache key based on
hashFiles, single-shard writer for sbt stash).
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
I need to run CI to test it, I’ll check once it is ready |
|
@felipepessoto it's marked as do not merge but looks all tests passed, is it ready to go? |
|
@zhouyuan, yes, it is ready. Could you merge please? I removed the temporary tag in the title |
Follow-up to rebasing onto apache#12820, which replaced actions/cache with Apache Stash. Two things the migration changes for this feature: 1. `permissions:` must grant `actions: read`. Declaring the block at all sets every unlisted scope to `none`, and the Stash restore action reads caches through the artifacts REST API (`gh api repos/.../actions/artifacts` and `gh run download`), which 403s without it. The other Stash-using workflows declare no `permissions:` block and inherit the repo default, so they never had to say this. Without this the Stash restores would fail on every event, not just on comment runs. 2. The "restore but never save" guards still apply, and matter more. A stash is an artifact named `<key>-<github.ref_name>`, restored by matching `head_branch` + `head_repository_id` -- the same branch scoping actions/cache has. On `issue_comment` that branch is the default branch, so a save from a run executing PR code would land on `main`, and Stash's `overwrite: true` default means it replaces the existing entry rather than merely competing with it. apache#12820 also moved the ccache to the key `ccache-centos7-release-default-${{ hashFiles('ep/build-velox/src/**') }}`, which velox_backend_x86.yml restores from as well, so an unguarded save would reach beyond this pipeline. Reads are deliberately left unguarded: a comment run restores main's stashes and is therefore no slower than any other run. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
What changes are proposed in this pull request?
Move every cache in the Delta Spark UT workflow from
actions/cacheto Apache Stash so the native, Maven, and sbt caches no longer consume Gluten's repository-wide 10 GB GitHub Actions cache quota.The native build shares the existing CentOS 7 ccache stash, the CentOS container jobs install Stash's restore dependencies, and only shard 0 saves the shared sbt/Ivy/Coursier stash to avoid matrix writers overwriting the same artifact.
This follows up on #12388 (comment).
How was this patch tested?
actionlint v1.7.12 .github/workflows/delta_spark_ut.ymlgit diff --checkWas this patch authored or co-authored using generative AI tooling?
Generated-by: GitHub Copilot CLI 1.0.80