From 66b0a9989a87ba26af6c0dfb66f315f868393153 Mon Sep 17 00:00:00 2001 From: Gyubong Lee Date: Thu, 28 Nov 2024 20:05:41 +0900 Subject: [PATCH] fix: Regression of `AgentSummary` GQL resolver (#3045) Backported-from: main Backported-to: 23.09 Backported-of: 3045 --- changes/3045.fix.md | 1 + src/ai/backend/manager/models/gql.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 changes/3045.fix.md diff --git a/changes/3045.fix.md b/changes/3045.fix.md new file mode 100644 index 0000000000..365617b739 --- /dev/null +++ b/changes/3045.fix.md @@ -0,0 +1 @@ +Fix regression of the `AgentSummary` resolver caused by an incorrect `batch_load_func` assignment. diff --git a/src/ai/backend/manager/models/gql.py b/src/ai/backend/manager/models/gql.py index dcfa64f203..0cc3bc46d0 100644 --- a/src/ai/backend/manager/models/gql.py +++ b/src/ai/backend/manager/models/gql.py @@ -742,9 +742,9 @@ async def resolve_agent_summary( if ctx.local_config["manager"]["hide-agents"]: raise ObjectNotFound(object_name="agent") - loader = ctx.dataloader_manager.get_loader( + loader = ctx.dataloader_manager.get_loader_by_func( ctx, - "Agent", + AgentSummary.batch_load, raw_status=None, scaling_group=scaling_group, domain_name=domain_name,