-
Notifications
You must be signed in to change notification settings - Fork 165
refactor(BA-3532): Apply action-processor pattern in container registry deletion API #7559
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors the container registry deletion API to follow the action-processor pattern, replacing direct database operations in GraphQL mutations with a structured service layer approach. This improves code organization, maintainability, and consistency with other container registry operations.
Key changes:
- Introduced
DeleteContainerRegistryActionand associated components following the action-processor pattern - Migrated GraphQL mutations (both v1 and v2) from direct database operations to use the new action processor
- Added comprehensive test coverage for the deletion functionality
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/ai/backend/manager/services/container_registry/actions/delete_container_registry.py |
New action definition for container registry deletion with action and result dataclasses |
src/ai/backend/manager/services/container_registry/service.py |
Added delete_container_registry service method that delegates to repository |
src/ai/backend/manager/services/container_registry/processors.py |
Registered delete action processor and added to supported actions list |
src/ai/backend/manager/repositories/container_registry/repository.py |
Implemented delete_registry repository method with proper error handling |
src/ai/backend/manager/models/gql_models/container_registry.py |
Refactored DeleteContainerRegistryNode mutation to use action-processor pattern |
src/ai/backend/manager/models/gql_models/container_registry_v2.py |
Refactored DeleteContainerRegistryNodeV2 mutation to use action-processor pattern |
tests/manager/repositories/container_registry/test_container_registry_repository.py |
Added test fixtures and three test cases for delete functionality |
changes/7559.enhance.md |
Changelog entry documenting the enhancement |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/ai/backend/manager/services/container_registry/actions/delete_container_registry.py
Show resolved
Hide resolved
src/ai/backend/manager/repositories/container_registry/repository.py
Outdated
Show resolved
Hide resolved
2617eef to
53ceca5
Compare
53ceca5 to
5299b46
Compare
|
Please check test failure (In merge queue) @seedspirit |
5299b46 to
25fcc52
Compare
resolves #7555 (BA-3532)
Checklist: (if applicable)
ai.backend.testdocsdirectory