Skip to content

Cache Not Found After Previous Successful Caching: Windows (latest) #735

@J-B-Blankenship

Description

@J-B-Blankenship

YAML File is fairly straightforward.

...
jobs:
  build:
    runs-on: windows-latest
    
    steps:
    - uses: actions/checkout@v2
    - uses: bazelbuild/setup-bazelisk@v1
    
    - name: Cache Build
          uses: actions/cache@v2
          env:
            cache-name: build-cache
          with:
            path: |
              ~/_bazel_runneradmin/*/action_cache
              ~/_bazel_runneradmin/*/execroot
              ~/_bazel_runneradmin/*/external
              ~/_bazel_runneradmin/*/server
            key: ${{ runner.os }}-${{ env.cache-name }}
...

In one repository, the cache works just fine, albeit slow (~ 4.5 mins to unravel ~1GB). I went to set up a second repository with the exact same code with the following output:

Post job cleanup.
C:\Windows\System3[2](https://github.com/J-B-Blankenship/[private_repository]/runs/5135821556?check_suite_focus=true#step:11:2)\tar.exe --posix -z -cf cache.tgz -P -C D:/a/[private_repository]/[private_repository] --files-from manifest.txt
Cache Size: ~952 MB (9984257[3](https://github.com/J-B-Blankenship/[private_repository]/runs/5135821556?check_suite_focus=true#step:11:3)[4](https://github.com/J-B-Blankenship/[private_repository]/runs/5135821556?check_suite_focus=true#step:11:4) B)
Cache saved successfully
Cache saved with key: Windows-build-cache

The next pull request rolls in:

Run actions/cache@v[2](https://github.com/J-B-Blankenship/[private_repository]/runs/5135821556?check_suite_focus=true#step:4:2)
  with:
    path: ~/_bazel_runneradmin/*/action_cache
  ~/_bazel_runneradmin/*/execroot
  ~/_bazel_runneradmin/*/external
  ~/_bazel_runneradmin/*/server
  
    key: Windows-build-cache
  env:
    cache-name: build-cache
Cache not found for input keys: Windows-build-cache

The only thing I can think of is that during the setup of the repository, the default branch was set to "main". I manually reverted this back to the traditional "master". All other repository settings are identical.

Any help would be greatly appreciated, including the rather long "Run actions/cache@v2" step.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions