Commit 7d64993
refactor(BA-5982): drop list_active_deployments action; reuse search_deployments
Adding a dedicated read-side action for the bulk-refresh pre-fetch was
unnecessary — ``SearchDeploymentsAction`` already returns
``ModelDeploymentData`` with ``revision`` populated to the current
revision (via ``_convert_deployment_info_to_data``). Reuse it directly:
- Delete ``actions/list_active_deployments_with_current_revision.py``
and the matching service method, processor, and spec entry.
- ``DeploymentRevisionAdapter.admin_refresh_deployment_revisions`` now
builds a ``BatchQuerier`` with
``DeploymentConditions.by_lifecycle_stages(EndpointLifecycle.active_states())``,
calls ``processor.search_deployments``, and iterates the resulting
``ModelDeploymentData`` list — skipping entries whose ``revision``
is ``None`` (deployments that only have a deploying revision and no
current one to project from).
Conversion still happens entirely in the adapter; ``creators_by_id``
is then handed to the existing batch ``RefreshDeploymentRevisionsAction``.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent f8e7cf4 commit 7d64993
4 files changed
Lines changed: 27 additions & 109 deletions
File tree
- src/ai/backend/manager
- api/adapters/deployment_revision
- services/deployment
- actions
Lines changed: 27 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
28 | | - | |
29 | | - | |
30 | | - | |
| 29 | + | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
34 | 37 | | |
35 | 38 | | |
36 | 39 | | |
| |||
45 | 48 | | |
46 | 49 | | |
47 | 50 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
54 | 57 | | |
55 | | - | |
56 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
57 | 66 | | |
58 | 67 | | |
59 | 68 | | |
60 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
61 | 74 | | |
62 | | - | |
| 75 | + | |
63 | 76 | | |
64 | 77 | | |
65 | 78 | | |
| |||
68 | 81 | | |
69 | 82 | | |
70 | 83 | | |
71 | | - | |
| 84 | + | |
72 | 85 | | |
73 | 86 | | |
74 | 87 | | |
| |||
Lines changed: 0 additions & 37 deletions
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | 85 | | |
90 | 86 | | |
91 | 87 | | |
| |||
187 | 183 | | |
188 | 184 | | |
189 | 185 | | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | 186 | | |
195 | 187 | | |
196 | 188 | | |
| |||
281 | 273 | | |
282 | 274 | | |
283 | 275 | | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | 276 | | |
288 | 277 | | |
289 | 278 | | |
| |||
347 | 336 | | |
348 | 337 | | |
349 | 338 | | |
350 | | - | |
351 | 339 | | |
352 | 340 | | |
353 | 341 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
46 | 44 | | |
47 | 45 | | |
48 | 46 | | |
| |||
129 | 127 | | |
130 | 128 | | |
131 | 129 | | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | 130 | | |
137 | 131 | | |
138 | 132 | | |
| |||
612 | 606 | | |
613 | 607 | | |
614 | 608 | | |
615 | | - | |
616 | | - | |
617 | | - | |
618 | | - | |
619 | | - | |
620 | | - | |
621 | | - | |
622 | | - | |
623 | | - | |
624 | | - | |
625 | | - | |
626 | | - | |
627 | | - | |
628 | | - | |
629 | | - | |
630 | | - | |
631 | | - | |
632 | | - | |
633 | | - | |
634 | | - | |
635 | | - | |
636 | | - | |
637 | | - | |
638 | | - | |
639 | | - | |
640 | | - | |
641 | | - | |
642 | | - | |
643 | | - | |
644 | | - | |
645 | | - | |
646 | | - | |
647 | | - | |
648 | | - | |
649 | | - | |
650 | | - | |
651 | | - | |
652 | | - | |
653 | | - | |
654 | | - | |
655 | 609 | | |
656 | 610 | | |
657 | 611 | | |
| |||
0 commit comments