Commit bbb5a58
committed
fix: Add endpoint_name fallback for orphaned K8s resource cleanup
When deleting endpoints, if the DB record doesn't exist but K8s resources
do (orphaned resources), we now support looking up by endpoint_name as a
fallback when endpoint_id lookup fails. This handles cases where the
endpoint_id passed might actually be an endpoint_name (e.g.,
mcpx-endpoint-{uuid}).
Changes:
- Add _get_deployment_by_endpoint_name_label method to query K8s by endpoint_name
- Update _cleanup_orphaned_k8s_resources to accept optional endpoint_name parameter
- Add fallback logic in DeleteModelEndpointByIdV1UseCase to try endpoint_name
when model_endpoint_id looks like an endpoint_name1 parent 841b6c1 commit bbb5a58
File tree
3 files changed
+63
-2
lines changed- model-engine/model_engine_server
- domain/use_cases
- infra
- gateways/resources
- services
3 files changed
+63
-2
lines changedLines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
609 | 609 | | |
610 | 610 | | |
611 | 611 | | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
612 | 621 | | |
613 | | - | |
| 622 | + | |
614 | 623 | | |
615 | 624 | | |
616 | 625 | | |
| |||
Lines changed: 28 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1191 | 1191 | | |
1192 | 1192 | | |
1193 | 1193 | | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
1194 | 1222 | | |
1195 | 1223 | | |
1196 | 1224 | | |
| |||
Lines changed: 25 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
410 | 410 | | |
411 | 411 | | |
412 | 412 | | |
413 | | - | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
414 | 416 | | |
415 | 417 | | |
416 | 418 | | |
417 | 419 | | |
418 | 420 | | |
419 | 421 | | |
| 422 | + | |
420 | 423 | | |
421 | 424 | | |
422 | 425 | | |
| |||
425 | 428 | | |
426 | 429 | | |
427 | 430 | | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
428 | 452 | | |
429 | 453 | | |
430 | 454 | | |
| |||
0 commit comments