Skip to content

Conversation

@NachoEchevarria
Copy link
Collaborator

@NachoEchevarria NachoEchevarria commented Dec 26, 2025

Summary of changes

Add retry logic with exponential backoff to the DownloadLibDatadog build step for Windows to handle transient network failures when vcpkg downloads dependencies from GitHub.

Reason for change

CI builds occasionally fail with 504 Gateway Timeout errors when vcpkg attempts to download tools like 7zr.exe from GitHub during the DownloadLibDatadog step. These transient failures cause unnecessary build failures.

Example error from CI:
error: https://github.com/ip7z/7zip/releases/download/25.01/7zr.exe: failed: status code 504

Implementation details

  • Wrap the vcpkg install command in a retry loop (max 3 attempts)
  • Apply exponential backoff between retries: 5s, 10s, 15s
  • Add logging to track attempt numbers and failures
  • Re-throw exception if all retries are exhausted
  • Pattern matches existing DownloadWafVersion retry implementation

Test coverage

Existing CI tests will validate the change. The retry mechanism only activates on failures, so successful builds are unaffected.

Other details

@github-actions github-actions bot added the area:builds project files, build scripts, pipelines, versioning, releases, packages label Dec 26, 2025
@dd-trace-dotnet-ci-bot
Copy link

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (8014) and master.

✅ No regressions detected - check the details below

Full Metrics Comparison

FakeDbCommand

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration68.39 ± (68.36 - 68.63) ms68.53 ± (68.49 - 68.73) ms+0.2%✅⬆️
.NET Framework 4.8 - Bailout
duration72.14 ± (72.10 - 72.38) ms72.41 ± (72.38 - 72.61) ms+0.4%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1000.15 ± (1002.77 - 1008.87) ms1003.09 ± (1005.75 - 1011.80) ms+0.3%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms21.91 ± (21.88 - 21.95) ms22.03 ± (21.99 - 22.07) ms+0.5%✅⬆️
process.time_to_main_ms78.58 ± (78.44 - 78.72) ms79.17 ± (79.01 - 79.32) ms+0.7%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.91 ± (10.90 - 10.91) MB10.94 ± (10.94 - 10.95) MB+0.3%✅⬆️
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms21.82 ± (21.81 - 21.84) ms21.92 ± (21.89 - 21.94) ms+0.4%✅⬆️
process.time_to_main_ms79.92 ± (79.83 - 80.01) ms80.29 ± (80.19 - 80.39) ms+0.5%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.96 ± (10.96 - 10.97) MB10.96 ± (10.95 - 10.96) MB-0.0%
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms248.95 ± (245.05 - 252.85) ms243.64 ± (237.54 - 249.75) ms-2.1%
process.time_to_main_ms469.67 ± (469.18 - 470.17) ms469.91 ± (469.32 - 470.51) ms+0.1%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed48.18 ± (48.15 - 48.20) MB48.15 ± (48.11 - 48.19) MB-0.1%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.2%
.NET 6 - Baseline
process.internal_duration_ms20.56 ± (20.53 - 20.59) ms20.70 ± (20.67 - 20.72) ms+0.7%✅⬆️
process.time_to_main_ms67.97 ± (67.85 - 68.10) ms68.57 ± (68.45 - 68.69) ms+0.9%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.59 ± (10.59 - 10.60) MB10.65 ± (10.64 - 10.65) MB+0.5%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms20.57 ± (20.55 - 20.59) ms20.66 ± (20.63 - 20.69) ms+0.5%✅⬆️
process.time_to_main_ms68.98 ± (68.92 - 69.03) ms69.63 ± (69.53 - 69.73) ms+0.9%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.66 ± (10.65 - 10.66) MB10.74 ± (10.73 - 10.74) MB+0.7%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms241.61 ± (238.90 - 244.31) ms248.03 ± (245.98 - 250.08) ms+2.7%✅⬆️
process.time_to_main_ms438.41 ± (438.04 - 438.79) ms441.14 ± (440.70 - 441.58) ms+0.6%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed48.65 ± (48.62 - 48.68) MB48.60 ± (48.57 - 48.63) MB-0.1%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.0%
.NET 8 - Baseline
process.internal_duration_ms18.85 ± (18.82 - 18.88) ms18.96 ± (18.93 - 18.98) ms+0.6%✅⬆️
process.time_to_main_ms67.08 ± (66.98 - 67.17) ms67.48 ± (67.36 - 67.60) ms+0.6%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.67 ± (7.66 - 7.68) MB7.69 ± (7.68 - 7.70) MB+0.2%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms18.81 ± (18.79 - 18.83) ms18.94 ± (18.91 - 18.97) ms+0.7%✅⬆️
process.time_to_main_ms68.14 ± (68.08 - 68.19) ms68.71 ± (68.62 - 68.79) ms+0.8%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.74 ± (7.73 - 7.75) MB7.72 ± (7.72 - 7.73) MB-0.2%
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms178.74 ± (177.64 - 179.84) ms177.11 ± (176.28 - 177.95) ms-0.9%
process.time_to_main_ms425.04 ± (424.15 - 425.93) ms425.57 ± (424.97 - 426.16) ms+0.1%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed36.31 ± (36.29 - 36.34) MB36.30 ± (36.27 - 36.33) MB-0.0%
runtime.dotnet.threads.count27 ± (27 - 27)27 ± (27 - 27)-0.4%

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration194.31 ± (194.09 - 195.09) ms193.04 ± (192.94 - 193.97) ms-0.7%
.NET Framework 4.8 - Bailout
duration196.73 ± (196.52 - 197.10) ms197.12 ± (196.80 - 197.39) ms+0.2%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1106.57 ± (1110.07 - 1119.33) ms1110.45 ± (1110.46 - 1117.92) ms+0.4%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms187.30 ± (186.92 - 187.68) ms188.45 ± (187.99 - 188.90) ms+0.6%✅⬆️
process.time_to_main_ms80.59 ± (80.34 - 80.84) ms81.07 ± (80.87 - 81.26) ms+0.6%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.14 ± (16.11 - 16.18) MB16.12 ± (16.10 - 16.15) MB-0.1%
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)-0.6%
.NET Core 3.1 - Bailout
process.internal_duration_ms187.27 ± (186.93 - 187.60) ms188.38 ± (187.98 - 188.78) ms+0.6%✅⬆️
process.time_to_main_ms82.10 ± (81.93 - 82.26) ms82.29 ± (82.13 - 82.45) ms+0.2%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.20 ± (16.16 - 16.23) MB16.16 ± (16.13 - 16.18) MB-0.2%
runtime.dotnet.threads.count21 ± (21 - 21)21 ± (21 - 21)-0.5%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms415.45 ± (411.93 - 418.97) ms427.51 ± (424.46 - 430.56) ms+2.9%✅⬆️
process.time_to_main_ms472.96 ± (472.36 - 473.57) ms473.33 ± (472.70 - 473.96) ms+0.1%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed58.69 ± (58.57 - 58.81) MB58.56 ± (58.44 - 58.69) MB-0.2%
runtime.dotnet.threads.count29 ± (29 - 30)29 ± (29 - 30)-0.1%
.NET 6 - Baseline
process.internal_duration_ms191.96 ± (191.65 - 192.27) ms192.42 ± (192.06 - 192.78) ms+0.2%✅⬆️
process.time_to_main_ms69.99 ± (69.80 - 70.17) ms69.92 ± (69.78 - 70.05) ms-0.1%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.17 ± (16.04 - 16.29) MB16.01 ± (15.85 - 16.16) MB-1.0%
runtime.dotnet.threads.count19 ± (18 - 19)18 ± (18 - 18)-2.1%
.NET 6 - Bailout
process.internal_duration_ms191.30 ± (190.99 - 191.62) ms191.32 ± (191.05 - 191.59) ms+0.0%✅⬆️
process.time_to_main_ms70.88 ± (70.77 - 71.00) ms70.84 ± (70.75 - 70.93) ms-0.1%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.24 ± (16.12 - 16.37) MB16.01 ± (15.86 - 16.17) MB-1.4%
runtime.dotnet.threads.count20 ± (19 - 20)19 ± (19 - 19)-2.8%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms455.87 ± (453.99 - 457.75) ms453.14 ± (451.04 - 455.23) ms-0.6%
process.time_to_main_ms444.36 ± (443.89 - 444.82) ms445.32 ± (444.82 - 445.82) ms+0.2%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed58.23 ± (58.13 - 58.33) MB58.39 ± (58.27 - 58.50) MB+0.3%✅⬆️
runtime.dotnet.threads.count30 ± (29 - 30)30 ± (30 - 30)+0.2%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms190.16 ± (189.83 - 190.49) ms190.19 ± (189.91 - 190.48) ms+0.0%✅⬆️
process.time_to_main_ms69.45 ± (69.25 - 69.66) ms69.25 ± (69.12 - 69.38) ms-0.3%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.77 ± (11.73 - 11.80) MB11.75 ± (11.72 - 11.78) MB-0.1%
runtime.dotnet.threads.count18 ± (18 - 18)18 ± (18 - 18)-0.5%
.NET 8 - Bailout
process.internal_duration_ms189.45 ± (189.18 - 189.72) ms189.92 ± (189.64 - 190.20) ms+0.2%✅⬆️
process.time_to_main_ms70.27 ± (70.17 - 70.38) ms70.65 ± (70.54 - 70.77) ms+0.5%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.82 ± (11.79 - 11.84) MB11.80 ± (11.78 - 11.82) MB-0.1%
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)+0.4%✅⬆️
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms362.82 ± (361.13 - 364.51) ms366.27 ± (364.76 - 367.77) ms+0.9%✅⬆️
process.time_to_main_ms428.15 ± (427.55 - 428.74) ms430.66 ± (429.89 - 431.43) ms+0.6%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed47.91 ± (47.87 - 47.95) MB47.96 ± (47.94 - 47.99) MB+0.1%✅⬆️
runtime.dotnet.threads.count29 ± (29 - 29)29 ± (29 - 29)+0.1%✅⬆️
Comparison explanation

Execution-time benchmarks measure the whole time it takes to execute a program, and are intended to measure the one-off costs. Cases where the execution time results for the PR are worse than latest master results are highlighted in **red**. The following thresholds were used for comparing the execution times:

  • Welch test with statistical test for significance of 5%
  • Only results indicating a difference greater than 5% and 5 ms are considered.

Note that these results are based on a single point-in-time result for each branch. For full results, see the dashboard.

Graphs show the p99 interval based on the mean and StdDev of the test run, as well as the mean value of the run (shown as a diamond below the graph).

Duration charts
FakeDbCommand (.NET Framework 4.8)
gantt
    title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8014) - mean (69ms)  : 67, 70
    master - mean (68ms)  : 67, 70

    section Bailout
    This PR (8014) - mean (72ms)  : 71, 74
    master - mean (72ms)  : 71, 74

    section CallTarget+Inlining+NGEN
    This PR (8014) - mean (1,009ms)  : 966, 1052
    master - mean (1,006ms)  : 963, 1049

Loading
FakeDbCommand (.NET Core 3.1)
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8014) - mean (106ms)  : 104, 109
    master - mean (106ms)  : 103, 108

    section Bailout
    This PR (8014) - mean (107ms)  : 106, 109
    master - mean (107ms)  : 106, 108

    section CallTarget+Inlining+NGEN
    This PR (8014) - mean (739ms)  : 675, 802
    master - mean (738ms)  : 669, 808

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8014) - mean (94ms)  : 92, 96
    master - mean (93ms)  : 91, 95

    section Bailout
    This PR (8014) - mean (95ms)  : 94, 96
    master - mean (94ms)  : 93, 95

    section CallTarget+Inlining+NGEN
    This PR (8014) - mean (715ms)  : 675, 754
    master - mean (707ms)  : 668, 745

Loading
FakeDbCommand (.NET 8)
gantt
    title Execution time (ms) FakeDbCommand (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8014) - mean (93ms)  : 90, 95
    master - mean (92ms)  : 90, 94

    section Bailout
    This PR (8014) - mean (94ms)  : 92, 95
    master - mean (93ms)  : 92, 94

    section CallTarget+Inlining+NGEN
    This PR (8014) - mean (631ms)  : 618, 644
    master - mean (631ms)  : 618, 644

Loading
HttpMessageHandler (.NET Framework 4.8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8014) - mean (193ms)  : 188, 199
    master - mean (195ms)  : 189, 200

    section Bailout
    This PR (8014) - mean (197ms)  : 194, 200
    master - mean (197ms)  : 194, 200

    section CallTarget+Inlining+NGEN
    This PR (8014) - mean (1,114ms)  : 1060, 1168
    master - mean (1,115ms)  : 1048, 1182

Loading
HttpMessageHandler (.NET Core 3.1)
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8014) - mean (278ms)  : 270, 287
    master - mean (277ms)  : 271, 283

    section Bailout
    This PR (8014) - mean (279ms)  : 273, 285
    master - mean (277ms)  : 272, 283

    section CallTarget+Inlining+NGEN
    This PR (8014) - mean (929ms)  : 889, 968
    master - mean (918ms)  : 858, 977

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8014) - mean (271ms)  : 266, 275
    master - mean (270ms)  : 266, 275

    section Bailout
    This PR (8014) - mean (270ms)  : 267, 274
    master - mean (270ms)  : 266, 274

    section CallTarget+Inlining+NGEN
    This PR (8014) - mean (928ms)  : 893, 963
    master - mean (927ms)  : 897, 958

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8014) - mean (269ms)  : 265, 274
    master - mean (269ms)  : 264, 275

    section Bailout
    This PR (8014) - mean (270ms)  : 265, 274
    master - mean (269ms)  : 265, 274

    section CallTarget+Inlining+NGEN
    This PR (8014) - mean (827ms)  : 803, 850
    master - mean (823ms)  : 802, 844

Loading

@pr-commenter
Copy link

pr-commenter bot commented Dec 26, 2025

Benchmarks

Benchmark execution time: 2025-12-26 13:02:35

Comparing candidate commit 6fdee61 in PR branch nacho/RetrryDownloadLibDatadog with baseline commit ed3fa0f in branch master.

Found 5 performance improvements and 7 performance regressions! Performance is the same for 155 metrics, 19 unstable metrics.

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net6.0

  • 🟩 execution_time [-122.653ms; -118.312ms] or [-59.626%; -57.516%]

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild netcoreapp3.1

  • 🟥 execution_time [+105.525ms; +110.034ms] or [+111.290%; +116.045%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody netcoreapp3.1

  • 🟥 execution_time [+18.827ms; +23.156ms] or [+9.524%; +11.714%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs netcoreapp3.1

  • 🟩 execution_time [-21.919ms; -21.653ms] or [-10.866%; -10.734%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net6.0

  • 🟥 execution_time [+94.258ms; +98.248ms] or [+97.459%; +101.585%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟩 execution_time [-27.320ms; -22.428ms] or [-12.752%; -10.469%]

scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice netcoreapp3.1

  • 🟩 execution_time [-996.476µs; -743.185µs] or [-35.260%; -26.297%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark netcoreapp3.1

  • 🟥 throughput [-508.379op/s; -303.978op/s] or [-22.571%; -13.496%]

scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net6.0

  • 🟥 execution_time [+13.304ms; +16.944ms] or [+6.914%; +8.806%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan net6.0

  • 🟩 throughput [+72263.188op/s; +99861.506op/s] or [+5.897%; +8.149%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan netcoreapp3.1

  • 🟥 execution_time [+15.897ms; +21.395ms] or [+8.007%; +10.776%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes netcoreapp3.1

  • 🟥 execution_time [+12.642ms; +18.264ms] or [+6.383%; +9.221%]

@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Dec 26, 2025

⚠️ Tests

Fix all issues with Cursor

⚠️ Warnings

🧪 1 Test failed

DetectContinuousProfilerState from Datadog.Trace.Tools.dd_dotnet.IntegrationTests.Checks.ProcessBasicChecksTests (Datadog) (Fix with Cursor)
Timeout when waiting for the target process to start

ℹ️ Info

❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 6fdee61 | Docs | Datadog PR Page | Was this helpful? Give us feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:builds project files, build scripts, pipelines, versioning, releases, packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants