Description
We currently have ISessionProvider
in renku.domain_model
and implementations of it in renku.core.session
that get used as plugins.
While the concept of a "session" is renku specific and makes sense to have as a domain model, the backends dealing with the session (Docker/Notebook Services) are not renku-python specific and as such should be treated as external infrastructure and properly wrapped/injected. They are a bit unusual since pluggy takes care of injection instead of the inject
library, but the concept is the same.
So we should move ISessionProvider
to renku.core.interface
and the DockerSessionProvider
and RenkulabSessionProvider
to renku.infrastructure
(maybe in a session
subfolder).
The renku.core.session.session
code itself is fine and can stay where it is.