Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(BA-673): Add status to Image, ImageNode GQL Field #3620

Open
wants to merge 4 commits into
base: topic/02-10-feat_add_status_column_to_image_table
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changes/3620.feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add `status` to `Image`, `ImageNode` GQL Fields.
6 changes: 6 additions & 0 deletions docs/manager/graphql-reference/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,9 @@
digest: String
labels: [KVPair]
size_bytes: BigInt

"""Added in 25.3.1."""
jopemachine marked this conversation as resolved.
Show resolved Hide resolved
status: String

Check notice on line 403 in docs/manager/graphql-reference/schema.graphql

View workflow job for this annotation

GitHub Actions / GraphQL Inspector

Field 'status' was added to object type 'ImageNode'

Field 'status' was added to object type 'ImageNode'
resource_limits: [ResourceLimit]
supported_accelerators: [String]

Expand Down Expand Up @@ -872,6 +875,9 @@
labels: [KVPair]
aliases: [String]
size_bytes: BigInt

"""Added in 25.3.1."""
status: String

Check notice on line 880 in docs/manager/graphql-reference/schema.graphql

View workflow job for this annotation

GitHub Actions / GraphQL Inspector

Field 'status' was added to object type 'Image'

Field 'status' was added to object type 'Image'
resource_limits: [ResourceLimit]
supported_accelerators: [String]
installed: Boolean
Expand Down
3 changes: 3 additions & 0 deletions src/ai/backend/manager/models/gql_models/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ class Image(graphene.ObjectType):
labels = graphene.List(KVPair)
aliases = graphene.List(graphene.String)
size_bytes = BigInt()
status = graphene.String(description="Added in 25.3.1.")
resource_limits = graphene.List(ResourceLimit)
supported_accelerators = graphene.List(graphene.String)
installed = graphene.Boolean()
Expand Down Expand Up @@ -176,6 +177,7 @@ def populate_row(
labels=[KVPair(key=k, value=v) for k, v in row.labels.items()],
aliases=[alias_row.alias for alias_row in row.aliases],
size_bytes=row.size_bytes,
status=row.status,
resource_limits=[
ResourceLimit(
key=k,
Expand Down Expand Up @@ -406,6 +408,7 @@ class Meta:
digest = graphene.String()
labels = graphene.List(KVPair)
size_bytes = BigInt()
status = graphene.String(description="Added in 25.3.1.")
resource_limits = graphene.List(ResourceLimit)
supported_accelerators = graphene.List(graphene.String)
aliases = graphene.List(
Expand Down
Loading