From a22662c23385764ae57ae836a9976ef41ebe1ddd Mon Sep 17 00:00:00 2001 From: Sanghun Lee Date: Wed, 15 Jan 2025 14:27:16 +0900 Subject: [PATCH 1/4] fix: GQL compute_session.vfolder_mounts returns folder id --- src/ai/backend/manager/models/gql_models/session.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ai/backend/manager/models/gql_models/session.py b/src/ai/backend/manager/models/gql_models/session.py index 14e8cb9134a..f43575b36c5 100644 --- a/src/ai/backend/manager/models/gql_models/session.py +++ b/src/ai/backend/manager/models/gql_models/session.py @@ -259,7 +259,7 @@ def from_row( # resources agent_ids=row.agent_ids, scaling_group=row.scaling_group_name, - vfolder_mounts=row.vfolder_mounts, + vfolder_mounts=[vf.vfid.folder_id for vf in row.vfolder_mounts], occupied_slots=row.occupying_slots.to_json(), requested_slots=row.requested_slots.to_json(), # statistics From a6ef9d323031e92b09b1c1808aed9a7589aa665c Mon Sep 17 00:00:00 2001 From: Sanghun Lee Date: Wed, 15 Jan 2025 14:37:33 +0900 Subject: [PATCH 2/4] add news fragment --- changes/3461.fix.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 changes/3461.fix.md diff --git a/changes/3461.fix.md b/changes/3461.fix.md new file mode 100644 index 00000000000..577fe8e1597 --- /dev/null +++ b/changes/3461.fix.md @@ -0,0 +1 @@ +Fix GQL `vfolder_mounts` field resolver of `compute_session` type From df413fc5533d63d1ba16e8e28d185951a2c00425 Mon Sep 17 00:00:00 2001 From: Sanghun Lee Date: Wed, 15 Jan 2025 14:41:22 +0900 Subject: [PATCH 3/4] cover other type's fields --- src/ai/backend/manager/models/session.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ai/backend/manager/models/session.py b/src/ai/backend/manager/models/session.py index 041e5e4b5e8..1b2b7873d18 100644 --- a/src/ai/backend/manager/models/session.py +++ b/src/ai/backend/manager/models/session.py @@ -1678,7 +1678,7 @@ def parse_row(cls, ctx: GraphQueryContext, row: Row) -> Mapping[str, Any]: "scaling_group": row.scaling_group_name, "service_ports": row.main_kernel.service_ports, "mounts": [mount.name for mount in row.vfolder_mounts], - "vfolder_mounts": row.vfolder_mounts, + "vfolder_mounts": [vf.vfid.folder_id for vf in row.vfolder_mounts], "occupying_slots": row.occupying_slots.to_json(), "occupied_slots": row.occupying_slots.to_json(), "requested_slots": row.requested_slots.to_json(), From 34dc1e2c5954fde1b4e7d77de4fdc5c37ee1013d Mon Sep 17 00:00:00 2001 From: Sanghun Lee Date: Thu, 23 Jan 2025 08:48:16 +0000 Subject: [PATCH 4/4] chore: update api schema dump Co-authored-by: octodog --- docs/manager/rest-reference/openapi.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/manager/rest-reference/openapi.json b/docs/manager/rest-reference/openapi.json index f6205a85290..a4ffe214047 100644 --- a/docs/manager/rest-reference/openapi.json +++ b/docs/manager/rest-reference/openapi.json @@ -3,7 +3,7 @@ "info": { "title": "Backend.AI Manager API", "description": "Backend.AI Manager REST API specification", - "version": "24.12.1", + "version": "25.1.1", "contact": { "name": "Lablup Inc.", "url": "https://docs.backend.ai",