Skip to content

fix: change order of inserting data when creating non-incoming call [WPB-24829]#4132

Merged
saleniuk merged 1 commit into
developfrom
fix/call-data-insertion-order
May 13, 2026
Merged

fix: change order of inserting data when creating non-incoming call [WPB-24829]#4132
saleniuk merged 1 commit into
developfrom
fix/call-data-insertion-order

Conversation

@saleniuk
Copy link
Copy Markdown
Contributor

@saleniuk saleniuk commented May 12, 2026

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


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?

Issues

Sometimes starting a foreground CallService for the outgoing call fails with: java.lang.IllegalArgumentException: person must have a non-empty a name.

Causes (Optional)

The app cannot create a valid outgoing call notification - CallStyle requires the Person data and the name cannot be empty.
The order of actions when creating a call in some cases is such that the call is inserted into database first and only then the metadata is stored, and the app takes the info from the database to start the service, so it's possible to start a foreground CallService and try to create outgoing call even before the metadata is saved.

Solutions

Change the order for all created calls so that it first saves metadata and only then inserts into a database, so that when fetching calls from database, the metadata is already available.
For new incoming calls the order is already correct, so the change was required for others.


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.

@sonarqubecloud
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 12, 2026

Test Results

0 tests   - 4 890   0 ✅  - 4 775   0s ⏱️ - 2m 44s
0 suites  -   803   0 💤  -   115 
0 files    -   803   0 ❌ ±    0 

Results for commit 3c6b67b. ± Comparison against base commit de33718.

♻️ This comment has been updated with latest results.

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.60%. Comparing base (de33718) to head (3c6b67b).

Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #4132   +/-   ##
==========================================
  Coverage      61.60%   61.60%           
  Complexity      4023     4023           
==========================================
  Files           2057     2057           
  Lines          67321    67321           
  Branches        6635     6635           
==========================================
+ Hits           41475    41476    +1     
  Misses         23202    23202           
+ Partials        2644     2643    -1     
Files with missing lines Coverage Δ
.../com/wire/kalium/logic/data/call/CallRepository.kt 89.38% <100.00%> (ø)

... 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 de33718...3c6b67b. Read the comment docs.

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

@github-actions
Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchfix/call-data-insertion-order
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
700.66 µs
com.wire.kalium.benchmarks.logic.CoreLogicBenchmark.createObjectInMemory📈 view plot
⚠️ NO THRESHOLD
569,637.02 µs
com.wire.kalium.benchmarks.persistence.MessageReadBenchmark.inboxPagingDeepPageBenchmark📈 view plot
⚠️ NO THRESHOLD
105,751.59 µs
com.wire.kalium.benchmarks.persistence.MessageReadBenchmark.inboxPagingFirstPageBenchmark📈 view plot
⚠️ NO THRESHOLD
101,239.63 µs
com.wire.kalium.benchmarks.persistence.MessageReadBenchmark.localMarkAsReadBenchmark📈 view plot
⚠️ NO THRESHOLD
3,555.61 µs
com.wire.kalium.benchmarks.persistence.MessageReadBenchmark.messagePagingDeepPageBenchmark📈 view plot
⚠️ NO THRESHOLD
23,970.18 µs
com.wire.kalium.benchmarks.persistence.MessageReadBenchmark.messagePagingFirstPageBenchmark📈 view plot
⚠️ NO THRESHOLD
11,134.28 µs
com.wire.kalium.benchmarks.persistence.MessagesNoPragmaTuneBenchmark.messageInsertionBenchmark📈 view plot
⚠️ NO THRESHOLD
1,243,223.68 µs
com.wire.kalium.benchmarks.persistence.MessagesNoPragmaTuneBenchmark.queryMessagesBenchmark📈 view plot
⚠️ NO THRESHOLD
23,942.13 µs
🐰 View full continuous benchmarking report in Bencher

@saleniuk saleniuk added this pull request to the merge queue May 13, 2026
Merged via the queue into develop with commit fc73ecd May 13, 2026
27 of 28 checks passed
@saleniuk saleniuk deleted the fix/call-data-insertion-order branch May 13, 2026 07:46
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