Skip to content

A full artifact storage quota must not fail a green suite (#74) - #76

Merged
sotashimozono merged 2 commits into
mainfrom
fix/74-storage-must-not-fail-the-suite
Aug 19, 2026
Merged

sotashimozono merged 2 commits into
mainfrom
fix/74-storage-must-not-fail-the-suite

Conversation

@sotashimozono

Copy link
Copy Markdown
Member

Part of #74, and independent of the package change in #75 — this is workflow-only, so it can merge and take effect immediately without waiting for a registration.

What happened

lab-sotashimozono hit the Actions artifact storage quota today. Every consumer's CI went red at Shard labels:

Failed to CreateArtifact: Artifact storage quota has been hit.
Unable to upload any new artifacts. Usage is recalculated every 6-12 hours.

before a single test executed.

That job's real product is the matrix output, and the log of the failing run reads:

121 timing rows.
...
Set output 'matrix'

The work succeeded, and was thrown away because an upload after it failed. Every shard needs: that matrix, so the whole suite was skipped — on every PR, in every repository using this workflow. A storage problem became a test failure.

The split this restores

It is this file's own vocabulary: coverage and timings are a report; Every unit ran, exactly once is a correctness claim. Only the second should be able to fail a suite. They were sharing one exit status.

Now continue-on-error:

artifact job why it is a report
-timings label the load-bearing one — it gated the matrix every shard needs
-coverage-<sid> shard runs after the suite; failing here reddens a green shard
-out-<sid> shard same
-lcov, -records collect same
counter → report conversion collect a missing report, not a wrong one

Unchanged and still fatal:

  • -prebuild — the shards download it, so a failure there is a genuine missing dependency, not a lost report.
  • Every unit ran, exactly once — ungated, as before.
  • The refusal inside restore_counters — just as loud. What changes is that a missing coverage report annotates the run with ::error:: and skips the Codecov upload, instead of failing the All shards passed gate.

The silent-coverage-loss failure this file exists to prevent — 54.5 % reported for a suite that covered 94.8 % — stays impossible: a missing report is visible as an error and an absent upload, never as a quietly wrong number.

Relationship to #75

#75 stops the cause (per-shard coverage artifacts carry 8 copies of the source tree; 61.8× reducible) but has to wait on registration, and it cannot help a quota that is already full. This PR makes the symptom survivable and applies the moment it merges.

An organisation hit the Actions artifact storage quota today and every consumer's
CI went red at `Shard labels`:

    Failed to CreateArtifact: Artifact storage quota has been hit.

before a single test executed. That job's real product is the `matrix` OUTPUT, and
the log of the failing run reads `121 timing rows.` and `Set output 'matrix'` —
the work succeeded and was discarded because an upload after it failed. Every
shard `needs:` that matrix, so the whole suite was skipped, on every PR, in every
repository using this workflow.

The uploads that report on a run are now `continue-on-error`. The split is this
file's own: coverage and timings are a REPORT, "every unit ran exactly once" is a
CORRECTNESS CLAIM, and only the second should be able to fail a suite. They were
sharing one exit status.

  - `-timings` (label job) — the load-bearing one; it gated the matrix.
  - `-coverage-<sid>`, `-out-<sid>` (shards) — both run AFTER the suite, so failing
    there converts a green shard into a red one over a report.
  - `-lcov`, `-records`, and the counter merge (collect) — same category.

`-prebuild` stays fatal: the shards DOWNLOAD it, so a failure there is a real
missing dependency rather than a lost report.

`Every unit ran, exactly once` stays fatal and ungated. So does the refusal inside
`restore_counters`: what changes is that a missing coverage report annotates the
run with `::error::` and skips the Codecov upload instead of failing the gate. The
silent-coverage-loss failure this file exists to prevent — 54.5 % reported for a
94.8 % suite — is still impossible, because a missing report is visible as an
error and an absent upload, never as a quietly wrong number.
@github-actions

Copy link
Copy Markdown
Contributor

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

(updates on each push to this PR)

@codecov

codecov Bot commented Aug 19, 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 c2eb921 into main Aug 19, 2026
30 checks passed
@sotashimozono
sotashimozono deleted the fix/74-storage-must-not-fail-the-suite branch August 19, 2026 02:50
sotashimozono added a commit that referenced this pull request Aug 19, 2026
…#77)

#76 stopped a full artifact storage quota from failing the label job, and the
shards then ran — and all eight failed one step later:

    Unable to download artifact(s): Artifact not found for name: testshards-timings

An upload that is allowed to fail has a consumer that is not. Both halves have to
degrade together, and for `timings` the degradation is NOT free to make per shard:

> The ONE history `labels` read, not one this shard fetched for itself. A per-shard
> fetch let a single transient failure put one shard on a different assignment
> function from the rest — which double-runs some units and skips others, with
> every shard still green.

So `continue-on-error` on the DOWNLOAD would reintroduce exactly that. Instead the
label job publishes its upload's outcome as an output, and every shard gates on
that one value: either the whole matrix has the history or none of it does. "None"
is a state the package already defines — `load_timings` returns an empty table for
a missing path, which is what the first run of any suite gets — so the fallback is
the ordinary unweighted assignment, not a new code path. A `::warning::` says the
balance may be worse and that the result is not.

`prebuild` gets the same shape for the same reason, and it is an optimisation
outright: a shard without the shared compiled cache precompiles for itself and
computes the same answer. Its upload becomes non-fatal, its outcome an output, and
both the download and the adopt step gate on it.

What stays fatal is unchanged: `Every unit ran, exactly once`, and the refusal
inside `restore_counters`.
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