Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
m-alisafaee committed Jul 10, 2024
1 parent 3f874e2 commit b0e75ee
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion renku_notebooks/api/classes/data_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def get_storage_by_id(self, user: User, endpoint: str, storage_id: str) -> Cloud
)
response = res.json()
storage = response["storage"]
secrets = {s["name"]: s["secret_id"] for s in response["secrets"]} if "secrets" in response else {}
secrets = {s["secret_id"]: s["name"] for s in response["secrets"]} if "secrets" in response else {}
return CloudStorageConfig(
config=storage["configuration"],
source_path=storage["source_path"],
Expand Down
4 changes: 2 additions & 2 deletions renku_notebooks/api/notebooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,9 +510,9 @@ def _on_error(error_msg):
request_data = {
"name": f"{cloud_storage.base_name}-saved-storage-secrets",
"namespace": server.k8s_client.preferred_namespace,
"secret_ids": list(cloud_storage.secrets.values()),
"secret_ids": list(cloud_storage.secrets),
"owner_references": [owner_reference],
"keys_property": "id",
"key_mapping": cloud_storage.secrets,
}

try:
Expand Down
2 changes: 0 additions & 2 deletions renku_notebooks/api/schemas/cloud_storage.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Schema for cloudstorage config."""

import json
from configparser import ConfigParser
from io import StringIO
from pathlib import Path
Expand Down Expand Up @@ -123,7 +122,6 @@ def get_manifest_patch(self, base_name: str, namespace: str, labels={}, annotati
"stringData": {
"remote": self.name or base_name,
"remotePath": self.source_path,
"secrets": json.dumps(self.secrets),
"secretKey": self.user_secret_key,
"configData": self.config_string(self.name or base_name),
},
Expand Down

0 comments on commit b0e75ee

Please sign in to comment.