Skip to content

Commit 4d55808

Browse files
committed
feat: add new apispec for the new amalthea sessions (#360)
1 parent 62e197a commit 4d55808

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

components/renku_data_services/notebooks/api.spec.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -978,6 +978,7 @@ components:
978978
gpu:
979979
type: integer
980980
description: Number of GPUs used
981+
default: 0
981982
memory:
982983
type: integer
983984
description: Ammount of RAM for the session, in gigabytes
@@ -1023,7 +1024,7 @@ components:
10231024
storage_id:
10241025
allOf:
10251026
- "$ref": "#/components/schemas/Ulid"
1026-
- description: The storage ID is used to know which storage config from the DB should be overriden
1027+
- description: If the storage_id is provided then this config must replace an existing storage config in the session
10271028
required:
10281029
- configuration
10291030
- source_path

components/renku_data_services/notebooks/apispec.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# generated by datamodel-codegen:
22
# filename: api.spec.yaml
3-
# timestamp: 2024-10-07T22:25:48+00:00
3+
# timestamp: 2024-10-28T14:23:40+00:00
44

55
from __future__ import annotations
66

@@ -245,7 +245,7 @@ class SessionStatus(BaseAPISpec):
245245

246246
class SessionResourcesRequests(BaseAPISpec):
247247
cpu: Optional[float] = Field(None, description="Fractional CPUs")
248-
gpu: Optional[int] = Field(None, description="Number of GPUs used")
248+
gpu: int = Field(0, description="Number of GPUs used")
249249
memory: Optional[int] = Field(
250250
None, description="Ammount of RAM for the session, in gigabytes"
251251
)

0 commit comments

Comments
 (0)