Commit 08374e7
ci(release): guard run-ID polling against transient gh failures
Follow-up to #1005 (Sourcery review). The monotonic run-ID polling loops
compared `$CANDIDATE` numerically without validating it. If `gh run list`
fails transiently or returns an unexpected payload, CANDIDATE can be empty or
non-numeric and `[ "$CANDIDATE" -gt "$BEFORE_ID" ]` errors with "integer
expression expected" — the exact kind of flake this logic was meant to absorb.
- Tolerate transient `gh` failures mid-poll (`2>/dev/null || echo ""`) and skip
any iteration where CANDIDATE is empty/non-numeric instead of erroring.
- Validate BEFORE_ID up front and fail with a clear message (before dispatch)
if it can't be read.
- Include before/last-seen IDs and wait duration in the failure message to make
race/misconfig diagnosis easier.
Applied to both the desktop (release-cli-dd.yml) and packaging
(release-model.yml) trigger jobs.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 2221f17 commit 08374e7
1 file changed
Lines changed: 36 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
528 | 528 | | |
529 | 529 | | |
530 | 530 | | |
531 | | - | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
532 | 538 | | |
533 | 539 | | |
534 | 540 | | |
535 | 541 | | |
536 | 542 | | |
537 | 543 | | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
538 | 548 | | |
| 549 | + | |
539 | 550 | | |
540 | 551 | | |
541 | 552 | | |
542 | 553 | | |
543 | 554 | | |
544 | | - | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
545 | 560 | | |
546 | 561 | | |
547 | 562 | | |
548 | 563 | | |
549 | 564 | | |
550 | 565 | | |
551 | 566 | | |
552 | | - | |
| 567 | + | |
553 | 568 | | |
554 | 569 | | |
555 | 570 | | |
| |||
596 | 611 | | |
597 | 612 | | |
598 | 613 | | |
599 | | - | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
600 | 621 | | |
601 | 622 | | |
602 | 623 | | |
603 | 624 | | |
604 | 625 | | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
605 | 630 | | |
| 631 | + | |
606 | 632 | | |
607 | 633 | | |
608 | 634 | | |
609 | 635 | | |
610 | 636 | | |
611 | | - | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
612 | 642 | | |
613 | 643 | | |
614 | 644 | | |
615 | 645 | | |
616 | 646 | | |
617 | 647 | | |
618 | 648 | | |
619 | | - | |
| 649 | + | |
620 | 650 | | |
621 | 651 | | |
622 | 652 | | |
| |||
0 commit comments