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
Backported-from: main (24.12)
Backported-to: 24.09
Backport-of: 3231
  • Loading branch information
jopemachine committed Jan 14, 2025
1 parent 32b0008 commit cec74db
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 @@ -1245,13 +1245,15 @@ type QuotaDetails {
hard_limit_bytes: BigInt
}

"""Deprecated since 24.09.0. use `ContainerRegistryNode` instead"""
type ContainerRegistry implements Node {

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

View workflow job for this annotation

GitHub Actions / GraphQL Inspector

Object type 'ContainerRegistry' has description 'Deprecated since 24.09.0. use `ContainerRegistryNode` instead'

Object type 'ContainerRegistry' has description 'Deprecated since 24.09.0. use `ContainerRegistryNode` instead'
"""The ID of the object"""
id: ID!
hostname: String
config: ContainerRegistryConfig
}

"""Deprecated since 24.09.0."""
type ContainerRegistryConfig {

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

View workflow job for this annotation

GitHub Actions / GraphQL Inspector

Object type 'ContainerRegistryConfig' has description 'Deprecated since 24.09.0.'

Object type 'ContainerRegistryConfig' has description 'Deprecated since 24.09.0.'
url: String!
type: String!
Expand Down Expand Up @@ -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

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

View workflow job for this annotation

GitHub Actions / GraphQL Inspector

Field 'Mutations.create_container_registry' has description 'Deprecated since 24.09.0. use `CreateContainerRegistryNode` instead'

Field 'Mutations.create_container_registry' has description 'Deprecated since 24.09.0. use `CreateContainerRegistryNode` instead'

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

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

View workflow job for this annotation

GitHub Actions / GraphQL Inspector

Field 'Mutations.modify_container_registry' has description 'Deprecated since 24.09.0. use `ModifyContainerRegistryNode` instead'

Field 'Mutations.modify_container_registry' has description 'Deprecated since 24.09.0. use `ModifyContainerRegistryNode` instead'

"""Deprecated since 24.09.0. use `DeleteContainerRegistryNode` instead"""
delete_container_registry(hostname: String!): DeleteContainerRegistry

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

View workflow job for this annotation

GitHub Actions / GraphQL Inspector

Field 'Mutations.delete_container_registry' has description 'Deprecated since 24.09.0. use `DeleteContainerRegistryNode` instead'

Field 'Mutations.delete_container_registry' has description 'Deprecated since 24.09.0. use `DeleteContainerRegistryNode` instead'
modify_endpoint(endpoint_id: UUID!, props: ModifyEndpointInput!): ModifyEndpoint
}
Expand Down Expand Up @@ -2250,10 +2258,12 @@ type DeleteContainerRegistryNode {
container_registry: ContainerRegistryNode
}

"""Deprecated since 24.09.0. use `CreateContainerRegistryNode` instead"""
type CreateContainerRegistry {

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

View workflow job for this annotation

GitHub Actions / GraphQL Inspector

Object type 'CreateContainerRegistry' has description 'Deprecated since 24.09.0. use `CreateContainerRegistryNode` instead'

Object type 'CreateContainerRegistry' has description 'Deprecated since 24.09.0. use `CreateContainerRegistryNode` instead'
container_registry: ContainerRegistry
}

"""Deprecated since 24.09.0."""
input CreateContainerRegistryInput {

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

View workflow job for this annotation

GitHub Actions / GraphQL Inspector

Object type 'CreateContainerRegistryInput' has description 'Deprecated since 24.09.0.'

Object type 'CreateContainerRegistryInput' has description 'Deprecated since 24.09.0.'
url: String!
type: String!
Expand All @@ -2266,10 +2276,12 @@ input CreateContainerRegistryInput {
is_global: Boolean
}

"""Deprecated since 24.09.0. use `ModifyContainerRegistryNode` instead"""
type ModifyContainerRegistry {

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

View workflow job for this annotation

GitHub Actions / GraphQL Inspector

Object type 'ModifyContainerRegistry' has description 'Deprecated since 24.09.0. use `ModifyContainerRegistryNode` instead'

Object type 'ModifyContainerRegistry' has description 'Deprecated since 24.09.0. use `ModifyContainerRegistryNode` instead'
container_registry: ContainerRegistry
}

"""Deprecated since 24.09.0."""
input ModifyContainerRegistryInput {

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

View workflow job for this annotation

GitHub Actions / GraphQL Inspector

Object type 'ModifyContainerRegistryInput' has description 'Deprecated since 24.09.0.'

Object type 'ModifyContainerRegistryInput' has description 'Deprecated since 24.09.0.'
url: String
type: String
Expand All @@ -2282,6 +2294,7 @@ input ModifyContainerRegistryInput {
is_global: Boolean
}

"""Deprecated since 24.09.0. use `DeleteContainerRegistryNode` instead"""
type DeleteContainerRegistry {

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

View workflow job for this annotation

GitHub Actions / GraphQL Inspector

Object type 'DeleteContainerRegistry' has description 'Deprecated since 24.09.0. use `DeleteContainerRegistryNode` instead'

Object type 'DeleteContainerRegistry' has description 'Deprecated since 24.09.0. use `DeleteContainerRegistryNode` instead'
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 @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)

Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit cec74db

Please sign in to comment.