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. #1075DescriptionI 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. Activityme-and commented on Jan 16, 2023 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 cryi commented on Jan 16, 2023 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: trueReacted by Carsten Rudolph crud89 commented on Jan 17, 2023
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. crud89 commented on Jan 18, 2023 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. Phantsure commented on Mar 1, 2023 @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 crud89 commented on Mar 1, 2023 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.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|