Skip to content

GHA cache key changes between restoring and saving #518

@penelopeysm

Description

@penelopeysm

In both the preview and publish workflows, the _freeze folder is cached with a key that depends on the Manifest.toml file (i.e. the project environment):

restore

- name: Restore cached _freeze folder
id: cache-restore
uses: actions/cache/restore@v4
with:
path: |
_freeze/
key: ${{ runner.os }}-${{ hashFiles('**/Manifest.toml') }}

save

- name: Save _freeze folder
id: cache-save
uses: actions/cache/save@v4
with:
path: |
_freeze/
key: ${{ runner.os }}-${{ hashFiles('**/Manifest.toml') }}

However, as evidenced by recent CI runs e.g. https://github.com/TuringLang/docs/actions/runs/10670233519/job/29573828445, the restore key and save key are different. Presumably this means that somehow the Manifest.toml file is being changed during the process of quarto render. I'm not sure how or why this happens, considering that the Quarto notebooks don't modify the environment (they only call Pkg.instantiate). In any case it would be worth fixing this so that we can avoid running needless 1 hr 45 min doc generations when fixing typos.

I wonder if it's because Quarto installs some stuff like bits of its own Julia engine in the environment.

Metadata

Metadata

Assignees

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