Skip to content

feat: add shared KMP S3 client for Cells transfers [WPB-26729]#4262

Open
MohamadJaara wants to merge 5 commits into
developfrom
mo/cells-s3-kmp-client
Open

feat: add shared KMP S3 client for Cells transfers [WPB-26729]#4262
MohamadJaara wants to merge 5 commits into
developfrom
mo/cells-s3-kmp-client

Conversation

@MohamadJaara

@MohamadJaara MohamadJaara commented Jul 1, 2026

Copy link
Copy Markdown
Member

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

Adds a shared internal S3-compatible client for Cells object transfers and uses it across Apple, JVM, and Android.

Changes

  • Add internal KMP S3-compatible client for Cells transfers
    • object download
    • regular upload
    • multipart upload
    • complete multipart upload
    • pre-signed GET URLs
  • Add SigV4 signing, S3 URL canonicalization, and Ktor/Okio streaming helpers
  • Replace Apple no-op Cells upload/download/pre-sign implementations with real behavior
  • Wire JVM/Android to the same shared CellsS3Client
  • Remove the old JVM/Android AWS SDK S3 dependency and AWS-specific helper classes
  • Add focused tests for SigV4 signing, URL construction, upload request signing, and pre-signed URLs

Notes

The implementation keeps S3-specific behavior internal to :domain:cells behind CellsAwsClient. It avoids pulling in the AWS Swift SDK and removes the previous JVM/Android AWS SDK path, so all supported targets now exercise the same limited S3-compatible implementation.

@MohamadJaara MohamadJaara changed the title feat: add shared KMP S3 client for Cells transfers feat: add shared KMP S3 client for Cells transfers [WPB-26729] Jul 1, 2026
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Test Results

0 tests   - 5 853   0 ✅  - 5 710   0s ⏱️ - 4m 29s
0 suites  -   885   0 💤  -   143 
0 files    -   885   0 ❌ ±    0 

Results for commit 4490c37. ± Comparison against base commit 5a1da91.

♻️ This comment has been updated with latest results.

@codecov-commenter

codecov-commenter commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.55046% with 63 lines in your changes missing coverage. Please review.
✅ Project coverage is 61.55%. Comparing base (5a1da91) to head (4490c37).

Files with missing lines Patch % Lines
...kotlin/com/wire/kalium/cells/data/CellsS3Client.kt 89.92% 17 Missing and 11 partials ⚠️
...in/com/wire/kalium/cells/data/CellsAwsClientJvm.kt 0.00% 14 Missing ⚠️
...otlin/com/wire/kalium/cells/data/AwsSigV4Signer.kt 90.90% 7 Missing ⚠️
.../kotlin/com/wire/kalium/cells/data/KtorOkioCopy.kt 71.42% 5 Missing and 1 partial ⚠️
...tlin/com/wire/kalium/cells/data/S3UploadChannel.kt 44.44% 5 Missing ⚠️
.../kotlin/com/wire/kalium/cells/data/S3UrlBuilder.kt 91.89% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #4262      +/-   ##
=============================================
+ Coverage      61.24%   61.55%   +0.31%     
- Complexity      4012     4046      +34     
=============================================
  Files           2161     2163       +2     
  Lines          69390    69675     +285     
  Branches        6886     6907      +21     
=============================================
+ Hits           42498    42891     +393     
+ Misses         24129    24007     -122     
- Partials        2763     2777      +14     
Files with missing lines Coverage Δ
.../kotlin/com/wire/kalium/cells/data/S3UrlBuilder.kt 91.89% <91.89%> (ø)
...tlin/com/wire/kalium/cells/data/S3UploadChannel.kt 44.44% <44.44%> (ø)
.../kotlin/com/wire/kalium/cells/data/KtorOkioCopy.kt 71.42% <71.42%> (ø)
...otlin/com/wire/kalium/cells/data/AwsSigV4Signer.kt 90.90% <90.90%> (ø)
...in/com/wire/kalium/cells/data/CellsAwsClientJvm.kt 0.00% <0.00%> (ø)
...kotlin/com/wire/kalium/cells/data/CellsS3Client.kt 89.92% <89.92%> (ø)

... and 2 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5a1da91...4490c37. 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

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branch${GITHUB_HEAD_REF}
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
889.49 µs
com.wire.kalium.benchmarks.logic.CoreLogicBenchmark.createObjectInMemory📈 view plot
⚠️ NO THRESHOLD
328,241.24 µs
com.wire.kalium.benchmarks.persistence.MessageReadBenchmark.inboxPagingDeepPageBenchmark📈 view plot
⚠️ NO THRESHOLD
133,047.87 µs
com.wire.kalium.benchmarks.persistence.MessageReadBenchmark.inboxPagingFirstPageBenchmark📈 view plot
⚠️ NO THRESHOLD
127,569.05 µs
com.wire.kalium.benchmarks.persistence.MessageReadBenchmark.localMarkAsReadBenchmark📈 view plot
⚠️ NO THRESHOLD
3,687.17 µs
com.wire.kalium.benchmarks.persistence.MessageReadBenchmark.messagePagingDeepPageBenchmark📈 view plot
⚠️ NO THRESHOLD
36,936.52 µs
com.wire.kalium.benchmarks.persistence.MessageReadBenchmark.messagePagingFirstPageBenchmark📈 view plot
⚠️ NO THRESHOLD
21,821.00 µs
com.wire.kalium.benchmarks.persistence.MessagesNoPragmaTuneBenchmark.messageInsertionBenchmark📈 view plot
⚠️ NO THRESHOLD
1,254,594.19 µs
com.wire.kalium.benchmarks.persistence.MessagesNoPragmaTuneBenchmark.queryMessagesBenchmark📈 view plot
⚠️ NO THRESHOLD
20,156.12 µs
🐰 View full continuous benchmarking report in Bencher

@MohamadJaara MohamadJaara requested review from Garzas and ohassine July 8, 2026 20:15
@MohamadJaara

Copy link
Copy Markdown
Member Author

@claude review

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

🤖 Beep boop! Claude is putting on their reading glasses and diving into your code...

⏳ This comment will be updated with the review results once I'm done pondering the mysteries of your implementation.

In the meantime, feel free to grab a coffee ☕ - reviewing code is serious business!

@MohamadJaara MohamadJaara force-pushed the mo/cells-s3-kmp-client branch from d3ba11b to b1f0eec Compare July 10, 2026 08:59
@MohamadJaara MohamadJaara force-pushed the mo/cells-s3-kmp-client branch from d2c587d to 4490c37 Compare July 10, 2026 10:23
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants