Running sessions will split into 2 different states, either "running" or "sleeping" (double check the exact words). A sleeping session can resume quicker and might need to be re-created if it should run from a specific branch/commit different from the current one.
We won't have autosaves from GitLab anymore. The sleeping session will take its place. Any change to running or sleeping sessions requires informing the user (E.G: we need to start from a different branch/commit, throwing away the previous content)
Proposal
This requires quite a few changes.
Ideally, we can use this to rewrite stale session components. This includes:
[ ] Dropping the project sessions tab. That won't be useful anymore since we allow just 1 session per project/user.
This requires updating the session buttons (they are used in the dashboard and the project header).
We can drop the Notebooks component from the notebooks containers, together with presentational components used only by Notebooks.
Double-check all the places where we redirect to "/projects/[slug]/sessions" and redirect to just "/projects/[slug]" instead.
:exclamation: anonymous users still have a global sessions page using the Notebooks component in the Notebooks.container.js file; it should be accessible by the /sessions page/route. We can swap that page with a new one showing the running sessions using the component from the Dashboard (or a simplified version).
[ ] Simplify the logic to start a new project (StartNotebookServer component).
That's really a beast. We need to update the logic to support the new simplified autosave flow. We can simplify quite a bit all the rest, but beware that changing too much will result in a huge PR!
Remember we need to support the existing flows: Quickstart and Start with options. The quickstart might provide specific branch, commit and env variables from the URL and the settings coming from the project ".ini" file (read through GET /renku/config.read); when failing on picking any values, we fall back to the normal Start with options showing a warning.
The flow to read Images, pipelines, jobs, ... is very convoluted. We have a graph here of how it works. Be sure you familiarize with it, and perhaps create a set ob projects in specific conditions to test.
[ ] Drop the polling mechanism we use in some cases. That's used by other old components in the Notebooks.container.js file (CheckNotebookStatus, ShowSession).
We need to update those components, but converting all of them at once might be too time-consuming since we already have a lot of changes here. Consider adding just a wrapper to inject the sessions data from the RTK query and create follow-up issues if required.
Motivation
We are reworking how autosaves work on the backend. All the info is available in this RFC document made on this ShapeUp pitch.
In short, sessions will change as follows:
Proposal
This requires quite a few changes. Ideally, we can use this to rewrite stale session components. This includes:
Notebooks
component from the notebooks containers, together with presentational components used only byNotebooks
.Notebooks
component in the Notebooks.container.js file; it should be accessible by the/sessions
page/route. We can swap that page with a new one showing the running sessions using the component from the Dashboard (or a simplified version).StartNotebookServer
component).branch
,commit
andenv variables
from the URL and the settings coming from the project ".ini" file (read throughGET /renku/config.read
); when failing on picking any values, we fall back to the normal Start with options showing a warning.CheckNotebookStatus
,ShowSession
).sessions
data from the RTK query and create follow-up issues if required.