Skip to content

Conversation

@mydea
Copy link
Member

@mydea mydea commented Jan 11, 2023

Currently, we do not store any cache for the master branch. When we run a PR, it will try to restore the cache from itself, then from the current branch, then just the newest cache it finds at all.

This means that on a fresh branch, it will restore the cache from the last action that ran - which could be any branch, which means the cache may incorporate changed we don't have, leading to us having to rebuild the cache.

Instead, this makes sure we restore from the master branch first, if possible. This makes it necessary to ensure we actually also store the cache when running on master - we only pass a restore key in that case that will never match anything.

@mydea mydea added the Dev: CI label Jan 11, 2023
@mydea mydea requested review from AbhiPrasad, Lms24 and lforst January 11, 2023 13:04
@mydea mydea self-assigned this Jan 11, 2023
@mydea mydea force-pushed the fn/nx-caching-master branch from e056248 to 3a03410 Compare January 11, 2023 13:11
@github-actions
Copy link
Contributor

github-actions bot commented Jan 11, 2023

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 19.84 KB (-0.01% 🔽)
@sentry/browser - ES5 CDN Bundle (minified) 61.46 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 18.62 KB (+0.02% 🔺)
@sentry/browser - ES6 CDN Bundle (minified) 55 KB (0%)
@sentry/browser - Webpack (gzipped + minified) 20.38 KB (0%)
@sentry/browser - Webpack (minified) 66.55 KB (0%)
@sentry/react - Webpack (gzipped + minified) 20.4 KB (0%)
@sentry/nextjs Client - Webpack (gzipped + minified) 47.63 KB (0%)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 26.82 KB (+0.02% 🔺)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 25.25 KB (-0.01% 🔽)
@sentry/replay ES6 CDN Bundle (gzipped + minified) 43.04 KB (0%)
@sentry/replay - Webpack (gzipped + minified) 38.25 KB (-0.01% 🔽)

Currently, we do not store any cache for the master branch.
When we run a PR, it will try to restore the cache from itself, then from the current branch, then just the newest cache it finds at all.

This means that on a fresh branch, it will restore the cache from the last action that ran - which could be any branch, which means the cache may incorporate changed we don't have, leading to us having to rebuild the cache.

Instead, this makes sure we restore from the master branch first, if possible. This makes it necessary to ensure we actually also _store_ the cache when running on master - we only pass a restore key in that case that will never match anything.
@mydea mydea force-pushed the fn/nx-caching-master branch from 3a03410 to b38e813 Compare January 11, 2023 13:58
@mydea mydea merged commit 23dbd45 into master Jan 11, 2023
@mydea mydea deleted the fn/nx-caching-master branch January 11, 2023 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants