[Fix] Previews time out immediately after environment setup - #2140
[Fix] Previews time out immediately after environment setup#2140roomote-roomote[bot] wants to merge 4 commits into
Conversation
|
Updated the readiness policy in d838e91. Readiness now uses the longest successfully launched detached command’s configured timeout (10 minutes by default), capped at the one-hour task limit; ports are checked concurrently, each HTTP attempt is canceled after at most five seconds, failures retry after one second, and the latest probe diagnostic is logged every minute and included in the terminal warning with the setup-log location. A preview that becomes ready after 90 seconds is covered explicitly. Focused tests (9), the full worker suite (1,845), static checks, pre-push checks, and the refreshed GitHub CI run all pass. No additional visual proof was attempted after the earlier proof-capture timeout; these are non-visual worker lifecycle changes. |
What changed
//, preventing readiness probes from targeting another hostWhy this change was made
Detached setup commands were marked complete after a two-second process-survival check even when their HTTP servers were still compiling or had not bound their ports. That allowed preview requests to arrive during startup and fail or time out.
The database test suite also ran integration files concurrently against one shared database; file-level fixture cleanup could delete rows another test still needed, producing nondeterministic CI failures.
Impact
Environment setup now settles cleanly only after configured previews accept HTTP requests, without allowing configured paths to redirect the probe off loopback. The default readiness budget is 10 minutes rather than one minute, explicit command timeouts are honored up to the one-hour task limit, and each HTTP attempt remains capped at five seconds. Genuinely failed previews produce periodic diagnostics and a terminal warning instead of hanging setup indefinitely. Database tests take longer but no longer corrupt each other's shared fixtures during parallel file execution.