Skip to content

feat: implement backup utilities using zlib for file compression and extraction [WPB-25708]#4120

Merged
MohamadJaara merged 7 commits into
developfrom
mo/feat/implement-backup-utils-using-zlib
May 18, 2026
Merged

feat: implement backup utilities using zlib for file compression and extraction [WPB-25708]#4120
MohamadJaara merged 7 commits into
developfrom
mo/feat/implement-backup-utils-using-zlib

Conversation

@MohamadJaara
Copy link
Copy Markdown
Member

@MohamadJaara MohamadJaara commented May 8, 2026

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

What's new in this PR?

Issues

iOS backup restore could not handle the new multiplatform backup compression path.

Solutions

Implemented Apple shared ZIP compression/decompression for new multiplatform backups using zlib, covering iOS and macOS.

Added a real Apple integration test that creates an encrypted MP backup, verifies wrong password rejection, and restores it using real compression/decompression.

Testing

Test Coverage

  • I have added automated test to this contribution

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

Test Results

0 tests   - 4 907   0 ✅  - 4 792   0s ⏱️ - 2m 55s
0 suites  -   805   0 💤  -   115 
0 files    -   805   0 ❌ ±    0 

Results for commit 23d1351. ± Comparison against base commit 9eca021.

♻️ This comment has been updated with latest results.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.56%. Comparing base (9eca021) to head (23d1351).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #4120   +/-   ##
==========================================
  Coverage      61.55%   61.56%           
- Complexity      4021     4022    +1     
==========================================
  Files           2067     2068    +1     
  Lines          67423    67436   +13     
  Branches        6650     6651    +1     
==========================================
+ Hits           41500    41514   +14     
- Misses         23276    23277    +1     
+ Partials        2647     2645    -2     

see 5 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 9eca021...23d1351. 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

github-actions Bot commented May 8, 2026

🐰 Bencher Report

Branchmo/feat/implement-backup-utils-using-zlib
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
893.16 µs
com.wire.kalium.benchmarks.logic.CoreLogicBenchmark.createObjectInMemory📈 view plot
⚠️ NO THRESHOLD
477,419.73 µs
com.wire.kalium.benchmarks.persistence.MessageReadBenchmark.inboxPagingDeepPageBenchmark📈 view plot
⚠️ NO THRESHOLD
127,879.12 µs
com.wire.kalium.benchmarks.persistence.MessageReadBenchmark.inboxPagingFirstPageBenchmark📈 view plot
⚠️ NO THRESHOLD
121,968.77 µs
com.wire.kalium.benchmarks.persistence.MessageReadBenchmark.localMarkAsReadBenchmark📈 view plot
⚠️ NO THRESHOLD
3,175.65 µs
com.wire.kalium.benchmarks.persistence.MessageReadBenchmark.messagePagingDeepPageBenchmark📈 view plot
⚠️ NO THRESHOLD
27,101.76 µs
com.wire.kalium.benchmarks.persistence.MessageReadBenchmark.messagePagingFirstPageBenchmark📈 view plot
⚠️ NO THRESHOLD
11,156.48 µs
com.wire.kalium.benchmarks.persistence.MessagesNoPragmaTuneBenchmark.messageInsertionBenchmark📈 view plot
⚠️ NO THRESHOLD
1,226,739.87 µs
com.wire.kalium.benchmarks.persistence.MessagesNoPragmaTuneBenchmark.queryMessagesBenchmark📈 view plot
⚠️ NO THRESHOLD
20,077.84 µs
🐰 View full continuous benchmarking report in Bencher

Copy link
Copy Markdown
Contributor

@yamilmedina yamilmedina left a comment

Choose a reason for hiding this comment

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

Nice one ! remember to create a separate backup release/tag when merged, so new artifacts get deployed 🚀

@MohamadJaara
Copy link
Copy Markdown
Member Author

Nice one ! remember to create a separate backup release/tag when merged, so new artifacts get deployed 🚀

this is part of logic not the current backup module, right now each platform is doing its own thing when it comes to encryption and compression but with this change logic backups should work now on iOS

Comment thread logic/src/appleMain/kotlin/com/wire/kalium/logic/util/BackupUtils.kt Outdated
@MohamadJaara MohamadJaara marked this pull request as draft May 12, 2026 07:59
@MohamadJaara MohamadJaara marked this pull request as ready for review May 13, 2026 11:13
@sonarqubecloud
Copy link
Copy Markdown

@MohamadJaara MohamadJaara enabled auto-merge May 13, 2026 12:32
@MohamadJaara MohamadJaara disabled auto-merge May 13, 2026 12:32
@MohamadJaara MohamadJaara changed the title feat: implement backup utilities using zlib for file compression and extraction feat: implement backup utilities using zlib for file compression and extraction [WPB-25708] May 18, 2026
@MohamadJaara MohamadJaara added this pull request to the merge queue May 18, 2026
Merged via the queue into develop with commit e05c64a May 18, 2026
28 of 29 checks passed
@MohamadJaara MohamadJaara deleted the mo/feat/implement-backup-utils-using-zlib branch May 18, 2026 08:38
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.

5 participants