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
…3456)

Co-authored-by: Gyubong Lee <jopemachine@naver.com>
lablup-octodog and jopemachine authored Jan 14, 2025
1 parent 32b0008 commit f57f392
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
@@ -1245,13 +1245,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!
@@ -1580,8 +1582,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
}
@@ -2250,10 +2258,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!
@@ -2266,10 +2276,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
@@ -2282,6 +2294,7 @@ input ModifyContainerRegistryInput {
is_global: Boolean
}

"""Deprecated since 24.09.0. use `DeleteContainerRegistryNode` instead"""
type DeleteContainerRegistry {
container_registry: ContainerRegistry
}
30 changes: 30 additions & 0 deletions src/ai/backend/manager/models/container_registry.py
Original file line number Diff line number Diff line change
@@ -180,6 +180,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)
@@ -191,6 +195,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)
@@ -202,6 +210,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)
@@ -213,6 +225,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)

@@ -549,6 +565,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)

@@ -587,7 +607,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)

@@ -635,7 +660,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)

0 comments on commit f57f392

Please sign in to comment.