GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Unable to restore cache, since version got incompatible. · Issue #1075 · actions/cache

Unable to restore cache, since version got incompatible. #1075

New issue
Copy link
New issue
Copy link
Closed
Closed
Unable to restore cache, since version got incompatible.#1075
Copy link
Assignees
tiwarishub

Description

@crud89
crud89
opened on Jan 16, 2023
Issue body actions

I am using the same cache entry for my builds for about two years now and had no problem so far, but my most recent build failed, because it could not resolve the cache key. Here's the log:

##[debug]Resolved Keys:
##[debug]["VulkanSDK-1.2.148.0-Windows"]
##[debug]Checking zstd --version
##[debug]*** zstd command line interface 64-bits v1.5.2, by Yann Collet ***
##[debug]Resource Url: https://artifactcache.actions.githubusercontent.com/...&version=1e6eda42c50f042abb00cf2d1ad80aa1b9177459f9eb82bbc4525bdf187e4e87
##[debug]Resource Url: https://artifactcache.actions.githubusercontent.com/...
##[debug]No matching cache found for cache key 'VulkanSDK-1.2.148.0-Windows', version '1e6eda42c50f042abb00cf2d1ad80aa1b9177459f9eb82bbc4525bdf187e4e87 and scope refs/heads/main. There exist one or more cache(s) with similar key but they have different version or scope. See more info on cache matching here: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key 
##[debug]Other caches with similar key:
##[debug]Cache Key: VulkanSDK-1.2.148.0-Windows, Cache Version: 7c5f7e46ac2bf614362c2dea48d7008f945d94ba96d5ccc3c1fc8ef0cde46ff4, Cache Scope: refs/heads/main, Cache Created: 2020-08-10T06:21:50.49Z
##[debug]Failed to delete archive: Error: ENOENT: no such file or directory, unlink ''

As you can see, the version hash has changed, but I do not understand why. I haven't changed the workflow in a while (last time to update to v3) and according to the docs, there shouldn't be an issue, as long as I provide the same combination of restore path and OS (windows-latest). I guess the obvious solution here would be to simply create a new cache entry, however, I want to be sure to understand what's going on before I do this (Vulkan SDK 1.2.148 is no longer available for download, so I also would have to bump the SDK version, which might in term cause problems elsewhere). Is there anything i can do to keep using the current cache entry?

Thanks.

Activity

  1. github-actions
    assigned
    tiwarishub
    on Jan 16, 2023
  2. me-and commented on Jan 16, 2023

    @me-and
    me-and
    on Jan 16, 2023
    Contributor
    More actions

    This will probably be because, as of v3.2.1 / #1039, the cache code defaults to using the tar provided by Git for Windows, plus zstd for compression, rather than whatever tar is first in the path (probably Windows' own) plus gzip. Changing the compression tool changes the cache version string, per https://github.com/actions/cache#cache-version, so this is expected.

    If you want to keep using the current cache while using the latest version of this action, you'll currently need to prevent the cache code finding Git for Windows' tar. I've been able to achieve that with Move-Item -Path "C:\Program Files\Git\usr\bin\tar.exe" -Destination "C:\Program Files\Git\usr\bin\_tar.exe". Alternatively, pin your uses: actions/cache@ref to use v3.2.0 as the ref, although that's (hopefully) only a temporary fix.

    It looks like the changes in the underlying library that have caused this have been backed out: actions/toolkit#1289, so I expect this will all change again in the near future regardless…

    Reacted by Carsten Rudolph
  3. cryi commented on Jan 16, 2023

    @cryi
    cryi
    on Jan 16, 2023
    More actions

    For me setting enableCrossOsArchive to true fixed the issue.

          - name: restore cache
            uses: actions/cache@v3
            env:
              cache-name: cache-binaries
            with:
              path: ./release
              key: build#${{ github.sha }}
              enableCrossOsArchive: true
    Reacted by Carsten Rudolph
  4. crud89 commented on Jan 17, 2023

    @crud89
    crud89
    on Jan 17, 2023
    Author
    More actions

    This will probably be because, as of v3.2.1 / #1039, the cache code defaults to using the tar provided by Git for Windows, plus zstd for compression, rather than whatever tar is first in the path (probably Windows' own) plus gzip. Changing the compression tool changes the cache version string, per https://github.com/actions/cache#cache-version, so this is expected.

    @me-and I checked the last successful completions, and while it appears to be the reason, the jobs succeeded with 3.2.1 (c1a5de8) and 3.2.2 (4723a57). The issue only started to appear this weekend with 3.2.3 (58c146c).

    @cryi Thanks for the info! With the information above, I think this is an issue that's related to this feature, since it only got introduced in the last release.

  5. crud89
    added a commit that references this issue on Jan 18, 2023

    Fix cache at v3.2.2 until [cross OS entries](actions/cache#1075) are …

    f687227
  6. crud89 commented on Jan 18, 2023

    @crud89
    crud89
    on Jan 18, 2023
    Author
    More actions

    Unfortunately enabling cross-OS also did not resolve this issue for me. I guess I have to keep using v3.2.2 until this gets resolved.

    Reacted by V
  7. crud89
    added a commit that references this issue on Jan 18, 2023

    Pin cache at v3.2.2 until actions/cache#1075 is fixed.

    f3a217c
  8. Phantsure commented on Mar 1, 2023

    @Phantsure
    Phantsure
    on Mar 1, 2023
    Contributor
    More actions

    @crud89 This issue is because of above mentioned reasons. Cache version logic got changed.
    If your workflow was using a gzip based cache then it would have been broken as now cache version is different and default compression method for caching is zstd instead of gzip on windows.

    If you require more help then, would need workflow logs or exact yaml file to debug the issue

  9. crud89 commented on Mar 1, 2023

    @crud89
    crud89
    on Mar 1, 2023
    Author
    More actions

    Thanks for the clarification. I guess it does not matter anymore, since the cache got wiped apparently, so I have to re-create it anyway. So I guess this issue can be closed. 🙂

    Nevertheless, I think this change could have been better documented. From the release logs, I was not able to tell how that affects my existing cache.

  10. vsvipul
    closed this as completedon Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @tiwarishub
    tiwarishub

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

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.