Skip to content

Commit

Permalink
doc: Deprecate non relay container registry GQL explicitly (#3231)
Browse files Browse the repository at this point in the history
  • Loading branch information
jopemachine authored Jan 14, 2025
1 parent 30b158e commit 76f646c
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
1 change: 1 addition & 0 deletions changes/3231.doc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Deprecate non relay container registry GQL explicitly.
13 changes: 13 additions & 0 deletions docs/manager/graphql-reference/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -1471,13 +1471,15 @@ type QuotaDetails {
hard_limit_bytes: BigInt
}

"""Deprecated since 24.09.0. use `ContainerRegistryNode` instead"""
type ContainerRegistry implements Node {
"""The ID of the object"""
id: ID!
hostname: String
config: ContainerRegistryConfig
}

"""Deprecated since 24.09.0."""
type ContainerRegistryConfig {
url: String!
type: String!
Expand Down Expand Up @@ -1848,8 +1850,14 @@ type Mutations {
"""Object id. Can be either global id or object id. Added in 24.09.0."""
id: String!
): DeleteContainerRegistryNode

"""Deprecated since 24.09.0. use `CreateContainerRegistryNode` instead"""
create_container_registry(hostname: String!, props: CreateContainerRegistryInput!): CreateContainerRegistry

"""Deprecated since 24.09.0. use `ModifyContainerRegistryNode` instead"""
modify_container_registry(hostname: String!, props: ModifyContainerRegistryInput!): ModifyContainerRegistry

"""Deprecated since 24.09.0. use `DeleteContainerRegistryNode` instead"""
delete_container_registry(hostname: String!): DeleteContainerRegistry
modify_endpoint(endpoint_id: UUID!, props: ModifyEndpointInput!): ModifyEndpoint

Expand Down Expand Up @@ -2581,10 +2589,12 @@ type DeleteContainerRegistryNode {
container_registry: ContainerRegistryNode
}

"""Deprecated since 24.09.0. use `CreateContainerRegistryNode` instead"""
type CreateContainerRegistry {
container_registry: ContainerRegistry
}

"""Deprecated since 24.09.0."""
input CreateContainerRegistryInput {
url: String!
type: String!
Expand All @@ -2597,10 +2607,12 @@ input CreateContainerRegistryInput {
is_global: Boolean
}

"""Deprecated since 24.09.0. use `ModifyContainerRegistryNode` instead"""
type ModifyContainerRegistry {
container_registry: ContainerRegistry
}

"""Deprecated since 24.09.0."""
input ModifyContainerRegistryInput {
url: String
type: String
Expand All @@ -2613,6 +2625,7 @@ input ModifyContainerRegistryInput {
is_global: Boolean
}

"""Deprecated since 24.09.0. use `DeleteContainerRegistryNode` instead"""
type DeleteContainerRegistry {
container_registry: ContainerRegistry
}
Expand Down
30 changes: 30 additions & 0 deletions src/ai/backend/manager/models/container_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,10 @@ def parse_value(value: str) -> ContainerRegistryType:

# Legacy
class CreateContainerRegistryInput(graphene.InputObjectType):
"""
Deprecated since 24.09.0.
"""

url = graphene.String(required=True)
type = graphene.String(required=True)
project = graphene.List(graphene.String)
Expand All @@ -197,6 +201,10 @@ class CreateContainerRegistryInput(graphene.InputObjectType):

# Legacy
class ModifyContainerRegistryInput(graphene.InputObjectType):
"""
Deprecated since 24.09.0.
"""

url = graphene.String()
type = graphene.String()
project = graphene.List(graphene.String)
Expand All @@ -208,6 +216,10 @@ class ModifyContainerRegistryInput(graphene.InputObjectType):

# Legacy
class ContainerRegistryConfig(graphene.ObjectType):
"""
Deprecated since 24.09.0.
"""

url = graphene.String(required=True)
type = graphene.String(required=True)
project = graphene.List(graphene.String)
Expand All @@ -219,6 +231,10 @@ class ContainerRegistryConfig(graphene.ObjectType):

# Legacy
class ContainerRegistry(graphene.ObjectType):
"""
Deprecated since 24.09.0. use `ContainerRegistryNode` instead
"""

hostname = graphene.String()
config = graphene.Field(ContainerRegistryConfig)

Expand Down Expand Up @@ -555,6 +571,10 @@ async def mutate(

# Legacy mutations
class CreateContainerRegistry(graphene.Mutation):
"""
Deprecated since 24.09.0. use `CreateContainerRegistryNode` instead
"""

allowed_roles = (UserRole.SUPERADMIN,)
container_registry = graphene.Field(ContainerRegistry)

Expand Down Expand Up @@ -593,7 +613,12 @@ async def mutate(
)


# Legacy mutations
class ModifyContainerRegistry(graphene.Mutation):
"""
Deprecated since 24.09.0. use `ModifyContainerRegistryNode` instead
"""

allowed_roles = (UserRole.SUPERADMIN,)
container_registry = graphene.Field(ContainerRegistry)

Expand Down Expand Up @@ -641,7 +666,12 @@ async def mutate(
return cls(container_registry=ContainerRegistry.from_row(ctx, reg_row))


# Legacy mutations
class DeleteContainerRegistry(graphene.Mutation):
"""
Deprecated since 24.09.0. use `DeleteContainerRegistryNode` instead
"""

allowed_roles = (UserRole.SUPERADMIN,)
container_registry = graphene.Field(ContainerRegistry)

Expand Down

0 comments on commit 76f646c

Please sign in to comment.