Skip to content

feat(ci): a cache input, because a persistent depot pays for the cache twice (#62) - #71

Merged
sotashimozono merged 1 commit into
mainfrom
cache-input-62
Aug 5, 2026
Merged

sotashimozono merged 1 commit into
mainfrom
cache-input-62

Conversation

@sotashimozono

Copy link
Copy Markdown
Member

Closes #62.

julia-actions/cache@v3 ran in both jobs with no if: and no input to turn it off, while this
workflow's own default runner is '["self-hosted","rosina"]' — a pool whose Julia depot already
persists per box. There the restore is a no-op and the save is not.

The cost, when it works

From #62, one green eight-shard run (FunctionMeasures.jl 30826019824): 44–182 s of post-step per
shard
against 58–268 s of actual testing — ≈620 s of runner time per run, for a depot that was
already on the box. The single shared key (cache-name: testshards, include-matrix: 'false') is
right for the hosted case and makes this worse: all N shards finish together and then all upload the
same large depot, N−1 of them pointlessly even when they succeed.

The cost, when it does not

Three jobs on 2026-08-03 whose Run shard step succeeded went red or never finished in that
post-step — one holding a runner for 114 minutes. The failure shape is the bad one: tests pass,
job red
, and gh pr checks cannot tell it from a real failure without opening the step list. A hung
post-step also holds a self-hosted runner indefinitely, so it shrinks the pool for everyone and reads
downstream as ordinary queueing.

Seen again today, ParaLinearAlgebra.jl run 30961107784, while this was being written:

runner shards Post Run julia-actions/cache@v3
rosina-org-* s2, s3, s4, s5, s7, s8 4–5 minutes each, completed
panza-3, panza-4 s1, s6 still running 16 minutes later, every test green

The change

A cache input, if: ${{ inputs.cache }} on both steps, defaulting to true so a hosted caller
is unaffected — the caller is what knows whether its depot survives the job. The companion PR sets it
false in lab-sotashimozono/.github, whose default runner is the self-hosted pool.

Prior art the issue records: ParaLinearAlgebra.jl explicitly dropped julia-actions/cache when its
matrix moved to rosina (its PR #96, "dropped julia-actions/cache = persistent depot"), and adopting
TestShards re-introduced it to every repo that migrated.

…che twice (#62)

`julia-actions/cache@v3` ran in both jobs with no guard and no way to turn it off, while this
workflow's own default runner is `'["self-hosted","rosina"]'` — a pool whose Julia depot already
persists per box, and per runner since the depot-front change. There the restore is a no-op and
the SAVE is not.

MEASURED, from #62. One green eight-shard run (FunctionMeasures.jl 30826019824): 44–182 s of
post-step per shard against 58–268 s of actual testing, ≈620 s of runner time per run for a depot
that was already on the box. The single shared key makes it worse rather than better here — all N
shards finish together and then all upload the same large depot, N−1 of them pointlessly even when
they succeed.

And when it does not merely cost, it hangs. Three jobs on 2026-08-03 whose `Run shard` step
SUCCEEDED went red or never finished in that post-step, one holding a runner for 114 minutes. The
failure shape is the bad one: tests pass, job red, and nothing in `gh pr checks` tells that apart
from a real failure without opening the step list. A hung post-step also holds a self-hosted runner
indefinitely, so it shrinks the pool for everyone and reads downstream as ordinary queueing.

Seen again today on ParaLinearAlgebra.jl 30961107784: six shards on `rosina` spent 4–5 minutes
EACH in the post-step and finished; the two on `panza` were still in it 16 minutes later with every
test green.

`cache` defaults to `true`, so a hosted caller is unaffected — it is the caller that knows whether
its depot survives the job. The org-wide reusable, whose default runner is the self-hosted pool,
sets it false in the companion PR.
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

📚 Docs preview: https://codes.sota-shimozono.com/TestShards.jl/previews/PR71/

(updates on each push to this PR)

@codecov

codecov Bot commented Aug 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@sotashimozono
sotashimozono merged commit 7dfc873 into main Aug 5, 2026
30 checks passed
@sotashimozono
sotashimozono deleted the cache-input-62 branch August 5, 2026 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

1 participant