-
Notifications
You must be signed in to change notification settings - Fork 167
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
server: fix OT error handling #1864
server: fix OT error handling #1864
Conversation
763316d
to
aa99632
Compare
I like the solution, it clearly returns the error that should be returned. Let's also make sure the header is always a sane value. Currently when we encounter a transcoding error from the T Line 149 in 48409df
We will not set the "Pixels" header Line 190 in 48409df
We should always be setting the "Pixels" header, even if If this header is not set we will run into an error converting the string to an integer. At L190 in ot_rpc.go let's make this change pixels := int64(0)
if tData != nil {
pixels = tData.Pixels
}
req.Header.Set("Pixels", strconv.FormatInt(pixels, 10)) I'm also wondering if we can add unit tests for this, we can create erroneous responses like this:
See Line 156 in 48409df
|
Nevermind on the unit tests, this unit tests should already take care of those cases: go-livepeer/server/ot_rpc_test.go Line 178 in 48212dd
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
@yondonfu any remarks ? We have tested this both seperately and came to the same conclusions.
No source:
E0504 11:50:45.678492 78423 orchestrator.go:553] Error transcoding manifestID=test sessionID=53e9ccc9 segNo=1 segName=https://127.0.0.1:8935/stream/53e9ccc9/1.tempfile - TranscoderInvalidVideo
No keyframe
E0504 11:48:54.873341 78423 orchestrator.go:553] Error transcoding manifestID=test sessionID=0e05dfc6 segNo=1 segName=https://127.0.0.1:8935/stream/0e05dfc6/1.tempfile - No keyframes in input
I know we didn't touch this in this PR but https://github.com/livepeer/go-livepeer/blob/master/core/orchestrator.go#L553 This log statement still uses a dash to seperate the error from the rest of the message. We currently use label=.. do you think we can change the end of this statement to |
Yea, sure. Done. |
Looks good to me, let's rebase (squash the fixup) |
085ff8e
to
77a9bf0
Compare
Looks good to me, but I'm still looking into enabling CI runs for PRs based off of forks (thought I got it working, but looks like some additional tweaks are needed). Will approve & merge once we get CI running & passing. |
Ahh, seems to me like the dockerhub creds aren't getting picked up from the Github Secrets over here. Maybe it would be a good idea to not do the |
77a9bf0
to
0fc8391
Compare
0fc8391
to
478d91f
Compare
What does this pull request do? Explain your changes. (required)
Specific updates (required)
chanData.TranscodeData
How did you test each of these updates (required)
Does this pull request close any open issues?
Fixes #1843
Fixes #1762
Checklist:
make
runs successfully./test.sh
pass