-
Notifications
You must be signed in to change notification settings - Fork 86
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
Adds support for unix_socket #151
Conversation
This PR also
|
yay, thank you for your contribution both here and upstream to rstudio! This is going to unlock a lot of non-containerized use cases - I'm super excited for that to land :) If you could split the PR into a unix socket one and one with everything else, that would make this easier to review and merge. I would like to hold off on merging the unix socket one until that upstream PR gets merged, but the others should be easier. Would you be open to splitting it up like that? Thanks! |
Thanks @yuvipanda . I will split the PR. The PR for unix-socket support in RStudio is now merged and will be part of the official "Kousa Dogwood" builds expected in 2024.10 : rstudio/rstudio#14938 (comment) |
RStudio v2024.12.0+467 is out: https://github.com/rstudio/rstudio/releases/tag/v2024.12.0%2B467 |
@jhgoebbert Could you split the PR into a unix socket one and one with everything else? Thank you. |
@yuvipanda Or could this be merged as is? @consideRatio Any objections? |
I tested this PR successfully with RStudio v2024.12.0+467 and pip install git+https://github.com/jhgoebbert/jupyter-rsession-proxy@feature/sockets plus setting environment variable |
@jhgoebbert @yuvipanda @consideRatio Happy Holidays! |
Happy holidays @benz0li!! ❤️ Sorry for not helping out here now. I'm currently less available for open-source contributions than I've been for many years. |
Thanks for testing @benz0li ! I also think it'd be good to split the PR per @yuvipanda's comments. (the unix socket support and the reduction in subprocess invocation) I agree that it would be great to have this functionality. |
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.
This functionality would be great to have! I added some specific suggestions, and am also in favor of @yuvipanda's suggestion to split the PR.
jupyter_rsession_proxy/__init__.py
Outdated
@@ -127,6 +150,9 @@ def _get_timeout(default=15): | |||
'icon_path': get_icon_path() | |||
} | |||
} | |||
if os.getenv('RSERVER_USE_SOCKET', "") != "": |
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.
Similar to the above, could this please beJUPYTER_RSESSION_PROXY_USE_SOCKET
instead?
Also, since you check for unix_socket != ""
above, I think this can be reduced to if os.getenv("JUPYTER_RSESSION_PROXY_USE_SOCKET")
?
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.
I realized that there is already RSERVER_TIMEOUT
and RSESSION_TIMEOUT
. So I did not want to introduce a new naming schema and named the variables also RSERVER_*
.
Wouldn't it be better to change all variable names at once in a separate PR?
This PR gets closed as I have splitted the PR like @yuvipanda asked for in #151 (comment)
I will create a PR for the other features as soon as the unix-socket-support is merged. |
The second part of this PR can now be found here
|
This PR enables RStudio connections via sockets in combination with this PR for RStudio rstudio/rstudio#14938