CI cache does not work correctly for branches
- Dominant language
- C++
- Stars
- 28.9k
- Forks
- 5.6k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 437
Description
Since moving the cache priming into the request stage in #37028 - caches are broken for non `main` branches
the reason for this is that the request stage runs in the context of the target branch, whereas the actual runs always run in the context of `main`, and the cache is scoped to the context
for PRs/pushes to `main` the context is the same so no issue, for release branches - eg release/v.* the cache is scoped to that branch and so when the ci runs in `main` context it is not within its scope (fwiw it would work the other way round as `main` is higher scoped than the release branch)
the caches currently work only because they were created before the change - and so retain the higher `main` scope
there is not an easy fix for this and it has highlighted a bunch of smaller ~related issues
my plan is to address the smaller issues first and once they are resolved address the core problem - the only solution i can think of rn is to instead use the unscoped GCS cache that we use for bazel
the required changes will need to be mostly made to related toolshed actions
Contributor guide
Assessment
This issue has not been assessed yet.