Commit 88a2f34
feat(BA-5985): allow deployments without health_check via deployment_revisions.health_check_enabled flag
Persist a denormalized boolean on deployment_revisions indicating whether
the revision's model_definition declares service.health_check, computed at
insert time from ModelDefinition.is_health_check_enabled() and backfilled
for existing rows. Manager skips HTTP probing entirely for revisions that
omit the block — routes stay NOT_CHECKED for life and still register with
AppProxy so traffic flows.
- Schema + ORM column + Alembic backfill (handles JSON null vs SQL NULL)
- The boolean is the SQL-level filter; the in-memory RouteData carries the
resolved ModelHealthCheck (or None) joined eagerly from
deployment_revisions.model_definition, so no second per-revision fetch
is needed when initialising health records
- Filter framework: RouteHealthCheckFilter dataclass; handler.health_check_filter()
abstract classmethod; RouteTargetStatuses gains traffic_status
- Observer-dedicated repository entry: get_routes_for_health_observation()
- HealthCheckRouteHandler: skip revisions with health_check disabled
- AppProxySyncRouteHandler: include revisions with health_check disabled
(HEALTHY OR disabled, plus traffic_status=ACTIVE) so unconfigured routes
still register
- RouteData.session_data (replaces session_id field; session_id kept as
property) carries SessionStatus so sync_appproxy can validate live sessions
- sync_appproxy uses input routes' replica_host/replica_port directly (same
pattern as register_routes_now); removes the second route+kernel re-query
via fetch_route_connection_infos and the related condition helper
- Skip routes whose session is not RUNNING/CREATING; error on missing
session_data or replica info
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent b055006 commit 88a2f34
31 files changed
Lines changed: 454 additions & 275 deletions
File tree
- changes
- src/ai/backend
- common
- manager
- data/deployment
- models
- alembic/versions
- deployment_revision
- repositories/deployment
- creators
- db_source
- types
- sokovan/deployment/route
- handlers
- observer
- tests/unit/manager/sokovan/deployment
- executor
- route
- executor
- handlers
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
489 | 489 | | |
490 | 490 | | |
491 | 491 | | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
492 | 496 | | |
493 | 497 | | |
494 | 498 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
253 | | - | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
254 | 258 | | |
255 | 259 | | |
256 | 260 | | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
257 | 276 | | |
258 | 277 | | |
259 | 278 | | |
| |||
Lines changed: 59 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
142 | 150 | | |
143 | 151 | | |
144 | 152 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
76 | 79 | | |
77 | 80 | | |
78 | 81 | | |
| |||
0 commit comments