Skip to content
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: refactoring self user fetch [#WPB-15190] #3801

Merged
merged 1 commit into from
Jan 17, 2025

Conversation

sbakhtiarov
Copy link
Contributor

@sbakhtiarov sbakhtiarov commented Jan 14, 2025

TaskWPB-15190 [Android] race condition in getKnownUser causes multible requests to update

https://wearezeta.atlassian.net/browse/WPB-15190

What's new in this PR?

Related to: wireapp/kalium#3229

Refactoring getting / observe self user. New GetSelfUserUseCase use case to get self user is used where appropriate instead of observing until first value is received.

@echoes-hq echoes-hq bot added the echoes: technical-roadmap Work contributing to the Technical Roadmap, to improve our velocity or reduce the technical debt. label Jan 14, 2025
@sbakhtiarov sbakhtiarov force-pushed the fix/self-user-refactoring branch 2 times, most recently from 1b3b34d to ce12e33 Compare January 15, 2025 14:27
Copy link
Contributor

@sbakhtiarov looks like you are rolling back kalium to a previous commitish.

This means that the PR's target branch (develop) is using a newer version of Kalium, and the changes in this PR will rollback Kalium to an older version.

develop This PR
b016dd9f6d3d053be275fe57e3b50ecb68b32d14 b304f302a20874093809dea89e03016515d7c9fe

Is this intentional?

Copy link
Contributor

@saleniuk saleniuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one small suggestion but I'm approving as the rest looks ok

@sbakhtiarov sbakhtiarov force-pushed the fix/self-user-refactoring branch from b01b7d7 to 35126ba Compare January 17, 2025 11:46
@sbakhtiarov sbakhtiarov force-pushed the fix/self-user-refactoring branch from 35126ba to f4ccd86 Compare January 17, 2025 11:56
@sbakhtiarov sbakhtiarov added this pull request to the merge queue Jan 17, 2025
@codecov-commenter
Copy link

codecov-commenter commented Jan 17, 2025

Codecov Report

Attention: Patch coverage is 52.94118% with 16 lines in your changes missing coverage. Please review.

Project coverage is 45.63%. Comparing base (f1eef77) to head (f4ccd86).
Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
...n/kotlin/com/wire/android/ui/home/HomeViewModel.kt 33.33% 4 Missing ⚠️
...s/usecase/ObserveConversationRoleForUserUseCase.kt 0.00% 2 Missing ⚠️
...in/kotlin/com/wire/android/services/CallService.kt 0.00% 1 Missing ⚠️
...i/home/appLock/forgot/ForgotLockScreenViewModel.kt 0.00% 1 Missing ⚠️
...tions/usecase/GetConversationsFromSearchUseCase.kt 50.00% 0 Missing and 1 partial ⚠️
...ome/conversationslist/ConversationListViewModel.kt 50.00% 1 Missing ⚠️
...wire/android/ui/home/settings/SettingsViewModel.kt 0.00% 1 Missing ⚠️
.../account/displayname/ChangeDisplayNameViewModel.kt 0.00% 0 Missing and 1 partial ⚠️
.../account/email/updateEmail/ChangeEmailViewModel.kt 0.00% 0 Missing and 1 partial ⚠️
...e/settings/account/handle/ChangeHandleViewModel.kt 0.00% 0 Missing and 1 partial ⚠️
... and 2 more
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3801   +/-   ##
========================================
  Coverage    45.63%   45.63%           
========================================
  Files          485      485           
  Lines        16569    16569           
  Branches      2783     2783           
========================================
  Hits          7562     7562           
  Misses        8227     8227           
  Partials       780      780           
Files with missing lines Coverage Δ
...re/android/notification/WireNotificationManager.kt 81.05% <100.00%> (ø)
...onversations/call/ConversationListCallViewModel.kt 64.21% <100.00%> (ø)
...tions/details/GroupConversationDetailsViewModel.kt 67.74% <100.00%> (ø)
...i/home/newconversation/NewConversationViewModel.kt 69.49% <100.00%> (ø)
...oid/ui/home/settings/account/MyAccountViewModel.kt 87.50% <100.00%> (ø)
...id/ui/sharing/ImportMediaAuthenticatedViewModel.kt 32.69% <100.00%> (ø)
.../ui/userprofile/service/ServiceDetailsViewModel.kt 95.29% <100.00%> (ø)
...serprofile/teammigration/TeamMigrationViewModel.kt 88.46% <100.00%> (ø)
...in/kotlin/com/wire/android/services/CallService.kt 2.98% <0.00%> (ø)
...i/home/appLock/forgot/ForgotLockScreenViewModel.kt 61.32% <0.00%> (ø)
... and 10 more

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f1eef77...f4ccd86. Read the comment docs.

Merged via the queue into develop with commit 24d57f9 Jan 17, 2025
13 of 14 checks passed
@sbakhtiarov sbakhtiarov deleted the fix/self-user-refactoring branch January 17, 2025 12:38
Copy link
Contributor

Built wire-android-staging-compat-pr-3801.apk is available for download

Copy link
Contributor

Built wire-android-dev-debug-pr-3801.apk is available for download

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
echoes: technical-roadmap Work contributing to the Technical Roadmap, to improve our velocity or reduce the technical debt. size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants