In the workflow below, I try to look up the exact key, and if it fails, I want it to look up the partial key as described in restore-keys.
However, it seems like if there are similar EXACT key matches, but with different version and/or scope, it doesn't even try restore-keys.
Actual result
Here below the lines that show that the partial key venv-Linux-avatar-python- wasn't being tried at all.
##[debug]No matching cache found for cache key 'venv-Linux-avatar-python-4e720f85a06c7351d9cce2fed31d87eddd0a5c4d2d1d0b905c347c3c11608bb0', version 'a06973642bf1b0b00df8a42eccd78187e15d22dc3785e3683bdf1261fb0023da and scope refs/heads/tc/api/retry-email-sending. 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: venv-Linux-avatar-python-4e720f85a06c7351d9cce2fed31d87eddd0a5c4d2d1d0b905c347c3c11608bb0, Cache Version: a06973642bf1b0b00df8a42eccd78187e15d22dc3785e3683bdf1261fb0023da, Cache Scope: refs/pull/2923/merge, Cache Created: 2024-08-08T09:18:03.8933333Z
##[debug]Cache Key: venv-Linux-avatar-python-4e720f85a06c7351d9cce2fed31d87eddd0a5c4d2d1d0b905c347c3c11608bb0, Cache Version: a06973642bf1b0b00df8a42eccd78187e15d22dc3785e3683bdf1261fb0023da, Cache Scope: refs/pull/2924/merge, Cache Created: 2024-08-08T09:01:03.0433333Z
##[debug]Cache Key: venv-Linux-avatar-python-4e720f85a06c7351d9cce2fed31d87eddd0a5c4d2d1d0b905c347c3c11608bb0, Cache Version: a06973642bf1b0b00df8a42eccd78187e15d22dc3785e3683bdf1261fb0023da, Cache Scope: refs/pull/2917/merge, Cache Created: 2024-08-07T15:42:32.2633333Z
Expected result
I expected the cache to try the following caches on the default-branch (main) due to the venv-Linux-avatar-python- restore-keys :
In the workflow below, I try to look up the exact key, and if it fails, I want it to look up the partial key as described in
restore-keys
.However, it seems like if there are similar EXACT key matches, but with different version and/or scope, it doesn't even try restore-keys.
Actual result
Here below the lines that show that the partial key
venv-Linux-avatar-python-
wasn't being tried at all.Expected result
I expected the cache to try the following caches on the default-branch (
main
) due to thevenv-Linux-avatar-python-
restore-keys :venv-Linux-avatar-python-b3cc8e9136fb1220e68d1e090bec21ef1ff5e989b1dd8ce4a4ad419ab0472643
venv-Linux-avatar-python-16ef110bc5029f7410029d94501801d0b277cbb6e2d6122d5fe9a4df54c53cd9
See images below.
Workflow
Full debug logs
Caches