Ban SetVersion/SetVersionPrefix/SetVersionSuffix in Nuke Build#8289
Conversation
BenchmarksBenchmark execution time: 2026-03-17 14:04:38 Comparing candidate commit 3f4455f in PR branch 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
scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody net6.0
scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody net6.0
scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody netcoreapp3.1
scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs netcoreapp3.1
scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces netcoreapp3.1
scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice net6.0
scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice net472
scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch netcoreapp3.1
scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog net6.0
scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog netcoreapp3.1
scenario:Benchmarks.Trace.RedisBenchmark.SendReceive netcoreapp3.1
scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net6.0
scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net6.0
scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope net6.0
scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin net6.0
|
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (8289) and master. ✅ No regressions detected - check the details below Full Metrics ComparisonFakeDbCommand
HttpMessageHandler
Comparison explanationExecution-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:
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 chartsFakeDbCommand (.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
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
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
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
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
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
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
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
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
a710209 to
3f4455f
Compare
## 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>
Summary of changes
Bans the usage of
SetVersion/SetVersionSuffix/SetVersionPrefixwithin 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 at1.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/SetVersionPrefixOther details
edit: See #8285 - @lucaspimentel