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

Env variables for timeout need to be converted to float #138

Open
matuskosut opened this issue Oct 11, 2022 · 0 comments
Open

Env variables for timeout need to be converted to float #138

matuskosut opened this issue Oct 11, 2022 · 0 comments
Labels

Comments

@matuskosut
Copy link
Contributor

matuskosut commented Oct 11, 2022

PR: #138

Bug description

I noticed that jupyter-server-proxy expects a float value for timeout, instead of string.

Expected behaviour

Timeouts for how long proxy server is waiting for start of rsession/rstudio process should be applied from environment variables.

Actual behaviour

Currently setting environment variables throw this error:

[E 2022-10-11 11:24:26.180 SingleUserNotebookApp web:1798] Uncaught exception GET /user/test/rstudio/ (::ffff:172.18.0.1)
    HTTPServerRequest(protocol='http', host='www.localhost:8000', method='GET', uri='/user/test/rstudio/', version='HTTP/1.1', remote_ip='::ffff:172.18.0.1')
    Traceback (most recent call last):
      File "/opt/conda/lib/python3.10/site-packages/tornado/web.py", line 1713, in _execute
        result = await result
      File "/opt/conda/lib/python3.10/site-packages/jupyter_server_proxy/websocket.py", line 91, in get
        return await self.http_get(*args, **kwargs)
      File "/opt/conda/lib/python3.10/site-packages/jupyter_server_proxy/handlers.py", line 683, in http_get
        return await ensure_async(self.proxy(self.port, path))
      File "/opt/conda/lib/python3.10/site-packages/jupyter_server/utils.py", line 182, in ensure_async
        result = await obj
      File "/opt/conda/lib/python3.10/site-packages/jupyter_server_proxy/handlers.py", line 677, in proxy
        await self.ensure_process()
      File "/opt/conda/lib/python3.10/site-packages/jupyter_server_proxy/handlers.py", line 656, in ensure_process
        is_ready = await proc.ready()
      File "/opt/conda/lib/python3.10/site-packages/simpervisor/process.py", line 182, in ready
        if time.time() - start_time > self.ready_timeout:
    TypeError: '>' not supported between instances of 'float' and 'str'

How to reproduce

set environment variables for timeout, e.g.:

export RSERVER_TIMEOUT=60
export RSESSION_TIMEOUT=60

run jupyterlab and start rstudio (see logs)

Your personal set up

Proposed solution in PR: #137

@matuskosut matuskosut added the bug label Oct 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant