kalium
kalium copied to clipboard
fix: use server time for calling (WPB-10979)
|
|
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
No call notifications incoming if device time is not correct
Causes (Optional)
If device time is different from the server, AVS will return shouldRing flag as false causing the app to not show any incoming call notification
Solutions
On event processing we calculate time offset that will be used later to get server time
Edit:
I changed the logic so now we get serverTime by fetching /notifications api with only querySize value.
Dependencies (Optional)
If there are some other pull requests related to this one (e.g. new releases of frameworks), specify them here.
Needs releases with:
- [ ] GitHub link to other pull request
Testing
Test Coverage (Optional)
- [ ] I have added automated test to this contribution
How to Test
Briefly describe how this change was tested and if applicable the exact steps taken to verify that it works as expected.
Notes (Optional)
Specify here any other facts that you think are important for this issue.
Attachments (Optional)
Attachments like images, videos, etc. (drag and drop in the text box)
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
- 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.
Test Results
3 219 tests +3 3 113 :white_check_mark: +3 4m 41s :stopwatch: +50s 552 suites ±0 106 :zzz: ±0 552 files ±0 0 :x: ±0
Results for commit 261f579c. ± Comparison against base commit 75b92ab8.
:recycle: This comment has been updated with latest results.
Codecov Report
Attention: Patch coverage is 52.17391% with 11 lines in your changes missing coverage. Please review.
Project coverage is 52.43%. Comparing base (
75b92ab) to head (261f579). Report is 1 commits behind head on develop.
Additional details and impacted files
@@ Coverage Diff @@
## develop #3017 +/- ##
===========================================
- Coverage 52.52% 52.43% -0.10%
===========================================
Files 1305 1309 +4
Lines 50225 50337 +112
Branches 4680 4671 -9
===========================================
+ Hits 26383 26392 +9
- Misses 21956 22057 +101
- Partials 1886 1888 +2
| Files with missing lines | Coverage Δ | |
|---|---|---|
| ...n/kotlin/com/wire/kalium/logic/data/event/Event.kt | 78.17% <100.00%> (ø) |
|
| ...om/wire/kalium/logic/data/event/EventRepository.kt | 56.45% <100.00%> (+3.82%) |
:arrow_up: |
| ...ire/kalium/logic/sync/incremental/EventGatherer.kt | 80.00% <100.00%> (+1.51%) |
:arrow_up: |
| ...base/authenticated/notification/NotificationApi.kt | 20.00% <ø> (ø) |
|
| .../network/api/v3/authenticated/NotificationApiV3.kt | 83.33% <0.00%> (-8.34%) |
:arrow_down: |
| .../network/api/v0/authenticated/NotificationApiV0.kt | 49.23% <0.00%> (-3.16%) |
:arrow_down: |
| ...in/com/wire/kalium/logic/util/ServerTimeHandler.kt | 0.00% <0.00%> (ø) |
... and 21 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 75b92ab...261f579. Read the comment docs.
Datadog Report
Branch report: user-server-time-for-calling
Commit report: 5e441d4
Test service: kalium-jvm
:white_check_mark: 0 Failed, 3113 Passed, 106 Skipped, 20.43s Total Time
Bencher Report
| Branch | user-server-time-for-calling |
| Testbed | ubuntu-latest |
⚠️ WARNING: The following Measure does not have a Threshold. 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-thresholdsCLI flag.
Click to view all benchmark results
| Benchmark | Latency | nanoseconds (ns) |
|---|---|---|
| com.wire.kalium.benchmarks.logic.CoreLogicBenchmark.createObjectInFiles | 📈 view plot ⚠️ NO THRESHOLD | 688,070.34 |
| com.wire.kalium.benchmarks.logic.CoreLogicBenchmark.createObjectInMemory | 📈 view plot ⚠️ NO THRESHOLD | 340,774,610.96 |
| com.wire.kalium.benchmarks.persistence.MessagesNoPragmaTuneBenchmark.messageInsertionBenchmark | 📈 view plot ⚠️ NO THRESHOLD | 926,401,902.19 |
| com.wire.kalium.benchmarks.persistence.MessagesNoPragmaTuneBenchmark.queryMessagesBenchmark | 📈 view plot ⚠️ NO THRESHOLD | 21,503,906.92 |
@ohassine can you please fix the conflicts
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