canonical / canonical/data-science-stack

`create` should override existing service

Open
#81 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
37
Forks
10
PR merge metrics
No merged PRs in 30d

Description

### Why it needs to get done

This change is affecting edge case:

When user is trying to create a notebook wile the service with the same name exists the dss will not allow that. Steps to reproduce.

```
pip install .
export DSS_KUBECONFIG=~/.kube/config # assuming config is set
dss initialize
kubectl create service clusterip empty-service --tcp=80:9376 -n dss
dss create empty-service --image=pytorch
```

output:
```
2024-04-19 11:55:53 [INFO] [main] [create_notebook_command]: Executing create command
2024-04-19 11:55:53 [ERROR] [create_notebook] [create_notebook]: Failed to create Notebook. Notebook with name 'empty-service' already exists.
Please specify a different name.
2024-04-19 11:55:53 [ERROR] [utils] [get_service_url]: Failed to get the URL of notebook name with error code 404.
Check the debug logs for more details.
2024-04-19 11:55:53 [DEBUG] [utils] [get_service_url]: Failed to get the URL of notebook name with error: services "name" not found
```

Instead of the existing behavior the dss create should override existing service.

### What needs to get done

`dss create` can create notebooks in dss namespace even if services with the same name already exist. These services will be overridden.

### When is the task considered done

Functionality is implemented and tested.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.