Skip to content

Ban SetVersion/SetVersionPrefix/SetVersionSuffix in Nuke Build#8289

Merged
bouwkast merged 2 commits into
masterfrom
steven/ban-set-version
Mar 17, 2026
Merged

Ban SetVersion/SetVersionPrefix/SetVersionSuffix in Nuke Build#8289
bouwkast merged 2 commits into
masterfrom
steven/ban-set-version

Conversation

@bouwkast

@bouwkast bouwkast commented Mar 11, 2026

Copy link
Copy Markdown
Collaborator

Summary of changes

Bans the usage of SetVersion/SetVersionSuffix/SetVersionPrefix within our Nuke build files.

Reason for change

SetVersion (and the others) can overwrite the version of dependent NuGets/Projects such as overwriting the Datadog.Trace.Annotations project which is pinned at 1.0.0.

Banning them just ensures that we don't call this as it isn't obvious that this would happen.

Implementation details

Added the banned symbol analyzers and then asked Claude to come up with the correct types/methods to ban as that seemed quicker than attempting to figure out the format myself :) 🤖

Test coverage

Validated that VS flags it along with the normal build if there is a SetVersion/SetVersionSuffix/SetVersionPrefix

Other details

image

edit: See #8285 - @lucaspimentel

@bouwkast bouwkast requested a review from a team as a code owner March 11, 2026 16:09
@bouwkast bouwkast added area:builds project files, build scripts, pipelines, versioning, releases, packages AI Generated Largely based on code generated by an AI or LLM. This label is the same across all dd-trace-* repos labels Mar 11, 2026

@andrewlock andrewlock left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 👍

@pr-commenter

pr-commenter Bot commented Mar 11, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-03-17 14:04:38

Comparing candidate commit 3f4455f in PR branch steven/ban-set-version with baseline commit abcc5ad in branch master.

Found 14 performance improvements and 4 performance regressions! Performance is the same for 158 metrics, 16 unstable metrics.

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

  • 🟥 throughput [-9654.802op/s; -8355.276op/s] or [-7.449%; -6.446%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody net6.0

  • 🟩 execution_time [-17.403ms; -13.042ms] or [-7.968%; -5.972%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody net6.0

  • 🟩 execution_time [-28.276ms; -21.808ms] or [-12.840%; -9.903%]

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

  • 🟩 execution_time [-20.040ms; -14.378ms] or [-9.286%; -6.662%]

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

  • 🟥 execution_time [+23.357ms; +24.122ms] or [+13.027%; +13.454%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces netcoreapp3.1

  • 🟩 execution_time [-96.397ms; -90.174ms] or [-36.455%; -34.102%]

scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice net6.0

  • 🟩 execution_time [-103.460µs; -97.367µs] or [-6.973%; -6.562%]
  • 🟩 throughput [+47.516op/s; +50.302op/s] or [+7.050%; +7.464%]

scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice net472

  • 🟩 execution_time [-155.226µs; -150.187µs] or [-5.738%; -5.552%]
  • 🟩 throughput [+21.757op/s; +22.471op/s] or [+5.886%; +6.079%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch netcoreapp3.1

  • 🟩 throughput [+41190.534op/s; +49027.941op/s] or [+9.386%; +11.172%]

scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog net6.0

  • 🟥 execution_time [+14.727ms; +20.058ms] or [+7.388%; +10.063%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog netcoreapp3.1

  • 🟩 execution_time [-16.696ms; -11.324ms] or [-8.253%; -5.598%]

scenario:Benchmarks.Trace.RedisBenchmark.SendReceive netcoreapp3.1

  • 🟩 throughput [+29166.039op/s; +39189.690op/s] or [+7.490%; +10.064%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net6.0

  • 🟩 throughput [+17895.254op/s; +21944.879op/s] or [+8.302%; +10.181%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net6.0

  • 🟥 execution_time [+99.897ms; +101.152ms] or [+108.184%; +109.542%]

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

  • 🟩 execution_time [-23.298ms; -19.151ms] or [-10.689%; -8.786%]

scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin net6.0

  • 🟩 execution_time [-19.354ms; -13.515ms] or [-9.034%; -6.308%]

@dd-trace-dotnet-ci-bot

dd-trace-dotnet-ci-bot Bot commented Mar 11, 2026

Copy link
Copy Markdown

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (8289) 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
duration74.96 ± (74.93 - 75.29) ms75.19 ± (75.24 - 75.56) ms+0.3%✅⬆️
.NET Framework 4.8 - Bailout
duration78.90 ± (78.74 - 79.15) ms80.13 ± (80.00 - 80.42) ms+1.6%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1096.19 ± (1095.62 - 1101.62) ms1107.24 ± (1109.06 - 1117.18) ms+1.0%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms23.42 ± (23.37 - 23.47) ms23.35 ± (23.29 - 23.41) ms-0.3%
process.time_to_main_ms88.25 ± (88.05 - 88.45) ms88.76 ± (88.55 - 88.98) ms+0.6%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.90 ± (10.89 - 10.90) MB10.91 ± (10.90 - 10.91) MB+0.1%✅⬆️
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms23.31 ± (23.26 - 23.37) ms23.27 ± (23.23 - 23.32) ms-0.2%
process.time_to_main_ms89.64 ± (89.41 - 89.86) ms89.98 ± (89.75 - 90.22) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.93 ± (10.93 - 10.94) MB10.94 ± (10.93 - 10.94) MB+0.0%✅⬆️
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms226.29 ± (225.11 - 227.48) ms227.85 ± (226.59 - 229.10) ms+0.7%✅⬆️
process.time_to_main_ms504.46 ± (503.58 - 505.35) ms508.09 ± (507.13 - 509.05) ms+0.7%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed47.23 ± (47.21 - 47.25) MB47.28 ± (47.26 - 47.30) MB+0.1%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.0%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms21.80 ± (21.77 - 21.83) ms22.06 ± (22.02 - 22.10) ms+1.2%✅⬆️
process.time_to_main_ms76.12 ± (75.94 - 76.29) ms77.60 ± (77.42 - 77.78) ms+2.0%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.63 ± (10.62 - 10.63) MB10.63 ± (10.63 - 10.63) MB+0.0%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms21.67 ± (21.63 - 21.72) ms21.89 ± (21.85 - 21.94) ms+1.0%✅⬆️
process.time_to_main_ms77.12 ± (76.92 - 77.32) ms78.04 ± (77.88 - 78.21) ms+1.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.74 ± (10.74 - 10.74) MB10.74 ± (10.73 - 10.74) MB-0.0%
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms212.27 ± (210.45 - 214.09) ms211.79 ± (210.23 - 213.35) ms-0.2%
process.time_to_main_ms500.38 ± (499.54 - 501.22) ms504.71 ± (504.00 - 505.42) ms+0.9%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed49.24 ± (49.21 - 49.26) MB49.25 ± (49.21 - 49.28) MB+0.0%✅⬆️
runtime.dotnet.threads.count29 ± (29 - 29)29 ± (29 - 29)-0.0%
.NET 8 - Baseline
process.internal_duration_ms20.17 ± (20.13 - 20.21) ms20.32 ± (20.27 - 20.36) ms+0.7%✅⬆️
process.time_to_main_ms76.18 ± (76.00 - 76.36) ms76.67 ± (76.51 - 76.83) ms+0.6%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.66 ± (7.65 - 7.66) MB7.67 ± (7.66 - 7.67) MB+0.1%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms20.20 ± (20.15 - 20.25) ms20.32 ± (20.27 - 20.38) ms+0.6%✅⬆️
process.time_to_main_ms77.32 ± (77.15 - 77.48) ms78.06 ± (77.88 - 78.24) ms+1.0%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.74 ± (7.73 - 7.75) MB7.72 ± (7.71 - 7.73) MB-0.3%
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms168.75 ± (167.88 - 169.63) ms170.87 ± (169.99 - 171.76) ms+1.3%✅⬆️
process.time_to_main_ms483.46 ± (482.59 - 484.33) ms487.53 ± (486.57 - 488.48) ms+0.8%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed36.54 ± (36.52 - 36.56) MB36.58 ± (36.56 - 36.59) MB+0.1%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.0%

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration193.73 ± (193.65 - 194.51) ms195.55 ± (195.46 - 196.36) ms+0.9%✅⬆️
.NET Framework 4.8 - Bailout
duration198.39 ± (198.09 - 198.79) ms199.62 ± (199.47 - 200.53) ms+0.6%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1148.37 ± (1151.59 - 1159.74) ms1166.29 ± (1168.49 - 1176.70) ms+1.6%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms188.30 ± (187.90 - 188.70) ms190.36 ± (189.91 - 190.82) ms+1.1%✅⬆️
process.time_to_main_ms81.12 ± (80.89 - 81.36) ms82.32 ± (82.08 - 82.56) ms+1.5%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.16 ± (16.14 - 16.19) MB16.08 ± (16.06 - 16.10) MB-0.5%
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)-0.2%
.NET Core 3.1 - Bailout
process.internal_duration_ms187.56 ± (187.18 - 187.95) ms190.71 ± (190.39 - 191.03) ms+1.7%✅⬆️
process.time_to_main_ms82.12 ± (81.94 - 82.29) ms83.66 ± (83.46 - 83.87) ms+1.9%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.28 ± (16.24 - 16.32) MB16.22 ± (16.19 - 16.25) MB-0.4%
runtime.dotnet.threads.count21 ± (20 - 21)21 ± (21 - 21)+0.2%✅⬆️
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms396.63 ± (394.63 - 398.64) ms398.30 ± (396.52 - 400.09) ms+0.4%✅⬆️
process.time_to_main_ms474.05 ± (473.43 - 474.67) ms482.72 ± (481.83 - 483.61) ms+1.8%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed57.96 ± (57.81 - 58.12) MB57.96 ± (57.83 - 58.10) MB+0.0%✅⬆️
runtime.dotnet.threads.count30 ± (29 - 30)30 ± (29 - 30)-0.1%
.NET 6 - Baseline
process.internal_duration_ms192.80 ± (192.42 - 193.19) ms200.93 ± (200.30 - 201.55) ms+4.2%✅⬆️
process.time_to_main_ms70.38 ± (70.18 - 70.57) ms72.92 ± (72.60 - 73.23) ms+3.6%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.16 ± (16.04 - 16.28) MB16.32 ± (16.30 - 16.34) MB+1.0%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)+1.9%✅⬆️
.NET 6 - Bailout
process.internal_duration_ms191.84 ± (191.51 - 192.17) ms194.54 ± (194.03 - 195.05) ms+1.4%✅⬆️
process.time_to_main_ms71.15 ± (71.04 - 71.25) ms72.11 ± (71.93 - 72.28) ms+1.4%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.24 ± (16.12 - 16.35) MB16.39 ± (16.36 - 16.41) MB+0.9%✅⬆️
runtime.dotnet.threads.count20 ± (19 - 20)20 ± (20 - 20)+2.3%✅⬆️
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms431.79 ± (430.02 - 433.57) ms436.78 ± (435.03 - 438.52) ms+1.2%✅⬆️
process.time_to_main_ms477.66 ± (476.77 - 478.56) ms486.98 ± (485.75 - 488.22) ms+2.0%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed60.20 ± (60.10 - 60.30) MB60.18 ± (60.10 - 60.27) MB-0.0%
runtime.dotnet.threads.count30 ± (30 - 31)31 ± (30 - 31)+0.1%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms189.76 ± (189.40 - 190.12) ms192.80 ± (192.38 - 193.22) ms+1.6%✅⬆️
process.time_to_main_ms69.53 ± (69.35 - 69.71) ms70.65 ± (70.46 - 70.84) ms+1.6%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.77 ± (11.74 - 11.80) MB11.83 ± (11.82 - 11.85) MB+0.5%✅⬆️
runtime.dotnet.threads.count18 ± (18 - 18)18 ± (18 - 18)+0.3%✅⬆️
.NET 8 - Bailout
process.internal_duration_ms189.38 ± (188.95 - 189.82) ms192.37 ± (191.89 - 192.84) ms+1.6%✅⬆️
process.time_to_main_ms70.95 ± (70.82 - 71.09) ms72.00 ± (71.87 - 72.13) ms+1.5%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.78 ± (11.73 - 11.82) MB11.81 ± (11.79 - 11.83) MB+0.3%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)+0.2%✅⬆️
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms355.09 ± (353.70 - 356.48) ms359.38 ± (358.03 - 360.74) ms+1.2%✅⬆️
process.time_to_main_ms453.16 ± (452.45 - 453.88) ms458.62 ± (457.87 - 459.38) ms+1.2%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed48.45 ± (48.42 - 48.49) MB48.51 ± (48.48 - 48.55) MB+0.1%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)-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 (8289) - mean (75ms)  : 73, 78
    master - mean (75ms)  : 72, 78

    section Bailout
    This PR (8289) - mean (80ms)  : 78, 83
    master - mean (79ms)  : 77, 81

    section CallTarget+Inlining+NGEN
    This PR (8289) - mean (1,113ms)  : 1053, 1173
    master - mean (1,099ms)  : 1063, 1135

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 (8289) - mean (119ms)  : 116, 122
    master - mean (119ms)  : 115, 122

    section Bailout
    This PR (8289) - mean (120ms)  : 118, 123
    master - mean (120ms)  : 117, 123

    section CallTarget+Inlining+NGEN
    This PR (8289) - mean (772ms)  : 747, 798
    master - mean (769ms)  : 746, 791

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8289) - mean (106ms)  : 103, 110
    master - mean (105ms)  : 102, 107

    section Bailout
    This PR (8289) - mean (107ms)  : 105, 108
    master - mean (105ms)  : 103, 108

    section CallTarget+Inlining+NGEN
    This PR (8289) - mean (754ms)  : 719, 788
    master - mean (750ms)  : 703, 796

Loading
FakeDbCommand (.NET 8)
gantt
    title Execution time (ms) FakeDbCommand (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8289) - mean (105ms)  : 102, 108
    master - mean (104ms)  : 101, 108

    section Bailout
    This PR (8289) - mean (106ms)  : 104, 109
    master - mean (105ms)  : 103, 108

    section CallTarget+Inlining+NGEN
    This PR (8289) - mean (699ms)  : 672, 727
    master - mean (694ms)  : 670, 718

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 (8289) - mean (196ms)  : 190, 202
    master - mean (194ms)  : 189, 199

    section Bailout
    This PR (8289) - mean (200ms)  : 194, 206
    master - mean (198ms)  : 195, 202

    section CallTarget+Inlining+NGEN
    This PR (8289) - mean (1,173ms)  : 1113, 1232
    master - mean (1,156ms)  : 1097, 1214

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 (8289) - mean (281ms)  : 272, 290
    master - mean (278ms)  : 272, 285

    section Bailout
    This PR (8289) - mean (283ms)  : 279, 288
    master - mean (278ms)  : 273, 283

    section CallTarget+Inlining+NGEN
    This PR (8289) - mean (915ms)  : 884, 946
    master - mean (901ms)  : 872, 931

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8289) - mean (283ms)  : 269, 296
    master - mean (271ms)  : 265, 278

    section Bailout
    This PR (8289) - mean (275ms)  : 267, 283
    master - mean (271ms)  : 266, 276

    section CallTarget+Inlining+NGEN
    This PR (8289) - mean (958ms)  : 915, 1000
    master - mean (942ms)  : 918, 965

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

    section Bailout
    This PR (8289) - mean (275ms)  : 264, 285
    master - mean (270ms)  : 264, 275

    section CallTarget+Inlining+NGEN
    This PR (8289) - mean (851ms)  : 824, 877
    master - mean (839ms)  : 816, 862

Loading

@bouwkast bouwkast force-pushed the steven/ban-set-version branch from a710209 to 3f4455f Compare March 17, 2026 13:21
@bouwkast bouwkast merged commit 14d24ba into master Mar 17, 2026
138 checks passed
@bouwkast bouwkast deleted the steven/ban-set-version branch March 17, 2026 15:32
@github-actions github-actions Bot added this to the vNext-v3 milestone Mar 17, 2026
andrewlock added a commit that referenced this pull request Mar 18, 2026
andrewlock added a commit that referenced this pull request Mar 24, 2026
## Summary of changes

Adds new Windows and Linux smoke tests for the Datadog.AzureFunctions
NuGet package

## Reason for change

We recently had an issue where the Datadog.AzureFunctions package was
broken, but as we don't currently test the package itself, we didn't
catch it. This adds tests to make sure we can actually install the
package that we build, similar to how we test the Datadog.Trace.Bundle
package today.

## Implementation details

This was harder than I had hoped, and required a bit of refactoring to
the Nuke smoke tests that we added in
#8271, as well as
enabling the new smoke tests.

For the refactoring, this PR:
- Updates the "nuget" smoke test dockerfiles to allow providing a
`NUGET_PACKAGE` variable, so we can reuse the dockerfiles for multiple
nuget packages
- Add `IncludeDdDotnetScenario` to the windows nuget scenario - today we
always try the `dd-dotnet` case after the "env vars" case, but there's
no `dd-dotnet` in Datadog.AzureFunctions.
- Ensure we delete the logs from previous runs before starting the
tests, this bit when I was testing locally as I was failing on errors
from _previous_ runs
- Make the specifying of runtime environment variables to pass in
scenario-specific. We bake a lot of env vars into the dockerfiles, but
it means that if you need different env vars for different scenarios
that use the _same_ dockerfile, you can.

In terms of enabling the Azure Functions smoke tests:
- Add two new stages, Windows and Linux, running tests with the
Datadog.AzureFunctions NuGet package. Made them "extended" tests so they
only run on main/hotfix branches, seeing as the package will rarely
change.
- Add a couple of exceptions to warnings caused by missing libdatadog
and profiler. These are always logged today, and can't be avoided
AFAICT. They may be candidates for looking into further, but they're
benign, so this is the easiest approach.
- Update the env vars we pass in:
  - Don't set `LD_PRELOAD` (because the file doesn't exist)
  - Disable ASM and profiling (the native libraries aren't included)
  - "Pretend" to be in AAS, to try to stop using libdatadog config
- Set `AWS_LAMBDA_FUNCTION_NAME` to avoid sending config to the profiler
(we can't pretend to be in Azure functions, because otherwise we disable
the aspnetcore integration which we need😅)
- Set a fake `DD_API_KEY` otherwise we're marked as "unsafe to trace"
and disable tracing
- Add a new "Azure Functions snapshot", seeing as we have a bunch of AAS
tags added now, and are missing the ASM ones etc.

## Test coverage

More now! 🎉 

[I did a test
run](https://dev.azure.com/datadoghq/dd-trace-dotnet/_build/results?buildId=197781&view=results)
in which I restore the previous "broken" NuGet, and it causes the smoke
tests to fail (which is good):

```
 error: NU1102: Unable to find package Datadog.Trace.Annotations with version (>= 3.40.0)

```

I've done multiple runs showing it passes otherwise, but I'll do a final
run before merging to make sure

## Other details

Context:
- #8285 
- #8289

---------

Co-authored-by: Lucas Pimentel <lucas.pimentel@datadoghq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI Generated Largely based on code generated by an AI or LLM. This label is the same across all dd-trace-* repos 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