Commit 0686ecc
fix(preprod): Add timeout to build upload polling loop (#3118)
The polling loop in `build upload` could infinite loop when the server
returns a pending state (`Created` or `Assembling`) without ever
providing an `artifact_url`. The loop only exited on:
- `artifact_url` being set (success)
- `state == Error` (error bail)
- `state.is_finished()` which only matches `Ok` or `Error`
States like `Created`, `Assembling`, and `NotFound` are NOT
`is_finished()`, causing infinite polling if the server misbehaves.
This adds a 5-minute timeout (`DEFAULT_MAX_WAIT`) and 1-second sleep
(`ASSEMBLE_POLL_INTERVAL`) between iterations, matching the existing
pattern in `src/utils/chunks/upload.rs:poll_assemble`.
Fixes #2942
Closes EME-626
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 9d16bb3 commit 0686ecc
2 files changed
+19
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
| |||
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| 18 | + | |
16 | 19 | | |
17 | 20 | | |
18 | 21 | | |
19 | 22 | | |
20 | 23 | | |
21 | 24 | | |
22 | | - | |
| 25 | + | |
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
| |||
654 | 657 | | |
655 | 658 | | |
656 | 659 | | |
657 | | - | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
658 | 663 | | |
659 | 664 | | |
660 | 665 | | |
| |||
685 | 690 | | |
686 | 691 | | |
687 | 692 | | |
688 | | - | |
| 693 | + | |
689 | 694 | | |
690 | 695 | | |
691 | 696 | | |
692 | 697 | | |
693 | 698 | | |
694 | | - | |
695 | 699 | | |
696 | | - | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
697 | 710 | | |
698 | 711 | | |
699 | 712 | | |
| |||
0 commit comments