|
1 | | -"""AppConfigFragment bulk-mutation GQL payload types (BEP-1052 §3).""" |
| 1 | +"""AppConfigFragment bulk-mutation GQL payload types (admin only). |
| 2 | +
|
| 3 | +Self-service `my_*` bulk payloads return recomputed merged AppConfig |
| 4 | +views, so they live in `app_config/types/bulk_payloads.py` to keep the |
| 5 | +import direction `app_config -> app_config_fragment` (one-way) and |
| 6 | +avoid a circular import. |
| 7 | +""" |
2 | 8 |
|
3 | 9 | from __future__ import annotations |
4 | 10 |
|
5 | | -from ai.backend.common.dto.manager.v2.app_config.response import ( |
6 | | - BulkCreateMyAppConfigFragmentsPayload as BulkCreateMyPayloadDTO, |
7 | | -) |
8 | | -from ai.backend.common.dto.manager.v2.app_config.response import ( |
9 | | - BulkUpdateMyAppConfigFragmentsPayload as BulkUpdateMyPayloadDTO, |
10 | | -) |
11 | 11 | from ai.backend.common.dto.manager.v2.app_config_fragment.response import ( |
12 | 12 | AdminBulkCreateAppConfigFragmentsPayload as AdminBulkCreatePayloadDTO, |
13 | 13 | ) |
|
25 | 25 | ) |
26 | 26 | from ai.backend.common.dto.manager.v2.app_config_fragment.types import AppConfigScopeType |
27 | 27 | from ai.backend.common.meta.meta import NEXT_RELEASE_VERSION |
28 | | -from ai.backend.manager.api.gql.app_config.types.node import AppConfigGQL |
29 | 28 | from ai.backend.manager.api.gql.app_config_fragment.types.node import AppConfigFragmentGQL |
30 | 29 | from ai.backend.manager.api.gql.decorators import ( |
31 | 30 | BackendAIGQLMeta, |
@@ -104,33 +103,3 @@ class AdminBulkPurgeAppConfigFragmentsPayloadGQL(PydanticOutputMixin[AdminBulkPu |
104 | 103 | description="Keys of rows actually removed (absent keys are no-oped).", |
105 | 104 | ) |
106 | 105 | failed: list[AppConfigFragmentBulkErrorGQL] = gql_field(description="Per-item failures.") |
107 | | - |
108 | | - |
109 | | -@gql_pydantic_type( |
110 | | - BackendAIGQLMeta( |
111 | | - added_version=NEXT_RELEASE_VERSION, |
112 | | - description="Payload for `bulkCreateMyAppConfigFragments` (recomputed views).", |
113 | | - ), |
114 | | - model=BulkCreateMyPayloadDTO, |
115 | | - name="BulkCreateMyAppConfigFragmentsPayload", |
116 | | -) |
117 | | -class BulkCreateMyAppConfigFragmentsPayloadGQL(PydanticOutputMixin[BulkCreateMyPayloadDTO]): |
118 | | - created: list[AppConfigGQL] = gql_field( |
119 | | - description="Recomputed merged AppConfig views for each created USER fragment.", |
120 | | - ) |
121 | | - failed: list[AppConfigFragmentBulkErrorGQL] = gql_field(description="Per-item failures.") |
122 | | - |
123 | | - |
124 | | -@gql_pydantic_type( |
125 | | - BackendAIGQLMeta( |
126 | | - added_version=NEXT_RELEASE_VERSION, |
127 | | - description="Payload for `bulkUpdateMyAppConfigFragments` (recomputed views).", |
128 | | - ), |
129 | | - model=BulkUpdateMyPayloadDTO, |
130 | | - name="BulkUpdateMyAppConfigFragmentsPayload", |
131 | | -) |
132 | | -class BulkUpdateMyAppConfigFragmentsPayloadGQL(PydanticOutputMixin[BulkUpdateMyPayloadDTO]): |
133 | | - updated: list[AppConfigGQL] = gql_field( |
134 | | - description="Recomputed merged AppConfig views for each updated USER fragment.", |
135 | | - ) |
136 | | - failed: list[AppConfigFragmentBulkErrorGQL] = gql_field(description="Per-item failures.") |
0 commit comments