-
-
Notifications
You must be signed in to change notification settings - Fork 342
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
fix: discontinue NSApplicationSupportDirectory usage #4335
fix: discontinue NSApplicationSupportDirectory usage #4335
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
🚨 Detected changes in high risk code 🚨High-risk code can easily blow up and is hard to test. We had severe bugs in the past. Be extra careful when changing these files, and have an extra careful look at these:
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4335 +/- ##
========================================
Coverage ? 91.691%
========================================
Files ? 622
Lines ? 50503
Branches ? 18271
========================================
Hits ? 46307
Misses ? 4103
Partials ? 93
Continue to review full report in Codecov by Sentry.
|
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.
Maybe an overkill, but we could write a test that checks if the flag was set after file manager creates that path, to avoid regression.
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 think it's better to ditch using sentryApplicationSupportPath
. I added my explanation in the comment #4335 (comment).
I also prefer to ditch sentryApplicationSupportPath all together. |
🚨 Detected changes in high risk code 🚨High-risk code can easily blow up and is hard to test. We had severe bugs in the past. Be extra careful when changing these files, and have an extra careful look at these:
|
Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
83887af | 1196.94 ms | 1206.82 ms | 9.88 ms |
542727d | 1227.96 ms | 1246.88 ms | 18.92 ms |
adcc7d8 | 1225.90 ms | 1245.08 ms | 19.18 ms |
01a28a9 | 1200.78 ms | 1227.90 ms | 27.12 ms |
dacf894 | 1232.32 ms | 1236.34 ms | 4.02 ms |
d3abae0 | 1200.36 ms | 1224.22 ms | 23.87 ms |
bd05478 | 1233.82 ms | 1255.56 ms | 21.74 ms |
282cc99 | 1238.27 ms | 1253.46 ms | 15.19 ms |
105a36c | 1227.37 ms | 1245.36 ms | 17.99 ms |
f1b97be | 1212.69 ms | 1226.12 ms | 13.43 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
83887af | 21.58 KiB | 419.64 KiB | 398.06 KiB |
542727d | 21.58 KiB | 571.85 KiB | 550.26 KiB |
adcc7d8 | 20.76 KiB | 426.15 KiB | 405.39 KiB |
01a28a9 | 22.85 KiB | 405.39 KiB | 382.54 KiB |
dacf894 | 20.76 KiB | 426.34 KiB | 405.58 KiB |
d3abae0 | 20.76 KiB | 434.92 KiB | 414.16 KiB |
bd05478 | 20.76 KiB | 432.33 KiB | 411.57 KiB |
282cc99 | 22.85 KiB | 414.09 KiB | 391.24 KiB |
105a36c | 22.85 KiB | 414.09 KiB | 391.24 KiB |
f1b97be | 21.58 KiB | 681.73 KiB | 660.15 KiB |
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 @armcknight 💯
…e-nsappsupport-from-backups
🚨 Detected changes in high risk code 🚨High-risk code can easily blow up and is hard to test. We had severe bugs in the past. Be extra careful when changing these files, and have an extra careful look at these:
|
Update: we will no longer use NSApplicationSupportDirectory and just move the few usages of it to use NSCachesDirectory.
Original description:
We received a question about what information we store to disk. Almost everything is stored in NSCachesDirectory, which is not included in device backups: https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/FileSystemOverview/FileSystemOverview.html
But, we started adding things to NSApplicationSupportDirectory, which is included in backups by default. Currently, no PII is written there, but this PR will mark the entire directory as excluded from backups as it's not necessary to back it up, and this will mitigate any accidental PII leaks in the future if we start writing more things there.
Fixes #4334