Skip to content

Quarto freeze files shouldn't be loaded from cache if environment is different #496

@penelopeysm

Description

@penelopeysm

In the current workflow, Quarto's _freeze folder is cached:

- name: Restore cached _freeze folder
id: cache-primes-restore
uses: actions/cache/restore@v4
with:
path: |
_freeze/
key: ${{ runner.os }}-primes-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-primes

This is great as it avoids rerunning all the code if the source qmd files haven't changed (cf. Quarto docs).

However, as far as I can tell, if the environment changes (i.e. the Manifest.toml) but the source files aren't changed, the code won't be rerun. The correct behaviour should be to rerun if either the source or the environment is changed.

This can be done by hashing the manifests and adding this to the run key: https://docs.github.com/en/actions/learn-github-actions/expressions#hashfiles and also removing the restore-key.

Generally, this means that the docs deployment is more likely to take 2 hours rather than 2 minutes. However, I think that correctness is most important here :)

#497 should fix this.

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