kalium
kalium copied to clipboard
fix: keep and fetch MLS public keys every 24h [WPB-17161]
|
|
PR Submission Checklist for internal contributors
-
The PR Title
- [x] conforms to the style of semantic commits messagesΒΉ supported in Wire's Github WorkflowΒ²
- [x] contains a reference JIRA issue number like
SQPIT-764 - [x] answers the question: If merged, this PR will: ... Β³
-
The PR Description
- [x] is free of optional paragraphs and you have filled the relevant parts to the best of your ability
What's new in this PR?
Issues
Currently we do not keep the MLS public keys, they are being fetched every time. MLS public keys should be treated the same way as feature-config and api-version, so should be fetched once every 24h and when the app is put into foreground (cannot be done in kalium itself, but the worker is provided to do it on the specific platform).
Solutions
Keep MLS public keys in-memory. Create a worker to fetch them once every 24h. Update repository to be thread safe and try to fetch keys when cannot be found for the given cipherSuite.
Testing
Test Coverage (Optional)
- [x] I have added automated test to this contribution
PR Post Submission Checklist for internal contributors (Optional)
- [x] 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
- https://sparkbox.com/foundry/semantic_commit_messages
- https://github.com/wireapp/.github#usage
- E.g.
feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
Test Results
0 testsβ β-β3β797βββ0 β β-β3β688βββ0s β±οΈ - 6m 6s 0 suites β-βββ652βββ0 π€ β-βββ109β 0 filesββ β-βββ652βββ0 β Β±ββββ0β
Results for commit 145975e2.βΒ± Comparison against base commit 180ae266.
:recycle: This comment has been updated with latest results.
Codecov Report
Attention: Patch coverage is 80.72289% with 16 lines in your changes missing coverage. Please review.
Project coverage is 50.07%. Comparing base (
180ae26) to head (145975e). Report is 18 commits behind head on develop.
Additional details and impacted files
@@ Coverage Diff @@
## develop #3414 +/- ##
=============================================
+ Coverage 50.02% 50.07% +0.05%
Complexity 41 41
=============================================
Files 1623 1624 +1
Lines 62477 62548 +71
Branches 5524 5528 +4
=============================================
+ Hits 31255 31322 +67
Misses 29084 29084
- Partials 2138 2142 +4
| Files with missing lines | Coverage Ξ | |
|---|---|---|
| ...um/logic/data/mlspublickeys/MLSPublicKeysMapper.kt | 12.50% <ΓΈ> (ΓΈ) |
|
| ...in/com/wire/kalium/logic/feature/user/UserScope.kt | 0.00% <0.00%> (ΓΈ) |
|
| ...alium/logic/feature/mls/MLSPublicKeysSyncWorker.kt | 90.47% <90.47%> (ΓΈ) |
|
| ...ogic/data/mlspublickeys/MLSPublicKeysRepository.kt | 73.91% <72.50%> (+51.69%) |
:arrow_up: |
... and 3 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 dataPowered by Codecov. Last update 180ae26...145975e. 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.
Datadog Report
Branch report: fix/keep-and-fetch-mls-public-keys-every-24h
Commit report: facd766
Test service: kalium-jvm
:white_check_mark: 0 Failed, 3704 Passed, 109 Skipped, 52.89s Total Time
This PR is stale because it has been open 30 days with no activity. Please update it or close it in case is not relevant anymore.
Bencher Report
| Branch | fix/keep-and-fetch-mls-public-keys-every-24h |
| Testbed | ubuntu-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-thresholdsflag.
Click to view all benchmark results
| Benchmark | Latency | microseconds (Β΅s) |
|---|---|---|
| com.wire.kalium.benchmarks.logic.CoreLogicBenchmark.createObjectInFiles | π view plot β οΈ NO THRESHOLD | 680.58 Β΅s |
| com.wire.kalium.benchmarks.logic.CoreLogicBenchmark.createObjectInMemory | π view plot β οΈ NO THRESHOLD | 403,680.83 Β΅s |
| com.wire.kalium.benchmarks.persistence.MessagesNoPragmaTuneBenchmark.messageInsertionBenchmark | π view plot β οΈ NO THRESHOLD | 1,475,762.41 Β΅s |
| com.wire.kalium.benchmarks.persistence.MessagesNoPragmaTuneBenchmark.queryMessagesBenchmark | π view plot β οΈ NO THRESHOLD | 28,266.21 Β΅s |
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code