Skip to content

Commit

Permalink
fix: Unify project field in ContainerRegistry to be a list of string
Browse files Browse the repository at this point in the history
  • Loading branch information
rapsealk committed Oct 19, 2023
1 parent dec5284 commit 8a0178d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions changes/.fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Unify each `project` field in GraphQL types `ContainerRegistry` to be a list of string.
5 changes: 3 additions & 2 deletions src/ai/backend/manager/models/etcd.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
class CreateContainerRegistryInput(graphene.InputObjectType):
url = graphene.String(required=True)
type = graphene.String(required=True)
project = graphene.String()
project = graphene.List(graphene.String)
username = graphene.String()
password = graphene.String()
ssl_verify = graphene.Boolean()
Expand All @@ -37,7 +37,7 @@ class CreateContainerRegistryInput(graphene.InputObjectType):
class ModifyContainerRegistryInput(graphene.InputObjectType):
url = graphene.String(required=True)
type = graphene.String(required=True)
project = graphene.String()
project = graphene.List(graphene.String)
username = graphene.String()
password = graphene.String()
ssl_verify = graphene.Boolean()
Expand Down Expand Up @@ -120,6 +120,7 @@ async def mutate(
) -> CreateContainerRegistry:
ctx: GraphQueryContext = info.context
input_config: Dict[str, Any] = {"": props.url, "type": props.type}
log.info("ETCD.CREATE_CONTAINER_REGISTRY (input_config:{})", input_config)
set_if_set(props, input_config, "project")
set_if_set(props, input_config, "username")
set_if_set(props, input_config, "password")
Expand Down

0 comments on commit 8a0178d

Please sign in to comment.