-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[Rollouts]Writing Rollouts to persistence #12300
Conversation
c3438b5
to
30b8549
Compare
30b8549
to
932f858
Compare
932f858
to
9654a2e
Compare
if let rolloutsData = | ||
getRolloutsStateEncodedJsonData() { | ||
persistenceDelegate.updateRolloutsStateToPersistence( | ||
rollouts: rolloutsData, |
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.
Curious why we're using NSData instead of NSString for this parameter?
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.
Oh because [NSFileHandle writerData:]
need NSData as parameter. The other place for non-fatal I passed as NSString is because the helpers need input as NSString...
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.
Like how you've split out the swift and ObjC parts using a delegate 😎. Just had some questions. Feel free to ping me again when you want another look!
00e5a15
to
6a99a8b
Compare
@@ -271,6 +279,7 @@ void FIRCLSExceptionRecord(FIRCLSExceptionType type, | |||
|
|||
// Create new report and copy into it the current state of custom keys and log and the sdk.log, | |||
// binary_images.clsrecord, and metadata.clsrecord files. | |||
// also copy rollouts.clsrecord if applicable. |
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.
curious question: is this happening implicitly? I don't see any change to implement it (at least I think)
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.
Ah if you the the line below, this is actually copy all the file from the one report directory to another. So if the original report contain rollouts then it will be copy to another report directory using the existing logic.
BOOL copied = [fileManager.underlyingFileManager copyItemAtPath:currentReportPath
toPath:newReportPath
error:&error];
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.
Generally LGTM but definitely deferring to Sam to review this one :)
Base on this summary of events crashlytics record:
Here is how we read rollouts info:
rollout.clsrecord
rollout.clsrecord
recordExceptionModel()
we add rollouts to each exception entry, for on-demand fatal it will read rollouts fromrollout.clsrecord
YES
then read rollouts info from entry, ifNO
, read rollouts fromrollout.clsrecord
Changes include in this PR:
rollouts.clsrecord
error.clsrecord
custom_exception.clsrecord
#no-changelog