-
Notifications
You must be signed in to change notification settings - Fork 6
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(proteus): prevent missing messages by using transactions [WPB-10873] 🍒 #3007
fix(proteus): prevent missing messages by using transactions [WPB-10873] 🍒 #3007
Conversation
@@ -68,6 +74,7 @@ internal class ProteusMessageUnpackerImpl( | |||
return proteusClientProvider.getOrError() | |||
.flatMap { | |||
wrapProteusRequest { | |||
<<<<<<< HEAD |
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.
:(
6b5c610
to
e617029
Compare
Quality Gate passedIssues Measures |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #3007 +/- ##
========================================
Coverage 52.54% 52.55%
========================================
Files 1301 1301
Lines 50059 50066 +7
Branches 4666 4665 -1
========================================
+ Hits 26304 26310 +6
- Misses 21880 21883 +3
+ Partials 1875 1873 -2
... and 2 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Datadog ReportBranch report: ✅ 0 Failed, 3099 Passed, 107 Skipped, 12.27s Total Time |
…73] 🍒 (#3007) * Commit with unresolved merge conflicts * chore: solve conflicts --------- Co-authored-by: Vitor Hugo Schwaab <[email protected]>
This PR was automatically cherry-picked based on the following PR:
Original PR description:
PR Submission Checklist for internal contributors
The PR Title
SQPIT-764
The PR Description
What's new in this PR?
Issues
Some clients reported missing messages.
We found that it is not that hard to kill the app by swiping it away between decryption and DB insertion.
Solutions
By not saving the session before inserting the messages into the DB, we can try to process this event again and recover this message.
Changed the API so instead of returning ByteArray, the Proteus clients will accept a lambda to process the output.
After allowing processing the output, the Proteus clients will persist the session.
CoreCrypto (that doesn't support saving session later) will decrypt and call the lambda normally.
Testing
Test Coverage
PR Post Merge Checklist for internal contributors
References
feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764
.