From 0fe539409f726aff51065782ba0afb82f7a818ac Mon Sep 17 00:00:00 2001 From: Gyubong Lee Date: Mon, 9 Dec 2024 05:27:01 +0000 Subject: [PATCH] fix: Missing status_history field --- src/ai/backend/manager/api/schema.graphql | 5 +++++ src/ai/backend/manager/models/kernel.py | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/ai/backend/manager/api/schema.graphql b/src/ai/backend/manager/api/schema.graphql index 88972b611c..109ba2a402 100644 --- a/src/ai/backend/manager/api/schema.graphql +++ b/src/ai/backend/manager/api/schema.graphql @@ -300,6 +300,9 @@ type ComputeContainer implements Item { registry: String status: String status_changed: DateTime + + """Added in 24.12.0.""" + status_history: JSONString status_info: String status_data: JSONString created_at: DateTime @@ -1196,6 +1199,8 @@ type ComputeSessionNode implements Node { status: String status_info: String status_data: JSONString + + """Added in 24.12.0.""" status_history: JSONString created_at: DateTime terminated_at: DateTime diff --git a/src/ai/backend/manager/models/kernel.py b/src/ai/backend/manager/models/kernel.py index 6acd91c674..3db283f899 100644 --- a/src/ai/backend/manager/models/kernel.py +++ b/src/ai/backend/manager/models/kernel.py @@ -880,6 +880,7 @@ class Meta: # status status = graphene.String() status_changed = GQLDateTime() + status_history = graphene.JSONString(description="Added in 24.12.0.") status_info = graphene.String() status_data = graphene.JSONString() created_at = GQLDateTime() @@ -931,6 +932,7 @@ def parse_row(cls, ctx: GraphQueryContext, row: KernelRow) -> Mapping[str, Any]: # status "status": row.status.name, "status_changed": row.status_changed, + "status_history": row.status_history, "status_info": row.status_info, "status_data": row.status_data, "created_at": row.created_at,