Skip to content

RSDK-10366 - support rust utils on windows #900

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

Merged
merged 7 commits into from
Apr 18, 2025

Conversation

stuqdog
Copy link
Member

@stuqdog stuqdog commented Apr 14, 2025

No description provided.

Copy link
Member Author

@stuqdog stuqdog left a comment

Choose a reason for hiding this comment

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

Changes to support using rust-utils for connection on windows. Tested on windows and connected successfully, tested on mac and observed no regression.

Comment on lines +59 to +60
if sys.platform != "win32" and sys.platform != "cygwin":
self._dial_options.disable_webrtc = True
Copy link
Member Author

Choose a reason for hiding this comment

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

I was unable to get the SessionsClient to reliably connect and stay connected on windows when webRTC was disabled. Leaving it enabled is a little inefficient insofar as it means we're creating a second rust runtime, but 1) the windows workflow is already a little inefficient because we're using TCP instead of UDS for our proxy, and 2) I figure a minor inefficiency here is better than not supporting a SessionsClient on windows at all. No regression on linux/mac since we leave it disabled when the platform isn't windows.

cc @cheukt, who set up the disabling of webRTC initially here. If there's a particular reason to be concerned about re-enabling, please let me know!

@stuqdog stuqdog marked this pull request as ready for review April 15, 2025 15:40
@stuqdog stuqdog requested a review from a team as a code owner April 15, 2025 15:40
@stuqdog stuqdog requested review from njooma and lia-viam April 15, 2025 15:40
@@ -37,6 +38,7 @@ class SessionsClient:
channel: Channel
client: RobotServiceStub
_address: str
_robot_address: Optional[str]
Copy link
Member Author

Choose a reason for hiding this comment

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

We could probably get away with not storing this, since only one of _address and _robot_address is ever necessary, but the logic got slightly more finicky and less readable, and the cost of storing the address here is very small, so it's probably not a big deal and not worth flagging here but it was annoying me so I'm articulating it!

Copy link
Member

Choose a reason for hiding this comment

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

I would perhaps add a comment here differentiating between these 2. It took me a second to figure it out, so would be good to leave breadcrumbs for our future selves

@@ -37,6 +38,7 @@ class SessionsClient:
channel: Channel
client: RobotServiceStub
_address: str
_robot_address: Optional[str]
Copy link
Member

Choose a reason for hiding this comment

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

I would perhaps add a comment here differentiating between these 2. It took me a second to figure it out, so would be good to leave breadcrumbs for our future selves

@stuqdog stuqdog requested a review from njooma April 17, 2025 16:02
@stuqdog stuqdog merged commit 29379ac into viamrobotics:main Apr 18, 2025
13 checks passed
@stuqdog stuqdog deleted the RSDK-10366-rust-utils-for-windows branch April 18, 2025 16:15
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