Skip to content

feat: use GitHub Actions cache to persist the CernVM-FS cache #37

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

wdconinc
Copy link
Collaborator

No description provided.

- uses: actions/cache@v4
if: ${{ inputs.actions_cache == 'true' }}
with:
key: cvmfs-cache-${{ steps.lsb-release.outputs.id-release }}-${{ steps.lsb-release.outputs.arch }}-${{ hashFiles('action.yml') }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
key: cvmfs-cache-${{ steps.lsb-release.outputs.id-release }}-${{ steps.lsb-release.outputs.arch }}-${{ hashFiles('action.yml') }}
key: cvmfs-cache-${{ steps.lsb-release.outputs.id-release }}-${{ steps.lsb-release.outputs.arch }}

as seen in #40, using ${{ hashFiles('action.yml') }} as part of the key is not reliable as the file being hashed as very unlikely to appear in other repositories and causes caches to always miss.

with:
key: cvmfs-cache-${{ steps.lsb-release.outputs.id-release }}-${{ steps.lsb-release.outputs.arch }}-${{ hashFiles('action.yml') }}
path: |
${{ inputs.cvmfs_cache_base }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
${{ inputs.cvmfs_cache_base }}
${{ inputs.cvmfs_cache_base }}

One further issue may be that the cache directory is used for a number of locks and marker files that we may not want to cache. I think in the end you only want to keep the actual data files in the hash directories ./00/ ... ./ff and maybe the ./cachedb file.

I'll test a few configurations to see what works best.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants