Skip to content

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

Draft
wdconinc wants to merge 5 commits intocvmfs-contrib:mainfrom
wdconinc:cvmfs-cache
Draft

feat: use GitHub Actions cache to persist the CernVM-FS cache#37
wdconinc wants to merge 5 commits intocvmfs-contrib:mainfrom
wdconinc:cvmfs-cache

Conversation

@wdconinc
Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread action.yml
- 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
Copy Markdown
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.

Comment thread action.yml
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
Copy Markdown
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.

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.

3 participants