Skip to content

build-jupyter-cache: a setup-environment failure alerts nobody #123

Closed

Description

@mmcky

Split out of #83 rather than widening it, since the fix is different and the trigger is different.

The gap

build-jupyter-cache's Setup environment step has no continue-on-error. If it fails, the composite aborts immediately: verify-builds never runs, so all-passed is never set.

Every downstream guard keys off that value:

An unset all-passed is '', not 'false', so all three are skipped and no issue is filed. The job goes red, but nothing reaches the tracker — which for an unattended weekly build is functionally the same silence #83 was about.

This is not fixed by #122. That PR makes the alerting path work once a build fails; this is about failing before any build runs.

What triggers it in practice

None are exotic; the first two are ordinary supply-chain weather, and all three are exactly the conditions under which you most want an alert.

Why it has not been noticed

The same reason as #83: the path only executes when something else has already gone wrong, and nobody reads a red unattended run closely when the red looks like a plain infrastructure failure. The canary's eight silent weeks (2026-02-22 → 2026-04-12) were build failures rather than setup failures, so this specific variant has not yet been observed — it is a gap found by reading, not from a live incident.

Rough shape of a fix

The tricky part is that "setup failed" and "a build failed" want different issue bodies, and the current alert step is written around per-builder statuses.

One option is to give Setup environment continue-on-error: true plus an explicit guard step that fails the job and routes into the same alerting path with a distinct reason. That keeps one alerting implementation but needs the body to handle a case where no builder ran at all. Another is a separate if: failure() alert step for the setup phase, which duplicates a little.

Worth deciding alongside whichever of those reads better once #122 lands, since it touches the same block.

Related: #83, #122, #28

Activity

  1. added
    bug
    on Aug 5, 2026
  2. mmcky commented on Aug 6, 2026

    @mmcky
    ContributorAuthor

    Reviewed against the code — the diagnosis holds in full. Setup environment has no continue-on-error, verify-builds carries a bare if: (implicit success() in a composite) so it never runs, all-passed is '', and all three == 'false' guards skip. Fixed in #127. Four refinements came out of the review, recording them here since two of them changed the fix.

    The gap is wider than setup-environment. Generate cache key, Validate builders input and Parse builders input sit above it with the identical property — a bad builders value on an unattended run is equally silent. This is what discriminates between the two candidate fixes: continue-on-error covers one step, guard polarity covers the class.

    The continue-on-error: true option is the worse of the two, and #127 does not take it. Once setup no longer fails the job, all three builds run against a broken environment: you burn the build timeout producing three cascading failures and then file an issue whose table reads html: ❌ failure, pointing the maintainer at a lecture bug when the cause was conda. You would also have to gate all three build steps on setup's outcome, which is more churn than the alternative.

    "The body needs to handle a case where no builder ran" is already handled — #122's rewrite defaults each builder status and already emits "No builder reported failure — the run failed before or after the builds." That was the main argument for the duplicated-step option, so it is largely moot.

    One genuine follow-on bug on the same path. The artifact list in the issue body is gated on inputs.upload-artifact, but the upload step has a bare if: and so skips after a setup abort — and there is no _build to upload anyway. The issue would name a build-cache-<run-id> artifact that does not exist. Its "no artifacts" fallback also blames both upload inputs being false, when the real reason is that no build ran.

    What #127 does instead

    Inverts the guard polarity. A Resolve overall status step under always() maps "verify-builds never ran" to false, and every guard tests != 'true' rather than == 'false', so the path fails safe — it alerts on any abort, not only the anticipated ones. The file already used the safe idiom in two places (Save build cache is == 'true', the artifact upload is != 'true'); the alerting guards were the outliers.

    Resolving it in a step rather than just flipping the operators buys two things worth the eight extra lines. build-success becomes 'false' instead of '', which is an honest output contract — no consumer could previously distinguish an aborted run from a successful one. And it makes the fix testable in-repo rather than canary-only: the new bjc-abort-guard harness job asserts build-success == 'false', which is exactly the value that was empty before, so it fails on main today. Given that this whole path only executes when something else is already broken — the structural reason three bugs accumulated on it in #83 — making the decision observable from a test that runs on every PR is the part that stops this recurring.

    One residual, deliberately out of scope

    If the job itself never starts, or is cancelled, timed out, or loses its runner, no step runs at all — always() included — so nothing can be filed from inside the action. That needs a workflow-level if: failure() notify job in the consumer repo, or a scheduled sweeper. Noted in PLAN.md so it does not get rediscovered later as a fourth variant of #83.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions