-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(cache): Repository cache fingerprinting #17367
feat(cache): Repository cache fingerprinting #17367
Conversation
Blocked by #17364 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the need for gradual migration instead of full? Assumption that it's too heavy for the app in production?
Yes, otherwise it will reset all the caches instantly 🤷♂️ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 is writing new json files so bad? i don't see a big issue for the hoseted app. I think it's always copying the cache file after each repo anyways. 🤔
It's not about writing JSON, we have to reset all the cache while migrating from 12 to 13. I forgot to add this "resetting" part. |
but didn't we still use / migrate the old cache? so it's irrelevant if we change it afterwards? |
If we migrate gradually, we have to migrate previous versions to 12, or reset the data and migrate it to 13 for the smaller fraction of repos. If we're okay to reset them all at once, I think we can make "fresh start" for the revisions. |
i still don't know why we can't migrate all old caches like we did before? btw the hosted app is using multiple worker nodes and every node will only process one repo at a time. |
# Conflicts: # lib/util/cache/repository/impl/cache-factory.ts # lib/util/cache/repository/impl/local.spec.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hard to tell from code inspection alone
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i still don't understand why we can't migrate old cache this time
Because for some repos, we may reuse the cache of previously deleted repository with same name, and there is no easy way to detect repos like these. |
that case is very rare, so those could be manually clean like today? |
How much work would it be to preserve existing caches? i.e. knowing that maybe some of them are invalid, but thinking it's an OK trade-off? |
Well, we may just write and check fingerprints only for repos that don't have any cache (i.e. only for new ones). |
So the choice is between:
|
Not exactly:
|
i would simply add the fingerprint if missing as the wrong cases are only a few repos. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, let's go with @viceice's suggestion and I'll keep manually fixing any we find in the app. Sorry for the changing of requirements
No problem, I'll restore it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
otherwise LGTM
🎉 This PR is included in version 32.184.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Changes
fingerprint
parameterContext
Documentation (please check one with an [x])
How I've tested my work (please tick one)
I have verified these changes via: