Skip to content

Conversation

sgfn
Copy link
Member

@sgfn sgfn commented Feb 12, 2025

UPDATE

This PR has been closed in favour of #199 and elixir-webrtc/ex_webrtc_recorder#1

Copy link

codecov bot commented Feb 18, 2025

Codecov Report

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

Project coverage is 80.04%. Comparing base (7f1a127) to head (feb38bc).

Files with missing lines Patch % Lines
lib/ex_webrtc/recorder/converter.ex 0.00% 86 Missing ⚠️
lib/ex_webrtc/recorder.ex 0.00% 51 Missing ⚠️
lib/ex_webrtc/recorder/s3/upload_handler.ex 0.00% 31 Missing ⚠️
lib/ex_webrtc/recorder/converter/ffmpeg.ex 0.00% 17 Missing ⚠️
lib/ex_webrtc/recorder/s3/utils.ex 0.00% 12 Missing ⚠️
lib/ex_webrtc/recorder/manifest.ex 0.00% 9 Missing ⚠️
lib/ex_webrtc/recorder/converter/manifest.ex 0.00% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #197      +/-   ##
==========================================
- Coverage   84.78%   80.04%   -4.75%     
==========================================
  Files          51       56       +5     
  Lines        2629     2791     +162     
==========================================
+ Hits         2229     2234       +5     
- Misses        400      557     +157     
Files with missing lines Coverage Δ
lib/ex_webrtc/recorder/converter/manifest.ex 0.00% <0.00%> (ø)
lib/ex_webrtc/recorder/manifest.ex 0.00% <0.00%> (ø)
lib/ex_webrtc/recorder/s3/utils.ex 0.00% <0.00%> (ø)
lib/ex_webrtc/recorder/converter/ffmpeg.ex 0.00% <0.00%> (ø)
lib/ex_webrtc/recorder/s3/upload_handler.ex 0.00% <0.00%> (ø)
lib/ex_webrtc/recorder.ex 0.00% <0.00%> (ø)
lib/ex_webrtc/recorder/converter.ex 0.00% <0.00%> (ø)

... and 2 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 7f1a127...feb38bc. Read the comment docs.

@sgfn sgfn changed the title Recorder enhancements Recorder+Converter enhancements Feb 18, 2025
@sgfn sgfn requested a review from mickel8 February 18, 2025 17:30
@sgfn sgfn marked this pull request as ready for review February 18, 2025 17:30
Copy link
Contributor

@mickel8 mickel8 left a comment

Choose a reason for hiding this comment

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

Great job! 🎉

I didn't expect this code to expand so much 👀

One thing that comes to my mind is that we should move this to a separate package. Mostly because it brings a lot of optional dependencies and the logic (uploading, downloading to/from S3) is not strictly related to WebRTC. Initially, I thought this will be a small addition but it turned out to be pretty advanced.

Also, I believe this will help us make better API, a new package can have its own supervision tree where uploader tasks will be spawned, and will not affect casual webrtc development (tests duration, compilation time, etc.)

WDYT?

report_path =
report_path
@spec convert_path!(Path.t(), options()) :: __MODULE__.Manifest.t() | no_return()
def convert_path!(recorder_manifest_path, options \\ []) do
Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick: I would call this convert and use pattern matching to see whether we got path or manifest as an argument

end)

# FIXME: this links, ideally we should spawn a supervised task instead
task = Task.async(fn -> upload(manifest, bucket_name, s3_paths, s3_config_overrides) end)
Copy link
Contributor

Choose a reason for hiding this comment

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

You can use application supervision tree

@sgfn
Copy link
Member Author

sgfn commented Feb 19, 2025

@mickel8 I agree about the separation

Closing this in favour of #199 and elixir-webrtc/ex_webrtc_recorder#1

@sgfn sgfn closed this Feb 19, 2025
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