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

feat: support connected services #1874

Merged
merged 4 commits into from
May 16, 2024
Merged

Conversation

leafty
Copy link
Member

@leafty leafty commented May 15, 2024

Add support to mount repositories from external sources in session. This requires connected services support from renku-data-services. Also, the API for starting Renku 2.0 sessions has been modified to accept external repositories.

Changes in notebooks:

  • Refactored the UserServer class to be an abstract class. Renku1UserServer and Renku2UserServer inherit from UserServer and contain the corresponding adaptations needed to support Renku 1.0 and Renku 2.0 sessions respectively.
  • Changed the amalthea patches to reflect changes in git-clone and git-proxy.
  • Updated the patch_statefulset_tokens() method invoked when resuming sessions.

Changes in git-clone:

  • Refactored the git-clone container to support cloning repositories from any source.
  • Cloning is done optimistically. The git-clone container will not crash if a repository cannot be cloned.
  • For private repositories, a git provider must be configured and will be used to clone.
  • The container now only uses the renku_access_token.

Changes in git-proxy:

  • Refactored the git-proxy container to support injecting credentials from external services.
  • The git-proxy is a simple pass-through for anonymous sessions (meaning it should probably not run for anonymous sessions).
  • Repositories matching a configured git provider will have credentials injected:
    • From renku-gateway-auth for the internal GitLab
    • From renku-data-services for other services
  • The container now only uses the renku_access_token and the renku_refresh_token.

leafty added 3 commits May 15, 2024 16:07
Add support to mount repositories from external sources in session. This requires `connected services` support from `renku-data-services`. Also, the API for starting Renku 2.0 sessions has been modified to accept external repositories.

Changes in `notebooks`:
* Refactored the `UserServer` class to be an abstract class. `Renku1UserServer` and `Renku2UserServer` inherit from `UserServer` and contain the corresponding adaptations needed to support Renku 1.0 and Renku 2.0 sessions respectively.
* Changed the `amalthea` patches to reflect changes in `git-clone` and `git-proxy`.
* Updated the `patch_statefulset_tokens()` method invoked when resuming sessions.

Changes in `git-clone`:
* Refactored the `git-clone` container to support cloning repositories from any source.
* Cloning is done optimistically. The `git-clone` container will not crash if a repository cannot be cloned.
* For private repositories, a `git provider` must be configured and will be used to clone.
* The container now only uses the `renku_access_token`.

Changes in `git-proxy`:
* Refactored the `git-proxy` container to support injecting credentials from external services.
* The `git-proxy` is a simple pass-through for anonymous sessions (meaning it should probably not run for anonymous sessions).
* Repositories matching a configured `git provider` will have credentials injected:
  - From `renku-gateway-auth` for the internal GitLab
  - From `renku-data-services` for other services
* The container now only uses the `renku_access_token` and the `renku_refresh_token`.
…vices-final

# Conflicts:
#	git_services/git_services/init/cloner.py
#	git_services/git_services/init/config.py
#	git_services/git_services/sidecar/errors.py
#	renku_notebooks/api/amalthea_patches/inject_certificates.py
#	renku_notebooks/api/classes/data_service.py
#	renku_notebooks/api/classes/k8s_client.py
#	renku_notebooks/api/classes/server.py
#	renku_notebooks/api/notebooks.py
#	renku_notebooks/api/schemas/repository.py
#	renku_notebooks/config/__init__.py
#	renku_notebooks/util/kubernetes_.py
#	tests/unit/test_server_class/test_manifest.py
@leafty leafty marked this pull request as ready for review May 16, 2024 08:46
@leafty leafty requested a review from a team as a code owner May 16, 2024 08:46
Panaetius
Panaetius previously approved these changes May 16, 2024
@leafty leafty merged commit 2adec8d into master May 16, 2024
10 checks passed
@leafty leafty deleted the build/connected-services-final branch May 16, 2024 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants