kalium icon indicating copy to clipboard operation
kalium copied to clipboard

fix: recover mls group after pending commit [WPB-17076]

Open Garzas opened this issue 7 months ago β€’ 5 comments

BugWPB-17076 [Android] missing messages due to 1:1 being out of sync


PR Submission Checklist for internal contributors

  • The PR Title

    • [ ] conforms to the style of semantic commits messagesΒΉ supported in Wire's Github WorkflowΒ²
    • [ ] contains a reference JIRA issue number like SQPIT-764
    • [ ] answers the question: If merged, this PR will: ... Β³
  • The PR Description

    • [ ] is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Added recovery path in case when client before update to cc 5 had some pending commits

Garzas avatar Apr 25 '25 09:04 Garzas

Test Results

3β€ˆ168 tests   -β€Š515   3β€ˆ158 βœ…  -β€Š416   4m 56s ⏱️ - 1m 37s β€‡β€ˆβ€‡β€‡4 suites  -β€Š625β€‚β€ƒβ€ƒβ€‡β€ˆβ€‡10 πŸ’€  -β€Šβ€‡99  β€‡β€ˆβ€‡β€‡4 files    -β€Š625β€‚β€ƒβ€ƒβ€‡β€ˆβ€‡β€‡0 ❌ ±  0 

Results for commit 92599b20. ± Comparison against base commit 12685908.

This pull request removes 3683 and adds 3168 tests. Note that renamed tests count towards both.
PocIntegrationTest ‑ givenApiWhenGettingACMEDirectoriesThenReturnAsExpectedBasedOnNetworkState
PocIntegrationTest ‑ givenEmailAndPasswordWhenLoggingInThenRegisterClientAndLogout
PocIntegrationTest ‑ givenUserWhenHandlingTextMessagesThenProcessShouldSucceed
QualifiedIdTest ‑ givenIdsWithDifferentDomains_whenEqualsIgnoringBlankDomain_thenReturnsFalse[jvm]
QualifiedIdTest ‑ givenIdsWithDifferentValues_whenEqualsIgnoringBlankDomain_thenReturnsFalse[jvm]
QualifiedIdTest ‑ givenIdsWithSameDomains_whenEqualsIgnoringBlankDomain_thenReturnsTrue[jvm]
QualifiedIdTest ‑ givenIdsWithoutDomains_whenEqualsIgnoringBlankDomain_thenReturnsTrue[jvm]
QualifiedIdTest ‑ givenOneIdWithoutDomain_whenEqualsIgnoringBlankDomain_thenReturnsTrue[jvm]
com.wire.backup.BackupEndToEndTest ‑ givenBackedUpAssetMessage_whenRestoring_thenShouldReadTheSameContent[js, browser]
com.wire.backup.BackupEndToEndTest ‑ givenBackedUpAssetMessage_whenRestoring_thenShouldReadTheSameContent[jvm]
…
.QualifiedIdTest ‑ givenIdsWithDifferentDomains_whenEqualsIgnoringBlankDomain_thenReturnsFalse
.QualifiedIdTest ‑ givenIdsWithDifferentValues_whenEqualsIgnoringBlankDomain_thenReturnsFalse
.QualifiedIdTest ‑ givenIdsWithSameDomains_whenEqualsIgnoringBlankDomain_thenReturnsTrue
.QualifiedIdTest ‑ givenIdsWithoutDomains_whenEqualsIgnoringBlankDomain_thenReturnsTrue
.QualifiedIdTest ‑ givenOneIdWithoutDomain_whenEqualsIgnoringBlankDomain_thenReturnsTrue
com.wire.backup.BackupEndToEndTest ‑ givenBackedUpAssetMessage_whenRestoring_thenShouldReadTheSameContent
com.wire.backup.BackupEndToEndTest ‑ givenBackedUpLocationMessage_whenRestoring_thenShouldReadTheSameContent
com.wire.backup.BackupEndToEndTest ‑ givenBackedUpTextMessages_whenRestoring_thenShouldReadTheSameContent
com.wire.backup.BackupEndToEndTest ‑ givenBackupWithPassword_whenPeeking_thenShouldBeEncrypted
com.wire.backup.BackupEndToEndTest ‑ givenBackupWithoutPassword_whenPeeking_thenShouldNotBeEncrypted
…
This pull request removes 109 skipped tests and adds 10 skipped tests. Note that renamed tests count towards both.
PocIntegrationTest ‑ givenApiWhenGettingACMEDirectoriesThenReturnAsExpectedBasedOnNetworkState
com.wire.kalium.api.common.ACMEApiTest ‑ whenCallingGeTrustAnchorsApi_theResponseShouldBeConfigureCorrectly[jvm]
com.wire.kalium.api.common.ACMEApiTest ‑ whenCallingSendChallengeRequestApi_theResponseShouldBeConfigureCorrectly[jvm]
com.wire.kalium.api.v0.user.register.RegisterApiV0Test ‑ givenAValidEmail_whenActivationEmailWIthCode_theRequestShouldBeConfiguredCorrectly[jvm]
com.wire.kalium.api.v0.user.register.RegisterApiV0Test ‑ givenAValidEmail_whenRegisteringAccountWithEMail_theRequestShouldBeConfiguredCorrectly[jvm]
com.wire.kalium.api.v0.user.register.RegisterApiV0Test ‑ givenAValidEmail_whenSendingActivationEmail_theRequestShouldBeConfiguredCorrectly[jvm]
com.wire.kalium.api.v0.user.register.RegisterApiV0Test ‑ givenActivationCodeFail_thenErrorIsPropagated[jvm]
com.wire.kalium.api.v0.user.register.RegisterApiV0Test ‑ givenRegistrationFail_whenRegisteringAccountWithEMMail_thenErrorIsPropagated[jvm]
com.wire.kalium.api.v0.user.register.RegisterApiV0Test ‑ givenSendActivationCodeFail_thenErrorIsPropagated[jvm]
com.wire.kalium.cryptography.CryptoUtilsTest ‑ givenDummyText_whenEncryptedAndDecryptedWithAES256_returnsOriginalText[js, browser]
…
com.wire.kalium.logic.data.conversation.ConversationRepositoryTest ‑ givenAGroupConversationHasNotNewMessages_whenGettingConversationDetails_ThenReturnZeroUnreadMessageCount
com.wire.kalium.logic.feature.backup.RestoreBackupUseCaseTest ‑ givenACorrectlyEncryptedBackup_whenRestoringWithWrongPassword_thenTheRightErrorIsThrown
com.wire.kalium.logic.feature.backup.RestoreBackupUseCaseTest ‑ givenAnEncryptedBackupFileFromDifferentUserID_whenRestoring_thenTheRightErrorIsThrown
com.wire.kalium.logic.feature.call.CallManagerTest ‑ givenCallManager_whenCallingMessageIsReceived_then_wcall_recv_msg_IsCalled
com.wire.kalium.logic.feature.conversation.ObserveConversationInteractionAvailabilityUseCaseTest ‑ givenProteusConversationAndUserSupportsOnlyMLS_whenObserving_thenShouldReturnUnsupportedProtocol
com.wire.kalium.logic.feature.conversation.ObserveConversationListDetailsUseCaseTest ‑ null
com.wire.kalium.logic.feature.session.DeleteSessionUseCaseTest ‑ givenSuccess_WhenDeletingSessionLocally_thenSuccessAndResourcesAreFreed
com.wire.kalium.logic.sync.incremental.EventProcessingHistoryTest ‑ measureContainsTimeOverLargeAmountOfEvents
com.wire.kalium.persistence.dao.message.MessageDAOBenchmarkTest ‑ null
com.wire.kalium.persistence.kmmSettings.EncryptedSettingsBuilderTest ‑ givenShouldEncryptDataIsTrue_whenEncryptingData_thenShouldEncryptWithoutFailing

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar Apr 25 '25 09:04 github-actions[bot]

Datadog Report

Branch report: fix/recover-mls-group-after-pending-commit Commit report: 15436e4 Test service: kalium-jvm

:white_check_mark: 0 Failed, 3575 Passed, 109 Skipped, 45.96s Total Time

datadog-wireapp[bot] avatar Apr 25 '25 10:04 datadog-wireapp[bot]

🐰 Bencher Report

Branchfix/recover-mls-group-after-pending-commit
Testbedubuntu-latest

⚠️ WARNING: No Threshold found!

Without a Threshold, no Alerts will ever be generated.

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds flag.

Click to view all benchmark results
BenchmarkLatencymicroseconds (Β΅s)
com.wire.kalium.benchmarks.logic.CoreLogicBenchmark.createObjectInFilesπŸ“ˆ view plot
⚠️ NO THRESHOLD
696.77 Β΅s
com.wire.kalium.benchmarks.logic.CoreLogicBenchmark.createObjectInMemoryπŸ“ˆ view plot
⚠️ NO THRESHOLD
344,681.01 Β΅s
com.wire.kalium.benchmarks.persistence.MessagesNoPragmaTuneBenchmark.messageInsertionBenchmarkπŸ“ˆ view plot
⚠️ NO THRESHOLD
1,482,626.94 Β΅s
com.wire.kalium.benchmarks.persistence.MessagesNoPragmaTuneBenchmark.queryMessagesBenchmarkπŸ“ˆ view plot
⚠️ NO THRESHOLD
29,479.47 Β΅s
🐰 View full continuous benchmarking report in Bencher

github-actions[bot] avatar Apr 25 '25 10:04 github-actions[bot]

Codecov Report

Attention: Patch coverage is 69.09091% with 17 lines in your changes missing coverage. Please review.

Project coverage is 50.38%. Comparing base (1268590) to head (92599b2).

Files with missing lines Patch % Lines
...gic/data/conversation/MLSConversationRepository.kt 0.00% 5 Missing :warning:
...um/logic/feature/conversation/ConversationScope.kt 0.00% 4 Missing :warning:
...otlin/com/wire/kalium/logic/data/id/QualifiedId.kt 0.00% 3 Missing :warning:
...on/keyingmaterials/UpdateKeyingMaterialsUseCase.kt 92.85% 1 Missing and 1 partial :warning:
.../logic/data/conversation/ConversationRepository.kt 0.00% 1 Missing :warning:
...r/conversation/message/MLSMessageFailureHandler.kt 0.00% 0 Missing and 1 partial :warning:
...ersistence/dao/conversation/ConversationDAOImpl.kt 88.88% 0 Missing and 1 partial :warning:
Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #3428      +/-   ##
=============================================
+ Coverage      50.36%   50.38%   +0.01%     
  Complexity        27       27              
=============================================
  Files           1537     1539       +2     
  Lines          59780    59827      +47     
  Branches        5618     5621       +3     
=============================================
+ Hits           30110    30144      +34     
- Misses         27583    27595      +12     
- Partials        2087     2088       +1     
Files with missing lines Coverage Ξ”
...kotlin/com/wire/kalium/common/error/CoreFailure.kt 0.00% <ΓΈ> (ΓΈ)
...ersation/keyingmaterials/KeyingMaterialsManager.kt 100.00% <100.00%> (ΓΈ)
...um/persistence/dao/conversation/ConversationDAO.kt 100.00% <ΓΈ> (ΓΈ)
.../dao/conversation/ConversationIdWithGroupEntity.kt 100.00% <100.00%> (ΓΈ)
.../logic/data/conversation/ConversationRepository.kt 60.50% <0.00%> (-0.11%) :arrow_down:
...r/conversation/message/MLSMessageFailureHandler.kt 21.42% <0.00%> (-0.53%) :arrow_down:
...ersistence/dao/conversation/ConversationDAOImpl.kt 69.38% <88.88%> (+0.30%) :arrow_up:
...on/keyingmaterials/UpdateKeyingMaterialsUseCase.kt 93.75% <92.85%> (-6.25%) :arrow_down:
...otlin/com/wire/kalium/logic/data/id/QualifiedId.kt 0.00% <0.00%> (ΓΈ)
...um/logic/feature/conversation/ConversationScope.kt 0.00% <0.00%> (ΓΈ)
... and 1 more

... and 4 files with indirect coverage changes


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 1268590...92599b2. Read the comment docs.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov-commenter avatar Apr 25 '25 11:04 codecov-commenter

Closed because core crypto 6 will solve this issue

Garzas avatar May 13 '25 10:05 Garzas