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

(lv2v) change control_url to not nullable #286

Closed
wants to merge 4 commits into from
Closed

Conversation

eliteprox
Copy link
Collaborator

@eliteprox eliteprox commented Nov 22, 2024

This change modifies the control_url field to not-nullable. This change goes along with livepeer/go-livepeer#3263

@@ -118,6 +120,13 @@ async def live_video_to_video(
),
)

if "trickle_port" in params.params:
trickle_port = params.params["trickle_port"]
Copy link
Contributor

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.

Copy link
Collaborator Author

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

Copy link
Contributor

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.

Copy link
Contributor

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

Copy link
Collaborator Author

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.

Copy link
Member

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.

Copy link
Collaborator Author

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.

@eliteprox eliteprox closed this Nov 25, 2024
@eliteprox eliteprox deleted the v2vcontroluri branch December 5, 2024 18:03
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