Skip to content

[MINOR][CI] Move Delta Spark UT caches to Apache Stash - #12820

Merged
zhouyuan merged 1 commit into
apache:mainfrom
felipepessoto:delta-ut-apache-stash
Aug 19, 2026
Merged

[MINOR][CI] Move Delta Spark UT caches to Apache Stash#12820
zhouyuan merged 1 commit into
apache:mainfrom
felipepessoto:delta-ut-apache-stash

Conversation

@felipepessoto

@felipepessoto felipepessoto commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

What changes are proposed in this pull request?

Move every cache in the Delta Spark UT workflow from actions/cache to 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?

  • Full Delta Spark UT workflow passed: native build, bundle build, all 8 test shards, and aggregation.
  • The native job restored the matching main-branch ccache from Apache Stash and saved its updated stash successfully.
  • Maven saved 9,400 files (1.86 GB) and shard 0 saved 20,105 sbt/Ivy/Coursier files (2.29 GB). Both artifacts are unexpired and match Apache Stash's PR branch/repository lookup criteria.
  • actionlint v1.7.12 .github/workflows/delta_spark_ut.yml
  • Parsed the workflow with PyYAML and verified all three restore/save pairs, step ordering, stable ccache key, multi-path sbt layout, and single-shard writer condition.
  • git diff --check

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

Generated-by: GitHub Copilot CLI 1.0.80

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>
Copilot AI lite review requested due to automatic review settings August 19, 2026 08:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread .github/workflows/delta_spark_ut.yml
Comment thread .github/workflows/delta_spark_ut.yml
Comment thread .github/workflows/delta_spark_ut.yml
Comment thread .github/workflows/delta_spark_ut.yml
@felipepessoto felipepessoto changed the title [MINOR][CI] Move Delta Spark UT caches to Apache Stash [do not merge][MINOR][CI] Move Delta Spark UT caches to Apache Stash Aug 19, 2026
@felipepessoto

Copy link
Copy Markdown
Contributor Author

I need to run CI to test it, I’ll check once it is ready

@zhouyuan

Copy link
Copy Markdown
Member

@felipepessoto it's marked as do not merge but looks all tests passed, is it ready to go?

@felipepessoto felipepessoto changed the title [do not merge][MINOR][CI] Move Delta Spark UT caches to Apache Stash [MINOR][CI] Move Delta Spark UT caches to Apache Stash Aug 19, 2026
@felipepessoto

Copy link
Copy Markdown
Contributor Author

@zhouyuan, yes, it is ready. Could you merge please? I removed the temporary tag in the title

@zhouyuan
zhouyuan merged commit 4852291 into apache:main Aug 19, 2026
20 checks passed
@felipepessoto
felipepessoto deleted the delta-ut-apache-stash branch August 19, 2026 16:51
felipepessoto added a commit to felipepessoto/gluten that referenced this pull request Aug 19, 2026
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>
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.

3 participants