BUG: issues with CI caching
Bug
Error description
It seems that old pages have been lost somewhere:
Error message
First guess on error origin
Looking at different jobs on different branches shows that the pages caching name is mutable.
lukas_issue387_bug_transformation-for-climate-and-fir-clim-mix -> Creating cache old-pages-3-non_protected...
master -> Creating cache old-pages-3-protected...
But these names do not match. Therefore, the master branchs cannot be used in the other branches and the other way around. Running CI on a non-protected branch will move the master badges to a hidden space.
Error origin
There is already a discussion ongoing here: https://gitlab.com/gitlab-org/gitlab-runner/-/issues/29033#note_930759146
Maybe a solution could be to apply the following workaround / hack:
my-cool-job:
...
variables:
CACHE_FALLBACK_KEY: "node-modules-${CI_ENVIRONMENT_NAME}"
...
cache:
# this is a workaround of https://gitlab.com/gitlab-org/gitlab/-/merge_requests/86107/diffs#fa6cef4c2c6f398d87d46ae6584eaec407365c19_450_468
key: "$EMPTY_NOT_EXISTING_VARIABLE_THAT_WILL_BE_EMPTY_FOR_SURE"
paths:
- node-modules/
Solution
SOLVED: GitLab version was updated. With current version the naming behaviour for (un)protected branches can be disabled in the options. No need for adjustments in the code or the gitlab runner.