Skip to content

Commit 49976dd

Browse files
jopemachineclaude
andcommitted
refactor(BA-5830): propagate my_bulk_* rename + final BEP cleanup
Carry the BA-5836 / BA-5829 rename (`bulk_create_my` → `my_bulk_create`, `bulk_update_my` → `my_bulk_update`) through the REST v2 surface, the GQL schema, and the dumped GraphQL schema artefacts. Strip the remaining `BEP-1052 §X` references from the REST v2 handlers / registries, the legacy AppConfig drop migration, and the GraphQL schema dump comments. Only the news fragments retain the BEP wording (intentional). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 49ae42a commit 49976dd

16 files changed

Lines changed: 85 additions & 90 deletions

File tree

docs/manager/graphql-reference/supergraph.graphql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1182,7 +1182,7 @@ enum AppConfigOrderField
11821182
NAME @join__enumValue(graph: STRAWBERRY)
11831183
}
11841184

1185-
"""Added in UNRELEASED. Scoped app-config policy (BEP-1052 §1)."""
1185+
"""Added in UNRELEASED. Scoped app-config policy."""
11861186
type AppConfigPolicy implements Node
11871187
@join__implements(graph: STRAWBERRY, interface: "Node")
11881188
@join__type(graph: STRAWBERRY)

docs/manager/graphql-reference/v2-schema.graphql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,7 @@ enum AppConfigOrderField {
848848
NAME
849849
}
850850

851-
"""Added in UNRELEASED. Scoped app-config policy (BEP-1052 §1)."""
851+
"""Added in UNRELEASED. Scoped app-config policy."""
852852
type AppConfigPolicy implements Node {
853853
"""The Globally Unique ID of this object"""
854854
id: ID!

src/ai/backend/common/dto/manager/v2/app_config/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
)
1212
from .response import (
1313
AppConfigNode,
14-
BulkCreateMyAppConfigFragmentsPayload,
15-
BulkUpdateMyAppConfigFragmentsPayload,
1614
GetUserAppConfigPayload,
15+
MyBulkCreateAppConfigFragmentsPayload,
16+
MyBulkUpdateAppConfigFragmentsPayload,
1717
SearchAppConfigsPayload,
1818
)
1919
from .types import (
@@ -28,8 +28,8 @@
2828
"AppConfigOrder",
2929
"AppConfigOrderField",
3030
"AppConfigScopeType",
31-
"BulkCreateMyAppConfigFragmentsPayload",
32-
"BulkUpdateMyAppConfigFragmentsPayload",
31+
"MyBulkCreateAppConfigFragmentsPayload",
32+
"MyBulkUpdateAppConfigFragmentsPayload",
3333
"GetUserAppConfigInput",
3434
"GetUserAppConfigPayload",
3535
"OrderDirection",

src/ai/backend/common/dto/manager/v2/app_config/response.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717

1818
__all__ = (
1919
"AppConfigNode",
20-
"BulkCreateMyAppConfigFragmentsPayload",
21-
"BulkUpdateMyAppConfigFragmentsPayload",
20+
"MyBulkCreateAppConfigFragmentsPayload",
21+
"MyBulkUpdateAppConfigFragmentsPayload",
2222
"GetUserAppConfigPayload",
2323
"SearchAppConfigsPayload",
2424
)
@@ -62,8 +62,8 @@ class SearchAppConfigsPayload(BaseResponseModel):
6262
has_previous_page: bool = Field(default=False, description="Whether there is a previous page.")
6363

6464

65-
class BulkCreateMyAppConfigFragmentsPayload(BaseResponseModel):
66-
"""Payload for `bulkCreateMyAppConfigFragments`.
65+
class MyBulkCreateAppConfigFragmentsPayload(BaseResponseModel):
66+
"""Payload for `myBulkCreateAppConfigFragments`.
6767
6868
Each successfully created row produces a recomputed merged
6969
`AppConfigNode`; failures are collected per-item.
@@ -75,8 +75,8 @@ class BulkCreateMyAppConfigFragmentsPayload(BaseResponseModel):
7575
failed: list[AppConfigFragmentBulkError] = Field(description="Per-item failures.")
7676

7777

78-
class BulkUpdateMyAppConfigFragmentsPayload(BaseResponseModel):
79-
"""Payload for `bulkUpdateMyAppConfigFragments`."""
78+
class MyBulkUpdateAppConfigFragmentsPayload(BaseResponseModel):
79+
"""Payload for `myBulkUpdateAppConfigFragments`."""
8080

8181
updated: list[AppConfigNode] = Field(
8282
description="Recomputed merged AppConfig views for each updated USER fragment.",

src/ai/backend/manager/api/adapters/app_config.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -154,14 +154,14 @@ async def admin_search_app_configs(
154154
# reasons travel back through the per-item `failed` list.
155155

156156
async def my_bulk_create(
157-
self, input: BulkCreateMyAppConfigFragmentsInput
158-
) -> BulkCreateMyAppConfigFragmentsPayload:
157+
self, input: MyBulkCreateAppConfigFragmentsInput
158+
) -> MyBulkCreateAppConfigFragmentsPayload:
159159
items = [
160160
MyAppConfigFragmentBulkItem(name=item.name, config=dict(item.config))
161161
for item in input.items
162162
]
163-
wrapper = await self._processors.app_config_fragment.bulk_create_my.wait_for_complete(
164-
BulkCreateMyAppConfigFragmentsAction(entity_ids=[], items=items)
163+
wrapper = await self._processors.app_config_fragment.my_bulk_create.wait_for_complete(
164+
MyBulkCreateAppConfigFragmentsAction(entity_ids=[], items=items)
165165
)
166166
result = wrapper.result
167167
return MyBulkCreateAppConfigFragmentsPayload(
@@ -170,14 +170,14 @@ async def my_bulk_create(
170170
)
171171

172172
async def my_bulk_update(
173-
self, input: BulkUpdateMyAppConfigFragmentsInput
174-
) -> BulkUpdateMyAppConfigFragmentsPayload:
173+
self, input: MyBulkUpdateAppConfigFragmentsInput
174+
) -> MyBulkUpdateAppConfigFragmentsPayload:
175175
items = [
176176
MyAppConfigFragmentBulkItem(name=item.name, config=dict(item.config))
177177
for item in input.items
178178
]
179-
wrapper = await self._processors.app_config_fragment.bulk_update_my.wait_for_complete(
180-
BulkUpdateMyAppConfigFragmentsAction(entity_ids=[], items=items)
179+
wrapper = await self._processors.app_config_fragment.my_bulk_update.wait_for_complete(
180+
MyBulkUpdateAppConfigFragmentsAction(entity_ids=[], items=items)
181181
)
182182
result = wrapper.result
183183
return MyBulkUpdateAppConfigFragmentsPayload(

src/ai/backend/manager/api/adapters/app_config_fragment.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@
5252
from ai.backend.common.dto.manager.v2.app_config_fragment.types import (
5353
AppConfigScopeType as DTOAppConfigScopeType,
5454
)
55-
from ai.backend.common.dto.manager.v2.app_config_fragment.types import OrderDirection
56-
from ai.backend.common.exception import UnreachableError
5755
from ai.backend.manager.api.adapter_options.pagination.pagination import PaginationSpec
5856
from ai.backend.manager.data.app_config.types import AppConfigData
5957
from ai.backend.manager.data.app_config_fragment.bulk_types import (

src/ai/backend/manager/api/gql/app_config/types/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from .bulk_payloads import (
2-
BulkCreateMyAppConfigFragmentsPayloadGQL,
3-
BulkUpdateMyAppConfigFragmentsPayloadGQL,
2+
MyBulkCreateAppConfigFragmentsPayloadGQL,
3+
MyBulkUpdateAppConfigFragmentsPayloadGQL,
44
)
55
from .filters import (
66
AppConfigFilterGQL,
@@ -14,6 +14,6 @@
1414
"AppConfigGQL",
1515
"AppConfigOrderByGQL",
1616
"AppConfigOrderFieldGQL",
17-
"BulkCreateMyAppConfigFragmentsPayloadGQL",
18-
"BulkUpdateMyAppConfigFragmentsPayloadGQL",
17+
"MyBulkCreateAppConfigFragmentsPayloadGQL",
18+
"MyBulkUpdateAppConfigFragmentsPayloadGQL",
1919
]

src/ai/backend/manager/api/gql/app_config/types/bulk_payloads.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
from __future__ import annotations
44

55
from ai.backend.common.dto.manager.v2.app_config.response import (
6-
BulkCreateMyAppConfigFragmentsPayload as BulkCreateMyPayloadDTO,
6+
MyBulkCreateAppConfigFragmentsPayload as MyBulkCreatePayloadDTO,
77
)
88
from ai.backend.common.dto.manager.v2.app_config.response import (
9-
BulkUpdateMyAppConfigFragmentsPayload as BulkUpdateMyPayloadDTO,
9+
MyBulkUpdateAppConfigFragmentsPayload as MyBulkUpdatePayloadDTO,
1010
)
1111
from ai.backend.common.meta.meta import NEXT_RELEASE_VERSION
1212
from ai.backend.manager.api.gql.app_config.types.node import AppConfigGQL
@@ -26,10 +26,10 @@
2626
added_version=NEXT_RELEASE_VERSION,
2727
description="Payload for `myBulkCreateAppConfigFragments` (recomputed views).",
2828
),
29-
model=BulkCreateMyPayloadDTO,
30-
name="BulkCreateMyAppConfigFragmentsPayload",
29+
model=MyBulkCreatePayloadDTO,
30+
name="MyBulkCreateAppConfigFragmentsPayload",
3131
)
32-
class BulkCreateMyAppConfigFragmentsPayloadGQL(PydanticOutputMixin[BulkCreateMyPayloadDTO]):
32+
class MyBulkCreateAppConfigFragmentsPayloadGQL(PydanticOutputMixin[MyBulkCreatePayloadDTO]):
3333
created: list[AppConfigGQL] = gql_field(
3434
description="Recomputed merged AppConfig views for each created USER fragment.",
3535
)
@@ -43,10 +43,10 @@ class BulkCreateMyAppConfigFragmentsPayloadGQL(PydanticOutputMixin[BulkCreateMyP
4343
added_version=NEXT_RELEASE_VERSION,
4444
description="Payload for `myBulkUpdateAppConfigFragments` (recomputed views).",
4545
),
46-
model=BulkUpdateMyPayloadDTO,
47-
name="BulkUpdateMyAppConfigFragmentsPayload",
46+
model=MyBulkUpdatePayloadDTO,
47+
name="MyBulkUpdateAppConfigFragmentsPayload",
4848
)
49-
class BulkUpdateMyAppConfigFragmentsPayloadGQL(PydanticOutputMixin[BulkUpdateMyPayloadDTO]):
49+
class MyBulkUpdateAppConfigFragmentsPayloadGQL(PydanticOutputMixin[MyBulkUpdatePayloadDTO]):
5050
updated: list[AppConfigGQL] = gql_field(
5151
description="Recomputed merged AppConfig views for each updated USER fragment.",
5252
)

src/ai/backend/manager/api/gql/app_config_fragment/__init__.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@
66
admin_bulk_purge_app_config_fragments,
77
admin_bulk_update_app_config_fragments,
88
app_config_fragment,
9-
bulk_create_my_app_config_fragments,
10-
bulk_update_my_app_config_fragments,
11-
scoped_app_config_fragments,
9+
my_bulk_create_app_config_fragments,
10+
my_bulk_update_app_config_fragments,
1211
)
1312
from .types import (
1413
AppConfigFragmentFilterGQL,
@@ -28,8 +27,8 @@
2827
"admin_bulk_create_app_config_fragments",
2928
"admin_bulk_update_app_config_fragments",
3029
"admin_bulk_purge_app_config_fragments",
31-
"bulk_create_my_app_config_fragments",
32-
"bulk_update_my_app_config_fragments",
30+
"my_bulk_create_app_config_fragments",
31+
"my_bulk_update_app_config_fragments",
3332
# Types
3433
"AppConfigFragmentGQL",
3534
"AppConfigScopeTypeGQL",

src/ai/backend/manager/api/gql/app_config_fragment/resolver/__init__.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
admin_bulk_create_app_config_fragments,
33
admin_bulk_purge_app_config_fragments,
44
admin_bulk_update_app_config_fragments,
5-
bulk_create_my_app_config_fragments,
6-
bulk_update_my_app_config_fragments,
5+
my_bulk_create_app_config_fragments,
6+
my_bulk_update_app_config_fragments,
77
)
88
from .query import (
99
admin_app_config_fragments,
@@ -17,7 +17,6 @@
1717
"admin_bulk_purge_app_config_fragments",
1818
"admin_bulk_update_app_config_fragments",
1919
"app_config_fragment",
20-
"bulk_create_my_app_config_fragments",
21-
"bulk_update_my_app_config_fragments",
22-
"scoped_app_config_fragments",
20+
"my_bulk_create_app_config_fragments",
21+
"my_bulk_update_app_config_fragments",
2322
]

0 commit comments

Comments
 (0)