Skip to content

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

@matuskosut

Description

@matuskosut

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions