Cannot rebuild JupyterLab
astrojuanlu opened this issue · comments
Describe the bug
Cannot build a new JupyterLab environment, clicking the "Build" button does nothing. The request to /catch/api-proxy/api/jupyter-builds
returns 500. Tested with two instances on Orchest 2022.10.4.
In the server, this can be seen in the orchest-api
container logs:
│ orchest-api-5f97c74d5c-pt276 ERROR:orchest-lib:two_phase_executor.py - [13/Oct/2022 10:34:13] - Error during transactional phase: [<class 'app.errors.SessionInProgressException'>] │
│ orchest-api-5f97c74d5c-pt276 ERROR:orchest-lib:two_phase_executor.py - [13/Oct/2022 10:34:13] - File "/orchest/services/orchest-api/app/app/apis/namespace_jupyter_image_builds.py", line 52, in post │
│ orchest-api-5f97c74d5c-pt276 jupyter_image_build = CreateJupyterEnvironmentBuild(tpe).transaction() │
│ orchest-api-5f97c74d5c-pt276 File "/orchest/lib/python/orchest-internals/_orchest/internals/two_phase_executor.py", line 168, in transaction │
│ orchest-api-5f97c74d5c-pt276 return self._transaction(*args, **kwargs) │
│ orchest-api-5f97c74d5c-pt276 File "/orchest/services/orchest-api/app/app/apis/namespace_jupyter_image_builds.py", line 200, in _transaction │
│ orchest-api-5f97c74d5c-pt276 raise SessionInProgressException()
Expected behavior
A clear and concise description of what you expected to happen.
To Reproduce
Steps to reproduce the behavior:
- Go to your instance
- Click on Settings -> Configure JupyterLab
- Click on Build
- Nothing happens
Environment
- Orchest's version (in the settings page): 2022.10.4
From reading the traceback, I thought that maybe if I stop all the active sessions I could work around the issue. However, I have no idea which projects have active sessions without opening them all. In k9s I see I have some active services and sessions, but I don't see a way of telling which projects do they correspond to.
I confirm I could trigger a build after I manually stopped all the dangling sessions.
This might or might not be related, but even though I could trigger a build, the build succeeded suspiciously fast and without producing any logs.
jupyter-not-building.mp4
I confirm I could trigger a build after I manually stopped all the dangling sessions.
The issue then is that the FE doesn't prompt the user that there are dangling sessions. It used to do so and provide the option to kill them so the build could be triggered.
the build succeeded suspiciously fast
I'd say that could be expected since the build would have been triggered before and by not changing the set-up script the build cache would be used and no build would have to happen.
and without producing any logs.
That is indeed an issue.
EDIT: I reproduced the issue. In short, the build
should first poll the endpoint to check whether any sessions are running and if that is the case a dialog should show to ask the user to kill those sessions in order to trigger the build. When manually stopping all sessions, the build does show logs for me.
I confirm 2022.10.5 fixed the issue ✔️