Skip to content

Cache miss on Windows despite a successful cache-write #1275

Closed

Description

@coot

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.

Activity

  1. changed the title [-]Cache miss on Windows despite [/-] [+]Cache miss on Windows despite a successful cache-write[/+] on Nov 8, 2023
  2. coot commented on Nov 8, 2023

    @coot
    Author

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

  3. chase commented on Feb 1, 2024

    @chase

    Noticing the same problem:
    image

    The cache key exists:
    image

  4. chase commented on Feb 3, 2024

    @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.

  5. coot commented on Feb 7, 2024

    @coot
    Author

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

  6. mdeweerd commented on Mar 4, 2024

    @mdeweerd

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

  7. gimlichael commented on May 25, 2024

    @gimlichael

    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

    I do believe it is related to this issue: #1114

  8. gimlichael commented on May 26, 2024

    @gimlichael

    Okay, my work-around for now is to have both Linux and Windows run and create caches (before I only ran on Linux because of enableCrossOsArchive).

    Additionally, I had to add this in all cache dependencies:

            restore-keys: |
              dotnet-restore-
    

    And this seems to work for now. In my humble opinion, enableCrossOsArchive does not work as intended.

    For reference: https://github.com/gimlichael/Cuemon/blob/main/.github/workflows/pipelines.yml

  9. coot commented on Oct 21, 2024

    @coot
    Author

    It broke again, so I followed more closely the docs: here and here. Check this PR.

  10. iseki0 commented on Jun 13, 2025

    @iseki0

    @coot Could you explain me how did you fix the problem? I don't understand what you did.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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