-
Notifications
You must be signed in to change notification settings - Fork 420
Description
The weekly scheduled run of test-smokes.yml (sequential mode, no buckets) has been failing consistently for 3+ months — every single run fails with the same 36 tests. Meanwhile, the parallel bucketed runs (test-smokes-parallel.yml) pass 100%.
Recent examples:
- Sequential (fails): https://github.com/quarto-dev/quarto-cli/actions/runs/23131055254
- Parallel (passes): https://github.com/quarto-dev/quarto-cli/actions/runs/23134392459
Root cause
In sequential mode, all smoke-all tests run in the same Deno process. The editor-support-crossref test for tests/docs/smoke-all/2023/10/17/issue-7259.qmd triggers src/command/editor-support/crossref.ts, which sets a process-wide environment variable that is never cleared:
quarto-cli/src/command/editor-support/crossref.ts
Lines 91 to 92 in 5b88d3d
| Deno.env.set("QUARTO_CROSSREF_INDEX_PATH", indexFile); | |
| Deno.env.set("QUARTO_CROSSREF_INPUT_TYPE", "qmd"); |
Once QUARTO_CROSSREF_INPUT_TYPE=qmd persists in the environment, the Lua crossref filter's isQmdInput() returns true for all subsequent renders. This causes writeKeysIndex() to run instead of writeFullIndex(), producing crossref index files without a headings field. Book post-render then crashes at book-crossrefs.ts:263 with:
TypeError: Cannot read properties of undefined (reading 'forEach')
In parallel mode, each bucket runs on a separate GitHub Actions runner (separate VM), so the env var pollution cannot cross bucket boundaries.
Failing tests (36 total, identical on Ubuntu and Windows)
All book-type project tests that run after issue-7259.qmd in alphabetical order:
docs/smoke-all/2024/02/01/issue-8514/(book)docs/smoke-all/2024/02/22/8814/(book)docs/smoke-all/2024/12/12/11520/(book)docs/smoke-all/2025/12/10/13769/(book)docs/smoke-all/2026/02/24/issue-12136/(book)docs/smoke-all/book/page-footer/(book)docs/smoke-all/book/simple/(book)docs/smoke-all/brand/logo/*-book/(book)- Plus a few listing and engine class-override tests (likely related shared state issues)
Related
#12621 addresses the broader Deno.env.set cleanup (milestoned for v1.10). A targeted fix for this specific leak could unblock the scheduled CI sooner — either clearing the env var after use in editor-support/crossref.ts, or making book-crossrefs.ts:263 defensive against missing headings.