Skip to content

fix(sidecar): enable test_ddog_sidecar_register_app on Windows (APMSP-2356)#1848

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit intomainfrom
leiyks/fix-apmsp-2356-windows-pipe-race
Apr 15, 2026
Merged

fix(sidecar): enable test_ddog_sidecar_register_app on Windows (APMSP-2356)#1848
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit intomainfrom
leiyks/fix-apmsp-2356-windows-pipe-race

Conversation

@Leiyks
Copy link
Copy Markdown
Contributor

@Leiyks Leiyks commented Apr 7, 2026

Problem

`test_ddog_sidecar_register_app` was suppressed on Windows with `#[ignore]` (APMSP-2356) because it was intermittently failing due to a startup race on named pipes: the parent process could call `CreateFileA` before the child sidecar had called `ConnectNamedPipe`, causing `ERROR_PIPE_BUSY`.

Root cause fix (already landed)

The tarpc refactor (#1742) introduced a PID handshake in `SeqpacketConn::connect()`: after `CreateFileA` returns, the client immediately calls `ReadFile` to receive a 4-byte server PID written by the server's `try_accept()`. That blocking `ReadFile` is an implicit readiness barrier — the parent can only proceed once the child has started its Tokio runtime, called `ConnectNamedPipe`, and written the PID. The race condition no longer exists.

The test has been validated to pass 20/20 times in Windows CI.

@Leiyks Leiyks force-pushed the leiyks/fix-apmsp-2356-windows-pipe-race branch from 6bd5773 to ba5ba4b Compare April 7, 2026 15:16
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 7, 2026

Clippy Allow Annotation Report

Comparing clippy allow annotations between branches:

  • Base Branch: origin/main
  • PR Branch: origin/leiyks/fix-apmsp-2356-windows-pipe-race

Summary by Rule

Rule Base Branch PR Branch Change

Annotation Counts by File

File Base Branch PR Branch Change

Annotation Stats by Crate

Crate Base Branch PR Branch Change
clippy-annotation-reporter 5 5 No change (0%)
datadog-ffe-ffi 1 1 No change (0%)
datadog-ipc 21 21 No change (0%)
datadog-live-debugger 6 6 No change (0%)
datadog-live-debugger-ffi 10 10 No change (0%)
datadog-profiling-replayer 4 4 No change (0%)
datadog-remote-config 3 3 No change (0%)
datadog-sidecar 56 56 No change (0%)
libdd-common 10 10 No change (0%)
libdd-common-ffi 12 12 No change (0%)
libdd-data-pipeline 4 4 No change (0%)
libdd-ddsketch 2 2 No change (0%)
libdd-dogstatsd-client 1 1 No change (0%)
libdd-profiling 13 13 No change (0%)
libdd-telemetry 19 19 No change (0%)
libdd-tinybytes 4 4 No change (0%)
libdd-trace-normalization 2 2 No change (0%)
libdd-trace-obfuscation 8 8 No change (0%)
libdd-trace-stats 1 1 No change (0%)
libdd-trace-utils 15 15 No change (0%)
Total 197 197 No change (0%)

About This Report

This report tracks Clippy allow annotations for specific rules, showing how they've changed in this PR. Decreasing the number of these annotations generally improves code quality.

@datadog-prod-us1-4
Copy link
Copy Markdown

datadog-prod-us1-4 Bot commented Apr 7, 2026

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 71.70% (+0.06%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: ee8fb59 | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback!

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.70%. Comparing base (c684b2e) to head (ee8fb59).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1848      +/-   ##
==========================================
+ Coverage   71.64%   71.70%   +0.05%     
==========================================
  Files         430      430              
  Lines       68806    68806              
==========================================
+ Hits        49297    49335      +38     
+ Misses      19509    19471      -38     
Components Coverage Δ
libdd-crashtracker 66.05% <ø> (+0.02%) ⬆️
libdd-crashtracker-ffi 34.47% <ø> (ø)
libdd-alloc 98.77% <ø> (ø)
libdd-data-pipeline 85.47% <ø> (ø)
libdd-data-pipeline-ffi 71.94% <ø> (ø)
libdd-common 79.16% <ø> (ø)
libdd-common-ffi 73.87% <ø> (ø)
libdd-telemetry 65.97% <ø> (+0.03%) ⬆️
libdd-telemetry-ffi 16.75% <ø> (ø)
libdd-dogstatsd-client 82.64% <ø> (ø)
datadog-ipc 76.31% <ø> (+1.47%) ⬆️
libdd-profiling 81.62% <ø> (ø)
libdd-profiling-ffi 64.94% <ø> (ø)
datadog-sidecar 30.53% <ø> (ø)
datdog-sidecar-ffi 13.20% <ø> (ø)
spawn-worker 54.69% <ø> (ø)
libdd-tinybytes 93.16% <ø> (ø)
libdd-trace-normalization 81.71% <ø> (ø)
libdd-trace-obfuscation 87.24% <ø> (ø)
libdd-trace-protobuf 68.25% <ø> (ø)
libdd-trace-utils 89.24% <ø> (ø)
datadog-tracer-flare 86.88% <ø> (ø)
libdd-log 74.69% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dd-octo-sts
Copy link
Copy Markdown
Contributor

dd-octo-sts Bot commented Apr 7, 2026

Artifact Size Benchmark Report

aarch64-alpine-linux-musl
Artifact Baseline Commit Change
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.so 7.63 MB 7.63 MB 0% (0 B) 👌
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.a 83.28 MB 83.28 MB 0% (0 B) 👌
aarch64-unknown-linux-gnu
Artifact Baseline Commit Change
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.a 99.34 MB 99.34 MB 0% (0 B) 👌
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so 10.10 MB 10.10 MB 0% (0 B) 👌
libdatadog-x64-windows
Artifact Baseline Commit Change
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.dll 25.17 MB 25.17 MB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.lib 78.21 KB 78.21 KB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.pdb 184.31 MB 184.32 MB +0% (+8.00 KB) 👌
/libdatadog-x64-windows/debug/static/datadog_profiling_ffi.lib 917.58 MB 917.58 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.dll 7.89 MB 7.89 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.lib 78.21 KB 78.21 KB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.pdb 23.65 MB 23.65 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/static/datadog_profiling_ffi.lib 46.15 MB 46.15 MB 0% (0 B) 👌
libdatadog-x86-windows
Artifact Baseline Commit Change
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.dll 21.65 MB 21.65 MB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.lib 79.42 KB 79.42 KB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.pdb 188.46 MB 188.47 MB +0% (+8.00 KB) 👌
/libdatadog-x86-windows/debug/static/datadog_profiling_ffi.lib 902.94 MB 902.94 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.dll 6.12 MB 6.12 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.lib 79.42 KB 79.42 KB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.pdb 25.34 MB 25.34 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/static/datadog_profiling_ffi.lib 43.64 MB 43.64 MB 0% (0 B) 👌
x86_64-alpine-linux-musl
Artifact Baseline Commit Change
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.a 74.39 MB 74.39 MB 0% (0 B) 👌
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.so 8.52 MB 8.52 MB 0% (0 B) 👌
x86_64-unknown-linux-gnu
Artifact Baseline Commit Change
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.a 91.72 MB 91.72 MB 0% (0 B) 👌
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so 10.19 MB 10.19 MB 0% (0 B) 👌

@Leiyks Leiyks changed the title fix(sidecar): retry connect on Windows to fix named-pipe startup race (APMSP-2356) fix(ipc): replace retry workaround with WaitNamedPipe + readiness signal (APMSP-2356) Apr 8, 2026
@Leiyks Leiyks force-pushed the leiyks/fix-apmsp-2356-windows-pipe-race branch from 485fe3a to a77297a Compare April 13, 2026 14:50
@Leiyks Leiyks force-pushed the leiyks/fix-apmsp-2356-windows-pipe-race branch from 2c29f5d to b98b4f9 Compare April 13, 2026 16:08
@Leiyks Leiyks changed the title fix(ipc): replace retry workaround with WaitNamedPipe + readiness signal (APMSP-2356) fix(sidecar): enable test_ddog_sidecar_register_app on Windows (APMSP-2356) Apr 13, 2026
@Leiyks Leiyks force-pushed the leiyks/fix-apmsp-2356-windows-pipe-race branch from b98b4f9 to 64185b0 Compare April 14, 2026 11:59
APMSP-2356: the tarpc refactor (#1742) introduced a PID handshake in
SeqpacketConn::connect() — the blocking ReadFile waiting for the server's
4-byte PID acts as an implicit readiness barrier, eliminating the startup
race that caused intermittent failures.
@Leiyks Leiyks force-pushed the leiyks/fix-apmsp-2356-windows-pipe-race branch from f990d6b to ee8fb59 Compare April 15, 2026 11:15
@Leiyks Leiyks marked this pull request as ready for review April 15, 2026 11:30
@Leiyks Leiyks requested review from a team as code owners April 15, 2026 11:30
@Leiyks
Copy link
Copy Markdown
Contributor Author

Leiyks commented Apr 15, 2026

/merge

@gh-worker-devflow-routing-ef8351
Copy link
Copy Markdown

gh-worker-devflow-routing-ef8351 Bot commented Apr 15, 2026

View all feedbacks in Devflow UI.

2026-04-15 13:15:06 UTC ℹ️ Start processing command /merge


2026-04-15 13:15:14 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in main is approximately 43m (p90).


2026-04-15 13:49:00 UTC ℹ️ MergeQueue: This merge request was merged

@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot merged commit d1aa313 into main Apr 15, 2026
94 checks passed
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot deleted the leiyks/fix-apmsp-2356-windows-pipe-race branch April 15, 2026 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants