bazel-contrib / setup-bazel

GitHub Action to configure Bazel
MIT License
16 stars 5 forks source link

Disk cache always fails to restore #23

Open MorganRoff-UnlikelyAI opened 1 month ago

MorganRoff-UnlikelyAI commented 1 month ago

I have most things working well with this action, except the disk cache. When I try to use it, it starts restoring, but then always says "Failed to restore disk-{my-name} cache"

The bazelisk cache and the external caches both work great.

Example output:

Restore cache for disk-foo-bar
  Received 65374961 of 65374961 (100.0%), 31.2 MBs/sec
  Failed to restore disk-foo-bar cache

Unfortunately that's not much to go on, but I'm wondering if there could be something obvious that I've missed? My config is shown below. I can see that the disk-cache variable is being set to the expected name based on the logs above.

- name: Configure Bazelisk
      uses: bazel-contrib/setup-bazel@0.8.4
      with:
        # Avoid downloading Bazel every time
        bazelisk-cache: true
        # Cache external Bazel repositories. By default, this cache is based on the contents of
        # the WORKSPACE file, so specify a more specific file if needed.
        external-cache: |
          manifest:
            maven: maven_install.json
        # Cache build artifacts between workflow runs to speed-up builds of unchanged artifacts.
        disk-cache: ${{ ( inputs.use-cache == 'true' && inputs.cache-id ) || 'false' }}
p0deje commented 1 month ago
  1. Can you try re-running the workflow with debug logging enabled?
  2. Can you share how big the disk cache is?