-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
feat(native): Introduce CFI Caches #10161
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
Conversation
| if e.errno != errno.ENOENT: | ||
| raise | ||
| symcache_file.cache_file.save_to(cachefile_path) | ||
| model.cache_file.save_to(cachefile_path) |
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.
noob question - How do local cache files get removed?
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.
There's a periodically scheduled job clean_dsymcache that deletes files from the FS cache when they haven't been referenced for 1.5 days or longer. The actual "logic" is defined in this file at the very bottom: clear_old_entries.
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.
Thank you 🙇
25e2134 to
af7a040
Compare
|
This is ready for review now. Since it's based off #10052, the first actual commit is 4076e2b. I'll rebase this as soon as we merge the other PR. |
854d3c7 to
f42f00a
Compare
markstory
left a comment
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.
Looks good to me, but I have very little context on this section of the application.
| def broken_make_symcache(self): | ||
| @classmethod | ||
| def broken_make_symcache(cls, obj): | ||
| raise SymbolicError('shit on fire') |
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.
👏
| cficaches = ProjectDebugFile.difcache.get_cficaches(self.project, [debug_id]) | ||
| assert debug_id in cficaches | ||
|
|
||
| def test_update_cficache(self): |
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.
Should there be a test for updating a cache file when the cache file has already been created by 'another' process?
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.
Yes, there should. I'm just not sure how to do this (as this can only happen for concurrent processes) and I don't want to mock the entire world. There will be a test for this soon, but for now please just believe me that this works :)
Introduces a new model
ProjectCfiCacheFileand generalizes cache generation over symcaches and CFI caches.Based on #10052
Requires getsentry/symbolic#93