Commit db98646
authored
fix(oabctl): wait for service drain on delete, retry on create (#1305)
* fix(oabctl): wait for service drain on delete, retry on create
delete: after force-deleting the ECS service, poll until it reaches
INACTIVE status (up to 60s) so a subsequent apply doesn't race
against the draining service.
apply: if create_service hits 'still Draining', retry with 5s backoff
(up to 12 attempts / 60s) instead of failing immediately.
* fix(review): address PR review findings
- delete.rs: treat DescribeServices errors as retry (not gone)
- delete.rs: increase polling interval from 1s to 5s (consistent with wait_for_stable)
- delete.rs: standardize progress output to stderr
- apply.rs: fix dead code — restructure loop so timeout path is reachable
- apply.rs: fix stdout/stderr mixing in retry progress output
* fix(review): use typed error matching, improve polling UX
- apply.rs: Replace fragile string matching on 'still Draining' with
typed error detection via ProvideErrorMetadata (code == InvalidParameterException
+ case-insensitive 'draining' in message). Consistent with ingress.rs pattern.
- apply.rs: Add progress dots during retry sleep for better UX.
- delete.rs: Reorder poll loop to check-before-sleep, avoiding unnecessary
initial 5s delay when service transitions quickly.
- delete.rs: Add progress dots during polling iterations.
Addresses review findings from PR group review.
---------
Co-authored-by: chaodu-agent <chaodu-agent@users.noreply.github.com>1 parent 0f940ca commit db98646
2 files changed
Lines changed: 85 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
524 | 524 | | |
525 | 525 | | |
526 | 526 | | |
527 | | - | |
528 | | - | |
529 | | - | |
530 | | - | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
531 | 571 | | |
532 | 572 | | |
533 | 573 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
91 | 132 | | |
92 | 133 | | |
93 | 134 | | |
| |||
0 commit comments