cache icon indicating copy to clipboard operation
cache copied to clipboard

Cache miss on Windows despite a successful cache-write

Open coot opened this issue 1 year ago • 7 comments

In this run (in the Cache cabal store we had a cache miss on Windows

Run actions/cache@v3
  with:
    path: C:\sr
    key: cache-dependencies-pu4Aevoo_v1-Windows-8.10-42dc9d1d9517c36cc29f25d6a45c30c05b6faa6e98e7f7b96cb256858a8d7694
    restore-keys: cache-dependencies-pu4Aevoo_v1-Windows-8.10
    enableCrossOsArchive: false
    fail-on-cache-miss: false
    lookup-only: false
  env:
    CACHE_VERSION: pu4Aevoo_v1
Cache not found for input keys: cache-dependencies-pu4Aevoo_v1-Windows-8.10-42dc9d1d9517c36cc29f25d6a45c30c05b6faa6e98e7f7b96cb256858a8d7694, cache-dependencies-pu4Aevoo_v1-Windows-8.10

Despite the fact that the cache was successfully saved in this run (in the Post Cache cabal store step):

Post job cleanup.
"C:\Program Files\Git\usr\bin\tar.exe" --posix -cf cache.tzst --exclude cache.tzst -P -C D:/a/io-sim/io-sim --files-from manifest.txt --force-local --use-compress-program "zstd -T0"
Cache Size: ~19 MB (19879266 B)
Cache saved successfully
Cache saved with key: cache-dependencies-pu4Aevoo_v1-Windows-8.10-42dc9d1d9517c36cc29f25d6a45c30c05b6faa6e98e7f7b96cb256858a8d7694

This is Windows specific, on Ubuntu and MacOS cache can be retrieved.

coot avatar Nov 08 '23 08:11 coot

We have 15 jobs each is caching between 50MB to 100MB, so it does not exceed the the 10GB cache limit.

coot avatar Nov 08 '23 09:11 coot

Noticing the same problem: image

The cache key exists: image

chase avatar Feb 01 '24 11:02 chase

@coot Although it's poorly documented, setting enableCrossOsArchive: true seemed to fix it. I'm not sure why recently this became necessary because it seems like previously it just worked.

chase avatar Feb 03 '24 08:02 chase

Thanks @chase this indeed made it work. There's certainly something wrong, since we only use Windows machines in GitHub Actions.

coot avatar Feb 07 '24 09:02 coot

Unfortunately it (setting enableCrossOsArchive) did not help for the dolibarr project.

mdeweerd avatar Mar 04 '24 21:03 mdeweerd

I have the same issue - using latest v4: all windows fails: https://github.com/gimlichael/Cuemon/actions/runs/9216088354/job/25416675986

enableCrossOsArchive is already set to true

image

gimlichael avatar May 25 '24 22:05 gimlichael