Skip to content

Commit

Permalink
fix: Broken ComputeContainer GQL (#3042)
Browse files Browse the repository at this point in the history
Co-authored-by: Joongi Kim <[email protected]>
Backported-from: main (24.12)
Backported-to: 23.09
Backport-of: 3042
  • Loading branch information
jopemachine and achimnol committed Nov 12, 2024
1 parent fccaf6d commit 919802e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions changes/3042.fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix regression of `ComputeContainer` GraphQL queries due to newly introduced relationship fields
8 changes: 8 additions & 0 deletions src/ai/backend/manager/models/kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -1022,6 +1022,14 @@ async def batch_load_detail(
.where(
(kernels.c.id.in_(container_ids)),
)
.options(
noload("*"),
selectinload(
KernelRow.group_row,
KernelRow.user_row,
KernelRow.image_row,
),
)
)
if domain_name is not None:
query = query.where(kernels.c.domain_name == domain_name)
Expand Down

0 comments on commit 919802e

Please sign in to comment.