Skip to content

feat(BA-2820, BA-2821): Implement API layer of model deployment#6394

Merged
HyeockJinKim merged 41 commits into
mainfrom
feat/Implement-deployment-api-layer
Oct 26, 2025
Merged

feat(BA-2820, BA-2821): Implement API layer of model deployment#6394
HyeockJinKim merged 41 commits into
mainfrom
feat/Implement-deployment-api-layer

Conversation

@seedspirit
Copy link
Copy Markdown
Contributor

@seedspirit seedspirit commented Oct 24, 2025

Resolve #6396 #6397 (BA-2820, BA-2821)
Following of #5754 and #5672
The work from #5752 and #5672 was lost during the merge with #5548 due to a force push, so I am creating and submitting a new PR

Checklist: (if applicable)

  • Milestone metadata specifying the target backport version
  • Mention to the original issue
  • Installer updates including:
    • Fixtures for db schema changes
    • New mandatory config options
  • Update of end-to-end CLI integration tests in ai.backend.test
  • API server-client counterparts (e.g., manager API -> client SDK)
  • Test case(s) to:
    • Demonstrate the difference of before/after
    • Demonstrate the flow of abstract/conceptual models with a concrete implementation
  • Documentation
    • Contents in the docs directory
    • docstrings in public interfaces and type annotations

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


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

@seedspirit seedspirit self-assigned this Oct 24, 2025
@seedspirit seedspirit added the skip:changelog Make the action workflow to skip towncrier check label Oct 24, 2025
@github-actions github-actions Bot added size:XL 500~ LoC area:docs Documentations comp:manager Related to Manager component comp:common Related to Common component labels Oct 24, 2025
@seedspirit seedspirit marked this pull request as ready for review October 24, 2025 09:49
Copilot AI review requested due to automatic review settings October 24, 2025 09:49
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

This PR implements the API layer for model deployment functionality, introducing GraphQL endpoints and service methods for managing model deployments, revisions, replicas, and auto-scaling rules. The implementation includes:

  • Service layer methods for deployment lifecycle operations (create, update, destroy, batch operations)
  • GraphQL API definitions for model deployments, revisions, replicas, and auto-scaling rules
  • Data loader registry for efficient batch loading of related entities
  • Exception classes for model deployment domain errors

Reviewed Changes

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

Show a summary per file
File Description
src/ai/backend/manager/services/deployment/service.py Implements service layer methods with mock data returns for deployment operations
src/ai/backend/manager/services/deployment/processors.py Defines processors and protocol for handling deployment actions
src/ai/backend/manager/api/gql/model_deployment/*.py GraphQL type definitions and resolvers for deployments, revisions, replicas
src/ai/backend/manager/api/gql/base.py Helper utilities for pagination, global IDs, and JSON serialization
src/ai/backend/manager/api/gql/data_loader/registry.py DataLoader registry for batch loading entities
src/ai/backend/manager/data/deployment/*.py Data types, creators, and modifiers for deployment entities
src/ai/backend/common/exception.py New exception classes for model deployment errors
docs/manager/graphql-reference/*.graphql Updated GraphQL schema documentation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread src/ai/backend/manager/api/gql/model_deployment/model_replica.py
Comment thread src/ai/backend/manager/api/gql/model_deployment/model_deployment.py
Comment thread src/ai/backend/manager/api/gql/base.py
Comment thread src/ai/backend/manager/models/gql.py Outdated
"""
All available GraphQL queries.
Type name changed from 'Queries' to 'Query' in 25.13.0
Type name changed from 'Queries' to 'Query' in 25.15.0
Copy link

Copilot AI Oct 24, 2025

Choose a reason for hiding this comment

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

The version number mentioned (25.15.0) appears inconsistent with other version numbers in the PR which reference 25.16.0. This should likely be 25.15.0 if it refers to a previous change, or be updated to match the current PR's version.

Suggested change
Type name changed from 'Queries' to 'Query' in 25.15.0
Type name changed from 'Queries' to 'Query' in 25.16.0

Copilot uses AI. Check for mistakes.
@classmethod
def from_dataclass(cls, data: ExtraVFolderMountData) -> "ExtraVFolderMount":
return cls(
# TODO: fix id generation logic

Check notice

Code scanning / devskim

A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note

Suspicious comment
)
active_revision_id: OptionalState[UUID] = field(
default_factory=OptionalState[UUID].nop
) # TODO: Check if TriState is more appropriate

Check notice

Code scanning / devskim

A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note

Suspicious comment
),
network_access=DeploymentNetworkSpec(
open_to_public=True,
url="http://example.com",

Check warning

Code scanning / devskim

An HTTP-based URL without TLS was detected. Warning

Insecure URL
),
network_access=DeploymentNetworkSpec(
open_to_public=True,
url="http://example.com",

Check warning

Code scanning / devskim

An HTTP-based URL without TLS was detected. Warning

Insecure URL
),
network_access=DeploymentNetworkSpec(
open_to_public=True,
url="http://example.com",

Check warning

Code scanning / devskim

An HTTP-based URL without TLS was detected. Warning

Insecure URL
@HyeockJinKim HyeockJinKim removed the skip:changelog Make the action workflow to skip towncrier check label Oct 24, 2025
@seedspirit seedspirit changed the title feat: Implement API layer of model deployment feat(BA-2820, BA-2821): Implement API layer of model deployment Oct 24, 2025
@HyeockJinKim HyeockJinKim added this pull request to the merge queue Oct 26, 2025
Merged via the queue into main with commit 3a51bca Oct 26, 2025
29 of 30 checks passed
@HyeockJinKim HyeockJinKim deleted the feat/Implement-deployment-api-layer branch October 26, 2025 03:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:docs Documentations comp:common Related to Common component comp:manager Related to Manager component size:XL 500~ LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Model Deployment API Layer

4 participants