Skip to content

build-jupyter-cache: container-mode failures are silent, undebuggable, and use unpinned sub-actions #83

Description

@mmcky

Summary

When build-jupyter-cache runs in container mode and a lecture fails to execute, the failure is effectively invisible and undebuggable: no execution report is uploaded, the auto-issue alert does not get created, and the action runs sub-actions from a floating @main rather than the consumer's pinned tag. In lecture-dp this combination meant the weekly cache build failed for ~2 months (see #28) with no alert issue and no downloadable traceback, so nobody noticed until PRs were observed running full cold builds.

These are three separable robustness gaps in build-jupyter-cache.

1. Sub-actions are referenced at @main, not pinned

build-jupyter-cache/action.yml calls its sub-actions at @main even though consumers pin the parent action to a release tag (e.g. lecture-dp uses build-jupyter-cache@v0.6.0):

Line Reference
132 uses: quantecon/actions/setup-environment@main
147 uses: quantecon/actions/build-lectures@main
156 uses: quantecon/actions/build-lectures@main
165 uses: quantecon/actions/build-lectures@main

A consumer that pins @v0.6.0 for reproducibility still silently gets whatever is on main for the actual build/setup steps. This makes the cache builder non-reproducible and means a change on main can alter a "pinned" consumer's behavior. The internal references should resolve to the same release ref as the parent action.

2. Cache-build failures upload no execution report

The HTML build step inside build-jupyter-cache invokes build-lectures without upload-failure-reports, so when a notebook raises CellExecutionError there is no *.err.log artifact to inspect. This is doubly confusing because the auto-generated failure issue body (scripts/create-failure-issue.sh) tells the maintainer to "Download the build artifact for detailed execution reports" — but no such report is uploaded on failure.

By contrast build-lectures used directly in PR CI is typically called with upload-failure-reports: true, so PR failures are debuggable while cache failures are not. Recommend defaulting upload-failure-reports: true (or exposing it as an input) for the build steps inside build-jupyter-cache.

3. The failure-alerting step itself fails

build-jupyter-cache is meant to open a GitHub issue on failure (create-issue-on-failure: true). In a real run it did not. In lecture-dp run 26381283100 the alerting step exited 127:

/home/runner/work/_actions/quantecon/actions/v0.6.0/build-jupyter-cache/scripts/create-failure-issue.sh: No such file or directory
##[error]Process completed with exit code 127.

Net effect: every cache-build failure went un-alerted (zero build-failure issues were ever created in lecture-dp, despite months of failing runs). Worth hardening so the alerting path cannot silently no-op: verify the script ships and is executable in tagged releases, confirm gh is on PATH inside the quantecon-build container, and surface a clear error if the issue cannot be created.

Impact / context

This is the tooling layer that should have surfaced #28 (unpinned container scipy/numpy breaking un_insure.md). Because of gaps 2 and 3, that failure produced neither an alert nor a usable traceback in the cache path, and gap 1 makes the cache builder's behavior drift with main. Fixing these would make container-mode cache failures loud and debuggable.

Tracked downstream in QuantEcon/lecture-dp (CI cache issue, linked).

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions