Skip to content

CI: Only save cache on main#6

Merged
Nino-K merged 1 commit intorancher-sandbox:mainfrom
mook-as:ci/cache-save-on-main
Dec 8, 2025
Merged

CI: Only save cache on main#6
Nino-K merged 1 commit intorancher-sandbox:mainfrom
mook-as:ci/cache-save-on-main

Conversation

@mook-as
Copy link
Contributor

@mook-as mook-as commented Nov 6, 2025

Our caches are rather big (nearly all of the total quota). Unless the cache was built from the default branch, it can only be used from the same branch as the run that pushed it. This means that we end up pushing lots of cache that can never be reused, causing the actually useful ones (i.e. the caches from the default branch) to be evicted due to space.

Fix this by using explicit cache save and restore, and then limiting the save to only apply on the main branch.

This depends on #5 because of merge conflicts.

Our caches are rather big (nearly all of the total quota).  Unless the
cache was built from the default branch, it can only be used from the same
branch as the run that pushed it.  This means that we end up pushing lots
of cache that can never be reused, causing the actually useful ones (i.e.
the caches from the default branch) to be evicted due to space.

Fix this by using explicit cache save and restore, and then limiting the
save to only apply on the main branch.

Signed-off-by: Mark Yen <mark.yen@suse.com>
@mook-as mook-as force-pushed the ci/cache-save-on-main branch from 7909c77 to 2e40098 Compare November 12, 2025 23:10
@mook-as mook-as marked this pull request as ready for review November 13, 2025 00:23
@mook-as mook-as requested a review from Nino-K December 8, 2025 17:50
@Nino-K Nino-K merged commit ab318a8 into rancher-sandbox:main Dec 8, 2025
5 checks passed
@mook-as mook-as deleted the ci/cache-save-on-main branch February 9, 2026 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants