fix(envoy): require runner config for ws conn#4612
Conversation
e946974 to
288d5f1
Compare
f4342a7 to
b45c190
Compare
PR Review:
|
PR Review: fix(envoy): require runner config for ws connSummaryThis PR changes init_conn in the envoy WebSocket connection path to fail explicitly with NoRunnerConfig when no runner config exists for the requested pool, instead of silently auto-creating a default "normal" config via ensure_normal_if_missing. It also fixes a pre-existing bug where is_serverless was always hardcoded to false on the Conn struct. Correctness: is_serverless Bug FixThe fix to is_serverless is correct. Previously the field was hardcoded to false; it is now correctly derived from whether serverless_drain_grace_period is Some. This is a real bug fix. Concerns1. Cache race window (bypass_cache: false) The new gate check uses bypass_cache: false, meaning the 5-second TTL cache applies. If a runner config is created and an envoy connects within that window, the cache may return a stale miss, causing a spurious NoRunnerConfig error. The old ensure_normal_if_missing was an upsert and was cache-insensitive. The strict validation path should arguably use bypass_cache: true, or at minimum include a comment acknowledging this tradeoff. 2. Missing trailing newline in artifact file engine/artifacts/errors/ws.no_runner_config.json appears to be missing a trailing newline, unlike sibling artifact files (e.g., ws.eviction.json). Minor POSIX hygiene issue. 3. {pool_name:?} debug format in error message The error message uses {pool_name:?} (debug/quoted format), which emits the pool name surrounded by quotes in output (e.g., "my-pool"). Other parameterized WsError variants use display format ({0}). Confirm this is intentional. Non-issues
Overall the change is clean and focused. The is_serverless fix is a genuine correctness improvement. The cache race window is the most substantive concern worth addressing before merging. |
288d5f1 to
1671d04
Compare
b45c190 to
d9003fa
Compare
d9003fa to
fad7632
Compare
1671d04 to
5671fec
Compare
5671fec to
6b3850b
Compare
fad7632 to
744ddb3
Compare
Merge activity
|
6b3850b to
a308ebc
Compare

Description
Please include a summary of the changes and the related issue. Please also include relevant motivation and context.
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
Checklist: