Commit ba5ba4b
committed
fix(sidecar): retry connect on Windows to fix startup race in named-pipe IPC
On Windows, a named-pipe client's CreateFileA fails immediately if the
server has not yet called ConnectNamedPipe — there is no kernel-level
connection backlog as Unix domain sockets provide. After daemonize()
returns the child process exists but its Tokio runtime may not have
entered the accept loop yet, causing test_ddog_sidecar_register_app to
fail intermittently.
Add connect_to_sidecar_with_retry() that retries the connection with
exponential back-off (1 ms → 100 ms cap, up to 20 attempts ≈ 1.9 s
total) when just_spawned is true. On non-Windows platforms is_pipe_not_ready()
always returns false so the helper is a single-attempt no-op there.
Remove the APMSP-2356 ignore annotation from test_ddog_sidecar_register_app
so the fix is validated in CI.1 parent 2cdcdcb commit ba5ba4b
File tree
2 files changed
+49
-9
lines changed- datadog-sidecar-ffi/tests
- datadog-sidecar/src
2 files changed
+49
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | 71 | | |
76 | 72 | | |
77 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
277 | 321 | | |
278 | 322 | | |
279 | 323 | | |
| |||
289 | 333 | | |
290 | 334 | | |
291 | 335 | | |
| 336 | + | |
292 | 337 | | |
293 | 338 | | |
294 | 339 | | |
| 340 | + | |
295 | 341 | | |
296 | 342 | | |
297 | 343 | | |
298 | 344 | | |
299 | 345 | | |
300 | 346 | | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
306 | 350 | | |
0 commit comments