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

Notify studio when recording completes #50

Merged
merged 13 commits into from
Sep 30, 2022

Conversation

AlexKordic
Copy link
Contributor

No description provided.

@AlexKordic AlexKordic marked this pull request as ready for review September 26, 2022 20:54
Copy link
Member

@victorges victorges left a comment

Choose a reason for hiding this comment

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

LGTM from studio side of things!

default:
// Not related to API logic
}
}

func (d *MistCallbackHandlersCollection) RecordingPushEnd(w http.ResponseWriter, req *http.Request, streamName, actualDestination, pushStatus string) {
var err error
pushSuccess := pushStatus == "null"
Copy link
Member

Choose a reason for hiding this comment

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

What is the expected behavior from Studio if this is false? Should it show an error to the user somehow or can it still recover the recording somehow?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fail in our first version. Improve by recovering in later tasks. Same applies for transcoding stages where some of them can fail independently. To be optimal we can just re-run failed stages. For now we re-run entire process.

if len(path) < 4 {
return "", fmt.Errorf("push url path malformed: element count %d %s", len(path), pushUrl.EscapedPath())
}
return path[len(path)-2], nil
Copy link
Member

Choose a reason for hiding this comment

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

Should we have a regex here instead? Perhaps validating some other parts of this URL as well. (I particularly don't remember what it is, from this. is it the s3+https:// uri?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question. We now have plans to expand on URL path prefix with region and bucket name later. I figured its safer to grab path element before filename which should stay in this format in near future.

@codecov
Copy link

codecov bot commented Sep 30, 2022

Codecov Report

Merging #50 (095b881) into main (e38280c) will increase coverage by 1.71031%.
The diff coverage is 62.96296%.

Impacted file tree graph

@@                 Coverage Diff                 @@
##                main         #50         +/-   ##
===================================================
+ Coverage   33.17121%   34.88152%   +1.71030%     
===================================================
  Files             17          17                 
  Lines           1028        1055         +27     
===================================================
+ Hits             341         368         +27     
+ Misses           646         642          -4     
- Partials          41          45          +4     
Impacted Files Coverage Δ
handlers/misttriggers/push_end.go 27.17391% <62.96296%> (+27.17390%) ⬆️
handlers/misttriggers/triggers.go 19.38776% <0.00000%> (+2.04082%) ⬆️

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 e38280c...095b881. Read the comment docs.

Impacted Files Coverage Δ
handlers/misttriggers/push_end.go 27.17391% <62.96296%> (+27.17390%) ⬆️
handlers/misttriggers/triggers.go 19.38776% <0.00000%> (+2.04082%) ⬆️

@AlexKordic AlexKordic changed the base branch from ak/uuid_generation to main September 30, 2022 06:23
@AlexKordic AlexKordic merged commit 775a810 into main Sep 30, 2022
@hjpotter92 hjpotter92 deleted the ak/recording_complete_trigger branch May 30, 2023 07:25
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