Skip to content

build-lectures and build-jupyter-cache: failure artifacts silently leave out _build/.jupyter_cache (no include-hidden-files) #243

Closed

Description

@mmcky

Two failure artifacts silently leave out the hidden directories they name or contain. Both actions upload with actions/upload-artifact@v7 without include-hidden-files, and upload-artifact then skips every path whose name starts with a dot, even a path the action names explicitly. Found while writing #241, whose pdf-check hand-off had to set include-hidden-files: true for the same reason.

The two sites

Site What it says it uploads What it uploads
build-lectures/action.yml:316-327, "Upload execution reports on failure". The path list names ${{ inputs.output-dir }}/_build/.jupyter_cache at line 325. The upload-failure-reports description (build-lectures/action.yml:61, rendered at docs/user/actions/build-lectures.md:41): "holding the reports directories in _build/html, _build/latex and _build/jupyter, and _build/.jupyter_cache". Behaviour item 4 (docs/user/actions/build-lectures.md:168): "it uploads the reports and the execution cache as an artifact". The failure banner (build-lectures/action.yml:309): "Check $OUTPUT_DIR/_build/.jupyter_cache/ for cached notebook states". The reports directories only.
build-jupyter-cache/action.yml:418-423, the build-cache-<run id> artifact, path: _build. The upload-artifact description (docs/user/actions/build-jupyter-cache.md:40): "uploads the whole _build directory". The failure issue's text (build-jupyter-cache/action.yml:524): "the whole _build tree (large; includes .jupyter_cache)". _build without .jupyter_cache and .doctrees.

Why

  • include-hidden-files defaults to 'false': "If false, hidden files will be excluded from the artifact" (upload-artifact action.yml, lines 43-47).
  • upload-artifact passes excludeHiddenFiles: !includeHiddenFiles to @actions/glob (src/shared/search.ts, line 19).
  • @actions/glob skips any item whose basename starts with ., and that check covers the search paths themselves as well as what it finds under them (internal-globber.ts, lines 131-134). So naming _build/.jupyter_cache explicitly does not get it uploaded.

Observed in a run

Run 41815257965, job build-jupyter-cache: a failing build fails the step, no cache saved (bjc-fail-guard), 2026-11-04. That job runs build-jupyter-cache with upload-failure-reports at its default, 'true', so build-lectures uploads execution-reports-html.

  • The build logged Using jupyter-cache at: /home/runner/work/actions/actions/_build/.jupyter_cache and executed lecture1.md into it, then failed on broken.md as staged.
  • The upload step listed ./_build/.jupyter_cache among its paths, with include-hidden-files: false, and logged With the provided path, there will be 1 file uploaded.
  • The artifact, execution-reports-html (ID 13314437163, 993 bytes), holds a single entry: html/reports/broken.err.log.

That confirms the build-lectures site. The build-jupyter-cache site is inferred from the same rule: the harness runs that action with upload-artifact: 'false', so no run shows its _build artifact.

Proposed change

  • build-lectures/action.yml, the "Upload execution reports on failure" step: add include-hidden-files: true.
  • build-jupyter-cache/action.yml, the build-cache-<run id> upload: add include-hidden-files: true. The artifact then carries _build/.doctrees as well. The failure issue already calls this artifact large, and .doctrees is the Sphinx state a local reproduction of the build would want.

Harness assertion

In bjc-fail-guard, which already produces both failure paths:

  1. Set upload-artifact: 'true', so the build-cache-<run id> upload runs.
  2. After the existing assertions, download both artifacts with actions/download-artifact@v8 into $RUNNER_TEMP (the uploads finished in an earlier step, so a same-job download finds them).
  3. Assert that execution-reports-html holds .jupyter_cache/global.db next to html/reports/broken.err.log, and that build-cache-<run id> holds .jupyter_cache/global.db and .doctrees/.

Today the first assertion fails on the artifact above, and both pass after the change.

Priority

Low. Both artifacts exist for a person to inspect a failed build: no action, template or workflow downloads them. And the part that matters most, the notebooks' tracebacks, is uploaded today and also printed in the log by build-lectures.

Claude Code (on behalf of mmcky)

Metadata

Metadata

Assignees

No one assigned

    Labels

    buglow-priority

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions