- Notifications
You must be signed in to change notification settings - Fork1.1k
Commit8991a59
authored
fix: wait for initial update before marking API as ready (#21363)
_Disclaimer: investigation done by Claude Opus 4.5_Closescoder/internal#1173Closescoder/internal#1174The agent containers API is only marked "ready" under this condition in`agent/agentcontainers/api.go`:```go// For now, all endpoints require the initial update to be done.// If we want to allow some endpoints to be available before// the initial update, we can enable this per-route.```However, what was actually being checked for was that the _init_ wasdone, not the _initial update_.In agent/agentcontainers/api.go, the `Start()` method: 1. Called `Init()` which closed `initDone` <--- API marked ready here 2. Then launched `go api.updaterLoop()` asynchronously3. `updaterLoop()` performs the initial container update <--- shouldhave marked it ready after thisThis PR fixes these semantics to avoid the race which was causing theabove two flakes.Signed-off-by: Danny Kopping <danny@coder.com>1 parent72e478e commit8991a59
1 file changed
+12
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
| 91 | + | |
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
| |||
325 | 326 | | |
326 | 327 | | |
327 | 328 | | |
328 | | - | |
| 329 | + | |
329 | 330 | | |
330 | 331 | | |
331 | 332 | | |
| |||
379 | 380 | | |
380 | 381 | | |
381 | 382 | | |
382 | | - | |
383 | | - | |
| 383 | + | |
| 384 | + | |
384 | 385 | | |
385 | 386 | | |
386 | 387 | | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
| 388 | + | |
392 | 389 | | |
393 | | - | |
394 | 390 | | |
395 | | - | |
| 391 | + | |
396 | 392 | | |
397 | 393 | | |
398 | 394 | | |
| |||
651 | 647 | | |
652 | 648 | | |
653 | 649 | | |
| 650 | + | |
654 | 651 | | |
655 | 652 | | |
656 | 653 | | |
| |||
715 | 712 | | |
716 | 713 | | |
717 | 714 | | |
718 | | - | |
| 715 | + | |
719 | 716 | | |
720 | 717 | | |
721 | 718 | | |
| |||
726 | 723 | | |
727 | 724 | | |
728 | 725 | | |
729 | | - | |
730 | | - | |
| 726 | + | |
| 727 | + | |
731 | 728 | | |
732 | 729 | | |
733 | 730 | | |
| |||
736 | 733 | | |
737 | 734 | | |
738 | 735 | | |
739 | | - | |
| 736 | + | |
740 | 737 | | |
741 | 738 | | |
742 | 739 | | |
| |||
0 commit comments
Comments
(0)