diff --git a/changes/3231.doc.md b/changes/3231.doc.md new file mode 100644 index 00000000000..cdad9c49d96 --- /dev/null +++ b/changes/3231.doc.md @@ -0,0 +1 @@ +Deprecate non relay container registry GQL explicitly. diff --git a/docs/manager/graphql-reference/schema.graphql b/docs/manager/graphql-reference/schema.graphql index cfdf9a29eae..fa78ee214b3 100644 --- a/docs/manager/graphql-reference/schema.graphql +++ b/docs/manager/graphql-reference/schema.graphql @@ -1471,6 +1471,7 @@ 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! @@ -1478,6 +1479,7 @@ type ContainerRegistry implements Node { config: ContainerRegistryConfig } +"""Deprecated since 24.09.0.""" type ContainerRegistryConfig { url: String! type: String! @@ -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 @@ -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! @@ -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 @@ -2613,6 +2625,7 @@ input ModifyContainerRegistryInput { is_global: Boolean } +"""Deprecated since 24.09.0. use `DeleteContainerRegistryNode` instead""" type DeleteContainerRegistry { container_registry: ContainerRegistry } diff --git a/src/ai/backend/manager/models/container_registry.py b/src/ai/backend/manager/models/container_registry.py index 12c7e1a2f86..9a7dbbbc609 100644 --- a/src/ai/backend/manager/models/container_registry.py +++ b/src/ai/backend/manager/models/container_registry.py @@ -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) @@ -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) @@ -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) @@ -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) @@ -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) @@ -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) @@ -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)