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

Move from using PUSH_END to signal to end of the segmenting flow to using RECORDING_END #78

Merged
merged 3 commits into from
Oct 26, 2022

Conversation

thomshutt
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Oct 20, 2022

Codecov Report

Merging #78 (202b1ab) into main (4f76d83) will decrease coverage by 0.44407%.
The diff coverage is 0.00000%.

Impacted file tree graph

@@                 Coverage Diff                 @@
##                main         #78         +/-   ##
===================================================
- Coverage   39.36430%   38.92023%   -0.44407%     
===================================================
  Files             18          18                 
  Lines           1227        1241         +14     
===================================================
  Hits             483         483                 
- Misses           688         702         +14     
  Partials          56          56                 
Impacted Files Coverage Δ
handlers/misttriggers/push_end.go 40.54054% <0.00000%> (+8.62565%) ⬆️
handlers/misttriggers/recording_end.go 27.27273% <0.00000%> (-21.81818%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a81d5c5...202b1ab. Read the comment docs.

Impacted Files Coverage Δ
handlers/misttriggers/push_end.go 40.54054% <0.00000%> (+8.62565%) ⬆️
handlers/misttriggers/recording_end.go 27.27273% <0.00000%> (-21.81818%) ⬇️

thomshutt and others added 2 commits October 20, 2022 14:43
The segmented video's duration should closely match the input video's
duration. If it's within a tolerable range, then transcode can be kicked
off. Otherwise, the VOD flow should bail.
if math.Abs(float64(inputVideoLengthMillis-p.StreamMediaDurationMillis)) > 500 {
_ = config.Logger.Log("msg", "Input video duration does not match segmented video duration",
"input video duration (ms):", inputVideoLengthMillis, "segmented video duration (ms):", p.StreamMediaDurationMillis)
return
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm thinking we should have a callback to Studio here to indicate the segmented file's duration doesn't match the input file's duration. Currently arbitrarily set a 500ms delta as "acceptable". wdyt @victorges @thomshutt?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, we definitely need an error callback anywhere we're returning early. Delta sounds good, could maybe even be more lenient to begin with

Copy link
Member

Choose a reason for hiding this comment

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

Agreed, if this is a terminal error there must be an error callback. Might even be an unretriable one? Or is this a transient error?

The contract is that the upload process will always end with a callback. It can't just disappear unless something unexpected happens with the service like the machine or pod shutting down (then it's the regular "task lost" which we'll retry).

Copy link
Collaborator

Choose a reason for hiding this comment

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

OK, will follow up in #82 to address these integration points.

@emranemran
Copy link
Collaborator

Tested this PR locally and worked as expected - need to sanity check on canary prior to merging.

@emranemran
Copy link
Collaborator

Holding off on merging this until we settle on the issue with the small manifests issue

@emranemran emranemran merged commit 09d35c6 into main Oct 26, 2022
@emranemran emranemran deleted the transcode-end branch October 26, 2022 04:45
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.

3 participants