Skip to content

Commit

Permalink
fix(BA-507): GQL compute_session.vfolder_mounts returns folder id (#…
Browse files Browse the repository at this point in the history
…3461)

Co-authored-by: octodog <[email protected]>
Backported-from: main (25.1)
Backported-to: 24.09
Backport-of: 3461
  • Loading branch information
fregataa and lablup-octodog committed Jan 23, 2025
1 parent 153f245 commit 47bb60a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions changes/3461.fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix GQL `vfolder_mounts` field resolver of `compute_session` type
2 changes: 1 addition & 1 deletion docs/manager/rest-reference/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"info": {
"title": "Backend.AI Manager API",
"description": "Backend.AI Manager REST API specification",
"version": "24.09.5",
"version": "25.1.1",
"contact": {
"name": "Lablup Inc.",
"url": "https://docs.backend.ai",
Expand Down
2 changes: 1 addition & 1 deletion src/ai/backend/manager/models/gql_models/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/ai/backend/manager/models/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -1606,7 +1606,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(),
Expand Down

0 comments on commit 47bb60a

Please sign in to comment.