Skip to content

feat(BA-5119): add Strawberry GQL node type for ContainerRegistry#10093

Merged
fregataa merged 11 commits into
mainfrom
feat/BA-5119-container-registry-gql-node
Mar 17, 2026
Merged

feat(BA-5119): add Strawberry GQL node type for ContainerRegistry#10093
fregataa merged 11 commits into
mainfrom
feat/BA-5119-container-registry-gql-node

Conversation

@fregataa
Copy link
Copy Markdown
Member

@fregataa fregataa commented Mar 16, 2026

Summary

  • Add ContainerRegistryGQL Strawberry node type and ContainerRegistryTypeGQL enum in new api/gql/container_registry/ package
  • Register ContainerRegistryGQL in the EntityNode union for RBAC entity resolution
  • Add CONTAINER_REGISTRY match case in EntityRefGQL.entity() resolver using the existing container_registry_loader

Test plan

  • Verify GQL schema includes ContainerRegistry type in EntityNode union
  • Verify EntityRefGQL.entity() resolves CONTAINER_REGISTRY entities correctly
  • CI passes (lint, type check, tests)

Resolves BA-5119


📚 Documentation preview 📚: https://sorna--10093.org.readthedocs.build/en/10093/


📚 Documentation preview 📚: https://sorna-ko--10093.org.readthedocs.build/ko/10093/

Copilot AI review requested due to automatic review settings March 16, 2026 03:11
@github-actions github-actions Bot added size:L 100~500 LoC comp:manager Related to Manager component labels Mar 16, 2026
fregataa added a commit that referenced this pull request Mar 16, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds first-class Strawberry GraphQL node support for container registries and wires it into the RBAC entity-resolution flow so EntityRef.entity can return a ContainerRegistry node.

Changes:

  • Introduce ContainerRegistryGQL (Relay Node) and ContainerRegistryTypeGQL enum under a new api/gql/container_registry/ package.
  • Add ContainerRegistryGQL to the EntityNode union.
  • Implement RBACElementType.CONTAINER_REGISTRY resolution in EntityRefGQL.entity() via container_registry_loader.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

File Description
src/ai/backend/manager/api/gql/rbac/types/entity_node.py Extends EntityNode union to include ContainerRegistryGQL.
src/ai/backend/manager/api/gql/rbac/types/entity.py Adds CONTAINER_REGISTRY match arm in EntityRefGQL.entity() resolver.
src/ai/backend/manager/api/gql/container_registry/types.py New Strawberry Relay node + enum for container registries, with loader-based resolve_nodes.
src/ai/backend/manager/api/gql/container_registry/init.py Exports the new container registry GraphQL types.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/ai/backend/manager/api/gql/container_registry/types.py Outdated
Comment thread src/ai/backend/manager/api/gql/container_registry/types.py Outdated
Comment thread src/ai/backend/manager/api/gql/rbac/types/entity.py
@github-actions github-actions Bot added the area:docs Documentations label Mar 16, 2026
@fregataa fregataa requested a review from ironAiken2 March 16, 2026 04:48
fregataa added a commit that referenced this pull request Mar 17, 2026
@fregataa fregataa force-pushed the feat/BA-5119-container-registry-gql-node branch from 3cc595a to 721ef23 Compare March 17, 2026 04:35
fregataa and others added 9 commits March 17, 2026 14:21
Add ContainerRegistryGQL and ContainerRegistryTypeGQL types for the
GraphQL API. Register ContainerRegistryGQL in the EntityNode union
and resolve it in EntityRefGQL.entity() via container_registry_loader.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add name="ContainerRegistryType" to the strawberry enum decorator
and use `is not None` for password masking to handle empty strings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…aph conflict

The legacy Graphene schema already defines a ContainerRegistry type.
Use ContainerRegistryV2 to avoid INVALID_FIELD_SHARING in federation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: octodog <mu001@lablup.com>
Ensures ContainerRegistryTypeGQL stays in sync with the internal
ContainerRegistryType enum to catch drift early.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…esolver

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@fregataa fregataa force-pushed the feat/BA-5119-container-registry-gql-node branch from 1f5f228 to 5141c04 Compare March 17, 2026 05:22
ironAiken2
ironAiken2 previously approved these changes Mar 17, 2026
Copy link
Copy Markdown
Contributor

@ironAiken2 ironAiken2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

…stry GQL types

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@fregataa fregataa added this to the 26.4 milestone Mar 17, 2026
@fregataa fregataa force-pushed the feat/BA-5119-container-registry-gql-node branch from 5c8a0b6 to 4ab2123 Compare March 17, 2026 05:47
@fregataa fregataa requested a review from ironAiken2 March 17, 2026 05:49
Co-authored-by: octodog <mu001@lablup.com>
Copy link
Copy Markdown
Contributor

@ironAiken2 ironAiken2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fregataa fregataa merged commit a6962af into main Mar 17, 2026
33 checks passed
@fregataa fregataa deleted the feat/BA-5119-container-registry-gql-node branch March 17, 2026 05:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:docs Documentations comp:manager Related to Manager component size:L 100~500 LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants