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

Notebook: refactor blueprint business logic to core #429

Merged
merged 16 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,10 @@ docker-compose.override.yml
result
*.qcow2

# tests
.k3d-config.yaml

# Misc
*.pem
*.gz
*.tgz
3 changes: 1 addition & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ When reporting a bug, please include the following information:
If you do not already have a development environment set up, you will probably find the [developer documentation](DEVELOPING.md) helpful.

* Before submitting a pull request, please make sure you agree to the license and have submitted a signed [contributor license agreement](https://github.com/SwissDataScienceCenter/renku/wiki/Legal)
* PRs should include a short, descriptive title. The titles will be used to compile changelogs for releases, so think about the title in that context. The title should be formatted using the [Conventional Commits](https://www.conventionalcommits.org/) style
* PRs should include a short, descriptive title. The titles will be used to compile changelogs for releases, so think about the title in that context. The title should be formatted using the [Conventional Commits](https://www.conventionalcommits.org/) style
* Small improvements need not reference an issue, but PRs that introduce larger changes or add new functionality should refer to an issue
* Structure your commits in meaningful units, each with an understandable purpose and coherent commit message. For example, if your proposed changes contain a refactoring and a new feature, make two PRs
* Format commit messages using the [Conventional Commits](https://www.conventionalcommits.org/) style

Original file line number Diff line number Diff line change
Expand Up @@ -448,8 +448,8 @@ async def get_server_logs(
# NOTE: this get_server ensures the user has access to the server without it you could read someone elses logs
server = await self.get_server(server_name, safe_username)
if not server:
raise MissingResourceError(
f"Cannot find server {server_name} for user " f"{safe_username} to retrieve logs."
raise errors.MissingResourceError(
message=f"Cannot find server {server_name} for user " f"{safe_username} to retrieve logs."
)
pod_name = f"{server_name}-0"
return await self.renku_ns_client.get_pod_logs(pod_name, max_log_lines)
Expand Down Expand Up @@ -490,9 +490,10 @@ async def delete_server(self, server_name: str, safe_username: str) -> None:
"""Delete the server."""
server = await self.get_server(server_name, safe_username)
if not server:
return None
await self.renku_ns_client.delete_server(server_name)
return None
raise errors.MissingResourceError(
message=f"Cannot find server {server_name} for user " f"{safe_username} in order to delete it."
)
return await self.renku_ns_client.delete_server(server_name)

async def patch_tokens(self, server_name: str, renku_tokens: RenkuTokens, gitlab_token: GitlabToken) -> None:
"""Patch the Renku and Gitlab access tokens used in a session."""
Expand Down
616 changes: 34 additions & 582 deletions components/renku_data_services/notebooks/blueprints.py

Large diffs are not rendered by default.

Loading
Loading