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

feat: create observer for legal hold request (WPB-5442) #2243

Merged
merged 15 commits into from
Nov 23, 2023

Conversation

ohassine
Copy link
Member

@ohassine ohassine commented Nov 21, 2023


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?

Description

In this PR, I created an observer that will observe legal hold request that is stored locally.
It will return LegalHoldRequestAvailable with the fingerprint if there is a request , NoLegalHoldRequest in case no request is pending and failure in case of something went wrong

Note:

This PR includes changes from #2236, please review it before this one

Needs releases with:

  • GitHub link to other pull request

PR Post Submission Checklist for internal contributors (Optional)

  • Wire's Github Workflow has automatically linked the PR to a JIRA issue

PR Post Merge Checklist for internal contributors

  • If any soft of configuration variable was introduced by this PR, it has been added to the relevant documents and the CI jobs have been updated.

References
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.

Copy link
Contributor

github-actions bot commented Nov 21, 2023

Unit Test Results

   399 files   -   76     399 suites   - 76   22s ⏱️ - 2m 6s
2 328 tests  - 321  2 237 ✔️  - 308  91 💤  - 13  0 ±0 

Results for commit 7651d7b. ± Comparison against base commit 802a22e.

♻️ This comment has been updated with latest results.

@datadog-wireapp
Copy link

datadog-wireapp bot commented Nov 21, 2023

Datadog Report

All test runs 14e0c90 🔗

2 Total Test Services: 0 Failed, 0 with New Flaky, 2 Passed

Test Services
Service Name Failed Known Flaky New Flaky Passed Skipped Wall Time Branch View
kalium-ios 0 0 0 2237 91 7m 18.1s Link
kalium-jvm 0 0 0 2549 104 7m 15.05s Link

…_request

# Conflicts:
#	logic/src/commonMain/kotlin/com/wire/kalium/logic/configuration/UserConfigRepository.kt
#	logic/src/commonMain/kotlin/com/wire/kalium/logic/data/legalhold/LastPreKey.kt
#	logic/src/commonMain/kotlin/com/wire/kalium/logic/sync/receiver/handler/legalhold/LegalHoldRequestHandler.kt
#	persistence/src/commonMain/kotlin/com/wire/kalium/persistence/dao/unread/UserConfigDAO.kt
@ohassine ohassine requested review from a team, typfel, alexandreferris, mchenani, Garzas and saleniuk and removed request for a team November 22, 2023 15:35
Copy link
Contributor

@Garzas Garzas left a comment

Choose a reason for hiding this comment

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

Looking good 🚀 Just small comment about logger

@codecov-commenter
Copy link

Codecov Report

Merging #2243 (7651d7b) into develop (802a22e) will decrease coverage by 0.02%.
The diff coverage is 34.21%.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #2243      +/-   ##
=============================================
- Coverage      57.94%   57.93%   -0.02%     
  Complexity        21       21              
=============================================
  Files           1082     1084       +2     
  Lines          41053    41084      +31     
  Branches        3798     3801       +3     
=============================================
+ Hits           23789    23801      +12     
- Misses         15640    15659      +19     
  Partials        1624     1624              
Files Coverage Δ
...tlin/com/wire/kalium/cryptography/ProteusClient.kt 87.50% <ø> (ø)
...com/wire/kalium/logic/data/legalhold/LastPreKey.kt 100.00% <100.00%> (ø)
...re/kalium/logic/data/legalhold/LegalHoldRequest.kt 100.00% <100.00%> (ø)
...com/wire/kalium/persistence/dao/MetadataDAOImpl.kt 73.68% <ø> (ø)
...ire/kalium/persistence/dao/unread/UserConfigDAO.kt 26.66% <0.00%> (ø)
...kalium/cryptography/ProteusClientCoreCryptoImpl.kt 47.05% <0.00%> (-1.73%) ⬇️
.../wire/kalium/logic/data/prekey/PreKeyRepository.kt 65.06% <16.66%> (-4.18%) ⬇️
...logic/feature/legalhold/LegalHoldRequestUseCase.kt 61.53% <61.53%> (ø)
...kalium/logic/configuration/UserConfigRepository.kt 48.64% <0.00%> (-2.42%) ⬇️

... and 1 file 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 802a22e...7651d7b. Read the comment docs.

@ohassine ohassine requested a review from saleniuk November 23, 2023 12:32
@saleniuk saleniuk added this pull request to the merge queue Nov 23, 2023
Merged via the queue into develop with commit 23be862 Nov 23, 2023
17 checks passed
@saleniuk saleniuk deleted the observe_legal_hold_request branch November 23, 2023 16:08
augustocdias pushed a commit that referenced this pull request Dec 5, 2023
* feat: handle legal hold events

* chore: address comments

* chore: detekt

* chore: detekt

* feat: create use case to observe legal hold request

* chore: detekt

* chore: detekt

* chore: cleanup

* chore: address comments

* chore: use case documentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants