-
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: do not commit User and Client upserts if nothing has changed and fix empty contacts [WPB-15055] #3202
Conversation
…B-15055] (#3188) * fix: do not commit User and Client upserts if nothing has changed [WPB-15055] * fix unused parameter * fix detekt
I tried multiple different accounts and I couldn't reproduce that on my side: But I believe comparing nullable using @MohamadJaara could you please verify this using the account on which it happened to you? |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## release/candidate #3202 +/- ##
==================================================
Coverage 54.52% 54.53%
==================================================
Files 1250 1250
Lines 36555 36573 +18
Branches 3699 3707 +8
==================================================
+ Hits 19932 19945 +13
- Misses 15222 15226 +4
- Partials 1401 1402 +1
... and 2 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Datadog ReportBranch report: ✅ 0 Failed, 3241 Passed, 107 Skipped, 1m 1.88s Total Time |
…into fix/do-not-commit-user-and-client-upserts-if-nothing-has-changed-and-fix-empty-contacts # Conflicts: # persistence/src/commonTest/kotlin/com/wire/kalium/persistence/dao/client/ClientDAOTest.kt
|
Datadog ReportBranch report: ✅ 0 Failed, 3243 Passed, 108 Skipped, 1m 1.6s Total Time |
… fix empty contacts [WPB-15055] 🍒 (#3254) * fix: do not commit User and Client upserts if nothing has changed and fix empty contacts [WPB-15055] (#3202) * fix: do not commit User and Client upserts if nothing has changed [WPB-15055] (#3188) * fix: do not commit User and Client upserts if nothing has changed [WPB-15055] * fix unused parameter * fix detekt * fix: empty contacts data on list * trigger build --------- Co-authored-by: Michał Saleniuk <[email protected]> Co-authored-by: Michał Saleniuk <[email protected]>
PR Submission Checklist for internal contributors
The PR Title
SQPIT-764
The PR Description
What's new in this PR?
This PR contains cherry-picked changes that were first merged #3188 and then reverted #3198 because contacts data were not persisted properly. Here these changes are brought back along with a fix to persist these data properly. The problem was that in the upsert query, fields were compared using
!=
but some of them are nullable, that's why if the value was set to be null initially and then there was an upsert attempt with proper data,NULL != 'some string'
equalsNULL
instead of boolean value true/false so it never returns a proper result and when working with nullables,IS NOT
should be used instead, so in this PR it's changed to useIS NOT
.Testing
Test Coverage (Optional)
PR Post Submission Checklist for internal contributors (Optional)
PR Post Merge Checklist for internal contributors
References
feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764
.