Skip to content

Fix configure scripts destroying restored Deno CI cache#14450

Merged
cderv merged 1 commit intomainfrom
fix/configure-deno-cache-wipe
Apr 28, 2026
Merged

Fix configure scripts destroying restored Deno CI cache#14450
cderv merged 1 commit intomainfrom
fix/configure-deno-cache-wipe

Conversation

@cderv
Copy link
Copy Markdown
Member

@cderv cderv commented Apr 28, 2026

The CI Deno dev cache (added by #14408) restored package/dist/bin/deno_cache before configure ran, but every Revendoring quarto dependencies phase still showed hundreds of Download lines on cache hit.

Root Cause

configure.sh and configure.cmd unconditionally wiped package/dist while bootstrapping Deno, destroying the just-restored cache before vendor.sh reached it. The vendor scripts already honor QUARTO_SKIP_DENO_CACHE_WIPE=1 to preserve the cache, but the configure-time wipe was missed.

Evidence in a recent main run:
https://github.com/quarto-dev/quarto-cli/actions/runs/24893863352/job/72893237475

Cache restores at 14:11:22.6755Z, then rm -rf package/dist fires at 14:11:22.7048Z, followed by 743 Download lines during Revendoring quarto dependencies.

Fix

Apply the same QUARTO_SKIP_DENO_CACHE_WIPE gate to configure.sh and configure.cmd. CI sets the variable in .github/workflows/actions/quarto-dev/action.yml so the restored cache survives; local devs (env var unset) keep the original wipe behavior.

The CI Deno dev cache (Cache Deno development cache step in
.github/workflows/actions/quarto-dev/action.yml) restores
package/dist/bin/deno_cache before configure runs. configure.sh
and configure.cmd then unconditionally wipe package/dist when
bootstrapping Deno, destroying the just-restored cache before
vendor.sh reaches it. The vendor scripts already gate their own
cache wipe with QUARTO_SKIP_DENO_CACHE_WIPE=1; the configure-time
wipe was missed.

Apply the same gate to configure.sh and configure.cmd so the
restored cache survives. Local devs (env var unset) keep the
original wipe behavior.
@cderv cderv merged commit 3e11b83 into main Apr 28, 2026
51 checks passed
@cderv cderv deleted the fix/configure-deno-cache-wipe branch April 28, 2026 13:58
cderv added a commit that referenced this pull request Apr 28, 2026
* Cache Deno development cache in CI (#14408)

* Gate vendor.sh cache wipe behind QUARTO_SKIP_DENO_CACHE_WIPE

Default behavior unchanged: local ./configure.sh still wipes deno_cache
before re-vendoring. CI opts into cache preservation by setting
QUARTO_SKIP_DENO_CACHE_WIPE=1, enabling actions/cache to restore the
cache and have it survive vendor.sh.

* Gate vendor.cmd cache wipe behind QUARTO_SKIP_DENO_CACHE_WIPE

Windows counterpart to the vendor.sh change. Behavior matches:
default wipes, QUARTO_SKIP_DENO_CACHE_WIPE=1 preserves.

* Cache Deno development cache in CI

Adds actions/cache restore for ./package/dist/bin/deno_cache, keyed on
the five files that influence Deno dep resolution: configuration,
src/import_map.json, src/vendor_deps.ts, tests/test-deps.ts, and
package/scripts/deno_std/deno_std.ts.

Both configure steps set QUARTO_SKIP_DENO_CACHE_WIPE=1 so the restored
cache survives the configure.sh / configure.cmd run.

Adds dev-docs/ci-deno-caching.md explaining the cache layout, key
composition, env var contract, and how to force invalidation. Adds a
cross-link from dev-docs/upgrade-dependencies.md so a contributor
bumping deno_std version sees the cache consequences.

Expected per-OS cache size ~150-200 MB; total footprint ~600 MB across
Linux/macOS/Windows, well under GitHub's 10 GB repo quota.

(cherry picked from commit e4b75c1)

* Fix configure scripts destroying restored Deno CI cache (#14450)

The CI Deno dev cache (Cache Deno development cache step in
.github/workflows/actions/quarto-dev/action.yml) restores
package/dist/bin/deno_cache before configure runs. configure.sh
and configure.cmd then unconditionally wipe package/dist when
bootstrapping Deno, destroying the just-restored cache before
vendor.sh reaches it. The vendor scripts already gate their own
cache wipe with QUARTO_SKIP_DENO_CACHE_WIPE=1; the configure-time
wipe was missed.

Apply the same gate to configure.sh and configure.cmd so the
restored cache survives. Local devs (env var unset) keep the
original wipe behavior.

(cherry picked from commit 3e11b83)
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