-
Notifications
You must be signed in to change notification settings - Fork 27
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
(lv2v) change control_url to not nullable #286
Conversation
@@ -118,6 +120,13 @@ async def live_video_to_video( | |||
), | |||
) | |||
|
|||
if "trickle_port" in params.params: | |||
trickle_port = params.params["trickle_port"] |
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.
Why do you need this? Shouldn't we pass correct port as part of subscribe_url
/publish_url
/control_url
? I think that if we need to change it we should change it in O.
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.
We can pass the port at the beginning of the URL instead and then append the host within the runner conditionally by checking for the colon and port number. I was trying to be more descriptive by explicitly passing the port with a named parameter, but I think either approach is good
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.
To me it's super weird that you pass Url and then separately the port. So I'd prefer to not do that logic unless really needed.
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.
Or maybe I'm missing something. But Afaiu all urls can already include the port so no need to pass it separately
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.
The URL is passed without a host or port (example: /ai/trickle/2d4a3F
). By using request.client.host
we are able to reliably identify the host to use for following trickle updates, regardless of the serviceUri config of the orchestrator. This is why the block is added. However, I think we can use :8936/ai/trickle/2d4a3F
, and append host when the value is passed starting with :
if you'd like it a bit cleaner. This still allows for testing with a full URL.
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.
FTR we should not add anything inside the params
object. This is reserved to the specific pipeline implementation to add any inference params. Anything else (like a transport config like trickle) should be added as regular fields on the request object.
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.
Modified this to remove the trickle_port
param entirely. It looks like we're going with ServiceURI. In the case a local development, an external host IP will need to be used.
This change modifies the
control_url
field to not-nullable. This change goes along with livepeer/go-livepeer#3263