Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wrong durations for uploaded media #3245

Merged
merged 1 commit into from
Sep 10, 2024

Conversation

stefanceriu
Copy link
Member

@stefanceriu stefanceriu commented Sep 10, 2024

At some point Uniffi introduced automatic conversions from Rust's Duration to TimeIntervals but the original implementation for media uploading was using milliseconds. When the conversion happened there were no breaking changes and iOS kept sending millis instead of seconds, resulting in very wrong values.

Android seems fine as it's using java.time.Duration

@stefanceriu stefanceriu added the pr-bugfix for bug fix label Sep 10, 2024
@stefanceriu stefanceriu requested a review from a team as a code owner September 10, 2024 07:15
@stefanceriu stefanceriu requested review from pixlwave and removed request for a team September 10, 2024 07:15
Copy link

github-actions bot commented Sep 10, 2024

Warnings
⚠️ Some of the commits are missing ticket numbers. Please consider squashing all commits that don't have a tracking number.

Generated by 🚫 Danger Swift against 29355a0

At some point Uniffi introduced [automatic conversions](https://github.com/mozilla/uniffi-rs/blob/35140607dce7092f04d619a5d0b07f9ffe98b4ff/uniffi_bindgen/src/bindings/swift/templates/DurationHelper.swift#L19) from Rust's `Duration` to `TimeInterval`s but the original implementation for media uploading was using milliseconds. When the conversion happened there were no breaking changes and iOS kept sending millis instead of seconds, resulting in **very** wrong values.
@stefanceriu stefanceriu force-pushed the stefan/mediaUploadDurations branch from 958273d to 29355a0 Compare September 10, 2024 07:17
Copy link

Copy link

codecov bot commented Sep 10, 2024

Codecov Report

Attention: Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.

Project coverage is 43.87%. Comparing base (1a3378f) to head (29355a0).
Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
...ests/Sources/MediaUploadingPreprocessorTests.swift 0.00% 3 Missing ⚠️
...es/Services/Media/MediaUploadingPreprocessor.swift 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3245      +/-   ##
===========================================
- Coverage    43.87%   43.87%   -0.01%     
===========================================
  Files          723      723              
  Lines        59406    59406              
===========================================
- Hits         26063    26062       -1     
- Misses       33343    33344       +1     
Flag Coverage Δ
unittests 36.34% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@pixlwave pixlwave left a comment

Choose a reason for hiding this comment

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

Good spot!

@stefanceriu stefanceriu merged commit c2b9a7f into develop Sep 10, 2024
11 checks passed
@stefanceriu stefanceriu deleted the stefan/mediaUploadDurations branch September 10, 2024 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-bugfix for bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants