Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include snapshot diff in snapshot body #5988

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

andrewlock
Copy link
Member

Summary of changes

Improve the output when installer snapshot tests fail

Reason for change

Currently we just show a fixed string, this means we show an actual diff instead

Implementation details

We already do this for the macos installer tests, this improves it, so that you get something like this:

curl: (22) The requested URL returned error: 400
At request <Request GET /test/session/snapshot >:
   At snapshot (token='033d5bc0-c2ed-53c6-3ecc-b9d10e43a2b0'):
    - Directory: /Users/runner/work/1/s/tracer/build/smoke_test_snapshots
    - CI mode: 1
    - Trace File: /Users/runner/work/1/s/tracer/build/smoke_test_snapshots/smoke_test_snapshots.json
    - Stats File: /Users/runner/work/1/s/tracer/build/smoke_test_snapshots/smoke_test_snapshots_tracestats.json
    At compare of 1 expected trace(s) to 1 received trace(s):
     At trace 'http.request' (3 spans):
      At snapshot compare of span 'http.request' at position 1 in trace:
       - Expected span:
       {'duration': 184924600,
        'meta': {'component': 'HttpMessageHandler',
                 'http-client-handler-type': 'System.Net.Http.HttpClientHandler',
                 'http.method': 'GET',
                 'http.status_code': '200',
                 'http.url': 'http://localhost:5000/api/values',
                 'out.host': 'localhost',
                 'runtime-id': '11c61d09-16bb-477f-87ab-4f81d656c5ca',
                 'span.kind': 'client'},
        'metrics': {'_dd.top_level': 1.0,
                    '_dd.tracer_kr': 0.0,
                    '_sampling_priority_v1': 1.0,
                    'process_id': 1.0},
        'name': 'http.request',
        'parent_id': 0,
        'resource': 'GET localhost:5000/api/values',
        'service': 'AspNetCoreSmokeTest-http-client',
        'span_id': 1,
        'start': 1652283843057056500,
        'trace_id': 0,
        'type': 'http'}
       - Received span:
       {'duration': 614494000,
        'meta': {'_dd.git.commit.sha': 'a1ae7d806770b5efddb4c0594ca7b35d6d5bd6d0',
                 '_dd.git.repository_url': 'https://github.com/DataDog/dd-trace-dotnet',
                 '_dd.p.dm': '-0',
                 '_dd.p.tid': '66d5e9d300000000',
                 'component': 'HttpMessageHandler',
                 'http-client-handler-type': 'System.Net.Http.HttpClientHandler',
                 'http.method': 'GET',
                 'http.status_code': '200',
                 'http.url': 'http://localhost:5000/api/values',
                 'language': 'dotnet',
                 'out.host': 'localhost',
                 'runtime-id': 'fd0ffe39-9e26-4ca0-b842-00ea612989c1',
                 'span.kind': 'client'},
        'metrics': {'_dd.top_level': 1.0,
                    '_dd.tracer_kr': 0.0,
                    '_sampling_priority_v1': 1.0,
                    'process_id': 5733.0},
        'name': 'http.request',
        'parent_id': 0,
        'resource': 'GET localhost:5000/api/values',
        'service': 'AspNetCoreSmokeTest-http-client',
        'span_id': 1,
        'start': 1725295059820067200,
        'trace_id': 0,
        'type': 'http'}
Span meta value 'language' in received span but is not in the expected span.

Test coverage

It won't fail in this test (hopefully) but we already know this works elsewhere so meh

@andrewlock andrewlock requested a review from a team as a code owner September 5, 2024 10:23
@andrewlock andrewlock added area:builds project files, build scripts, pipelines, versioning, releases, packages area:tests unit tests, integration tests labels Sep 5, 2024
@andrewlock
Copy link
Member Author

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing the following branches/commits:

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 shown 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).

gantt
    title Execution time (ms) FakeDbCommand (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5988) - mean (70ms)  : 67, 73
     .   : milestone, 70,
    master - mean (69ms)  : 67, 71
     .   : milestone, 69,

    section CallTarget+Inlining+NGEN
    This PR (5988) - mean (1,080ms)  : 1052, 1107
     .   : milestone, 1080,
    master - mean (1,077ms)  : 1053, 1101
     .   : milestone, 1077,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5988) - mean (109ms)  : 105, 113
     .   : milestone, 109,
    master - mean (109ms)  : 105, 112
     .   : milestone, 109,

    section CallTarget+Inlining+NGEN
    This PR (5988) - mean (759ms)  : 730, 787
     .   : milestone, 759,
    master - mean (758ms)  : 739, 778
     .   : milestone, 758,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5988) - mean (92ms)  : 89, 95
     .   : milestone, 92,
    master - mean (92ms)  : 90, 95
     .   : milestone, 92,

    section CallTarget+Inlining+NGEN
    This PR (5988) - mean (710ms)  : 690, 729
     .   : milestone, 710,
    master - mean (710ms)  : 697, 724
     .   : milestone, 710,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5988) - mean (190ms)  : 187, 194
     .   : milestone, 190,
    master - mean (190ms)  : 187, 192
     .   : milestone, 190,

    section CallTarget+Inlining+NGEN
    This PR (5988) - mean (1,158ms)  : 1128, 1187
     .   : milestone, 1158,
    master - mean (1,160ms)  : 1137, 1184
     .   : milestone, 1160,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5988) - mean (276ms)  : 271, 280
     .   : milestone, 276,
    master - mean (274ms)  : 270, 279
     .   : milestone, 274,

    section CallTarget+Inlining+NGEN
    This PR (5988) - mean (922ms)  : 902, 942
     .   : milestone, 922,
    master - mean (922ms)  : 902, 942
     .   : milestone, 922,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5988) - mean (265ms)  : 260, 269
     .   : milestone, 265,
    master - mean (264ms)  : 259, 268
     .   : milestone, 264,

    section CallTarget+Inlining+NGEN
    This PR (5988) - mean (903ms)  : 883, 923
     .   : milestone, 903,
    master - mean (902ms)  : 883, 922
     .   : milestone, 902,

Loading

@datadog-ddstaging
Copy link

datadog-ddstaging bot commented Sep 5, 2024

Datadog Report

Branch report: andrew/ci/improve-snapshot-output
Commit report: 7bffafb
Test service: dd-trace-dotnet

✅ 0 Failed, 363637 Passed, 2072 Skipped, 14h 50m 59.88s Total Time

@andrewlock
Copy link
Member Author

Benchmarks Report for tracer 🐌

Benchmarks for #5988 compared to master:

  • 1 benchmarks are faster, with geometric mean 1.232
  • 1 benchmarks are slower, with geometric mean 1.183
  • All benchmarks have the same allocations

The following thresholds were used for comparing the benchmark speeds:

  • Mann–Whitney U test with statistical test for significance of 5%
  • Only results indicating a difference greater than 10% and 0.3 ns are considered.

Allocation changes below 0.5% are ignored.

Benchmark details

Benchmarks.Trace.ActivityBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartStopWithChild net6.0 7.84μs 44.3ns 319ns 0.0149 0.00747 0 5.43 KB
master StartStopWithChild netcoreapp3.1 10μs 55.7ns 348ns 0.0145 0.00482 0 5.62 KB
master StartStopWithChild net472 16μs 51.7ns 200ns 1.01 0.288 0.0881 6.06 KB
#5988 StartStopWithChild net6.0 7.75μs 44.2ns 337ns 0.026 0.013 0 5.43 KB
#5988 StartStopWithChild netcoreapp3.1 9.93μs 56.4ns 391ns 0.0191 0.00955 0 5.62 KB
#5988 StartStopWithChild net472 16.5μs 83.6ns 383ns 1.01 0.287 0.0929 6.05 KB
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 499μs 261ns 1.01μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 638μs 270ns 1.05μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 850μs 595ns 2.31μs 0.422 0 0 3.3 KB
#5988 WriteAndFlushEnrichedTraces net6.0 458μs 1.47μs 5.7μs 0 0 0 2.7 KB
#5988 WriteAndFlushEnrichedTraces netcoreapp3.1 642μs 457ns 1.71μs 0 0 0 2.7 KB
#5988 WriteAndFlushEnrichedTraces net472 839μs 750ns 2.81μs 0.419 0 0 3.3 KB
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendRequest net6.0 224μs 2.24μs 22.2μs 0.205 0 0 18.45 KB
master SendRequest netcoreapp3.1 235μs 1.43μs 14.1μs 0.254 0 0 20.61 KB
master SendRequest net472 0.00254ns 0.00105ns 0.00408ns 0 0 0 0 b
#5988 SendRequest net6.0 206μs 1.34μs 13.4μs 0.206 0 0 18.45 KB
#5988 SendRequest netcoreapp3.1 228μs 1.54μs 15.1μs 0.222 0 0 20.61 KB
#5988 SendRequest net472 4.35E‑05ns 4.35E‑05ns 0.000169ns 0 0 0 0 b
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 584μs 2.42μs 9.05μs 0.571 0 0 41.69 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 686μs 3.82μs 24.2μs 0.342 0 0 41.64 KB
master WriteAndFlushEnrichedTraces net472 877μs 4.1μs 15.9μs 8.19 2.59 0.431 53.32 KB
#5988 WriteAndFlushEnrichedTraces net6.0 582μs 3.18μs 19.4μs 0.551 0 0 41.59 KB
#5988 WriteAndFlushEnrichedTraces netcoreapp3.1 681μs 3.88μs 27.1μs 0.355 0 0 41.63 KB
#5988 WriteAndFlushEnrichedTraces net472 860μs 4.07μs 17.3μs 8.74 2.62 0.437 53.29 KB
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteNonQuery net6.0 1.25μs 1.4ns 5.41ns 0.0143 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 1.69μs 1.94ns 7.27ns 0.0135 0 0 1.02 KB
master ExecuteNonQuery net472 2.01μs 1.21ns 4.53ns 0.156 0 0 987 B
#5988 ExecuteNonQuery net6.0 1.28μs 1.02ns 3.81ns 0.014 0 0 1.02 KB
#5988 ExecuteNonQuery netcoreapp3.1 1.73μs 1.4ns 5.43ns 0.0137 0 0 1.02 KB
#5988 ExecuteNonQuery net472 2.09μs 2.39ns 9.27ns 0.156 0 0 987 B
Benchmarks.Trace.ElasticsearchBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #5988

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync‑net6.0 1.183 1,161.93 1,375.06

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master CallElasticsearch net6.0 1.19μs 0.623ns 2.16ns 0.0137 0 0 976 B
master CallElasticsearch netcoreapp3.1 1.59μs 0.569ns 2.13ns 0.0127 0 0 976 B
master CallElasticsearch net472 2.41μs 1.37ns 5.31ns 0.158 0 0 995 B
master CallElasticsearchAsync net6.0 1.16μs 0.644ns 2.49ns 0.0134 0 0 952 B
master CallElasticsearchAsync netcoreapp3.1 1.6μs 0.79ns 2.95ns 0.0136 0 0 1.02 KB
master CallElasticsearchAsync net472 2.61μs 1.44ns 5.57ns 0.166 0 0 1.05 KB
#5988 CallElasticsearch net6.0 1.2μs 2.9ns 11.2ns 0.0135 0 0 976 B
#5988 CallElasticsearch netcoreapp3.1 1.48μs 0.51ns 1.84ns 0.0129 0 0 976 B
#5988 CallElasticsearch net472 2.45μs 1.18ns 4.42ns 0.158 0 0 995 B
#5988 CallElasticsearchAsync net6.0 1.38μs 1.23ns 4.78ns 0.0138 0 0 952 B
#5988 CallElasticsearchAsync netcoreapp3.1 1.64μs 1.3ns 4.85ns 0.0133 0 0 1.02 KB
#5988 CallElasticsearchAsync net472 2.56μs 1.87ns 7.26ns 0.166 0 0 1.05 KB
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteAsync net6.0 1.2μs 0.951ns 3.68ns 0.0132 0 0 952 B
master ExecuteAsync netcoreapp3.1 1.59μs 0.906ns 3.51ns 0.0128 0 0 952 B
master ExecuteAsync net472 1.76μs 0.73ns 2.83ns 0.145 0 0 915 B
#5988 ExecuteAsync net6.0 1.28μs 1.52ns 5.88ns 0.0134 0 0 952 B
#5988 ExecuteAsync netcoreapp3.1 1.74μs 0.399ns 1.44ns 0.013 0 0 952 B
#5988 ExecuteAsync net472 1.76μs 0.711ns 2.75ns 0.145 0 0 915 B
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendAsync net6.0 4.18μs 3ns 10.8ns 0.0313 0 0 2.22 KB
master SendAsync netcoreapp3.1 5.06μs 2.06ns 7.96ns 0.0355 0 0 2.76 KB
master SendAsync net472 7.88μs 2.89ns 10.8ns 0.497 0 0 3.15 KB
#5988 SendAsync net6.0 4.05μs 1.52ns 5.67ns 0.0305 0 0 2.22 KB
#5988 SendAsync netcoreapp3.1 5.05μs 2.07ns 7.75ns 0.0353 0 0 2.76 KB
#5988 SendAsync net472 7.73μs 4ns 15.5ns 0.5 0 0 3.15 KB
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 1.48μs 0.457ns 1.65ns 0.0231 0 0 1.64 KB
master EnrichedLog netcoreapp3.1 2.2μs 5.09ns 18.4ns 0.0217 0 0 1.64 KB
master EnrichedLog net472 2.62μs 1.34ns 5.02ns 0.249 0 0 1.57 KB
#5988 EnrichedLog net6.0 1.48μs 2.28ns 8.84ns 0.0228 0 0 1.64 KB
#5988 EnrichedLog netcoreapp3.1 2.19μs 2.34ns 8.45ns 0.0219 0 0 1.64 KB
#5988 EnrichedLog net472 2.68μs 2.18ns 8.46ns 0.249 0 0 1.57 KB
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 116μs 188ns 730ns 0 0 0 4.28 KB
master EnrichedLog netcoreapp3.1 120μs 168ns 649ns 0.06 0 0 4.28 KB
master EnrichedLog net472 149μs 153ns 594ns 0.668 0.223 0 4.46 KB
#5988 EnrichedLog net6.0 116μs 273ns 1.06μs 0.0584 0 0 4.28 KB
#5988 EnrichedLog netcoreapp3.1 121μs 320ns 1.24μs 0.06 0 0 4.28 KB
#5988 EnrichedLog net472 149μs 202ns 781ns 0.662 0.221 0 4.46 KB
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 3.01μs 2.55ns 9.88ns 0.0315 0 0 2.2 KB
master EnrichedLog netcoreapp3.1 4.09μs 1.11ns 4.28ns 0.0287 0 0 2.2 KB
master EnrichedLog net472 4.85μs 1.88ns 7.27ns 0.319 0 0 2.02 KB
#5988 EnrichedLog net6.0 3.18μs 0.791ns 2.96ns 0.0302 0 0 2.2 KB
#5988 EnrichedLog netcoreapp3.1 4.12μs 1.26ns 4.88ns 0.0287 0 0 2.2 KB
#5988 EnrichedLog net472 4.95μs 1.46ns 5.67ns 0.319 0 0 2.02 KB
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendReceive net6.0 1.39μs 0.591ns 2.29ns 0.0159 0 0 1.14 KB
master SendReceive netcoreapp3.1 1.7μs 1.25ns 4.82ns 0.0153 0 0 1.14 KB
master SendReceive net472 2.16μs 1.48ns 5.74ns 0.183 0.00107 0 1.16 KB
#5988 SendReceive net6.0 1.31μs 0.417ns 1.56ns 0.0157 0 0 1.14 KB
#5988 SendReceive netcoreapp3.1 1.76μs 0.682ns 2.64ns 0.015 0 0 1.14 KB
#5988 SendReceive net472 2.16μs 1.12ns 4.19ns 0.183 0.00108 0 1.16 KB
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 2.91μs 0.892ns 3.46ns 0.0219 0 0 1.6 KB
master EnrichedLog netcoreapp3.1 3.94μs 2.89ns 11.2ns 0.0216 0 0 1.65 KB
master EnrichedLog net472 4.43μs 0.962ns 3.33ns 0.323 0 0 2.04 KB
#5988 EnrichedLog net6.0 2.83μs 0.959ns 3.59ns 0.0227 0 0 1.6 KB
#5988 EnrichedLog netcoreapp3.1 3.89μs 1.6ns 6.19ns 0.0214 0 0 1.65 KB
#5988 EnrichedLog net472 4.34μs 2.01ns 7.78ns 0.323 0 0 2.04 KB
Benchmarks.Trace.SpanBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 400ns 0.142ns 0.532ns 0.00805 0 0 576 B
master StartFinishSpan netcoreapp3.1 588ns 0.562ns 2.18ns 0.00787 0 0 576 B
master StartFinishSpan net472 623ns 1.11ns 4.31ns 0.0916 0 0 578 B
master StartFinishScope net6.0 497ns 0.419ns 1.62ns 0.00967 0 0 696 B
master StartFinishScope netcoreapp3.1 731ns 1.96ns 7.61ns 0.00952 0 0 696 B
master StartFinishScope net472 884ns 0.993ns 3.84ns 0.104 0 0 658 B
#5988 StartFinishSpan net6.0 406ns 0.891ns 3.45ns 0.00809 0 0 576 B
#5988 StartFinishSpan netcoreapp3.1 581ns 1.65ns 6.41ns 0.00776 0 0 576 B
#5988 StartFinishSpan net472 636ns 0.357ns 1.38ns 0.0917 0 0 578 B
#5988 StartFinishScope net6.0 480ns 0.649ns 2.51ns 0.00977 0 0 696 B
#5988 StartFinishScope netcoreapp3.1 717ns 0.678ns 2.63ns 0.0093 0 0 696 B
#5988 StartFinishScope net472 895ns 2.05ns 7.95ns 0.105 0 0 658 B
Benchmarks.Trace.TraceAnnotationsBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #5988

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net6.0 1.232 748.23 607.17

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net6.0 748ns 0.702ns 2.72ns 0.00971 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 1E+03ns 1.28ns 4.97ns 0.00912 0 0 696 B
master RunOnMethodBegin net472 1.11μs 1.33ns 5.14ns 0.104 0 0 658 B
#5988 RunOnMethodBegin net6.0 607ns 0.451ns 1.63ns 0.00983 0 0 696 B
#5988 RunOnMethodBegin netcoreapp3.1 940ns 1.38ns 5.34ns 0.00951 0 0 696 B
#5988 RunOnMethodBegin net472 1.15μs 1.7ns 6.12ns 0.104 0 0 658 B

@andrewlock andrewlock merged commit 5d3e699 into master Sep 6, 2024
68 of 70 checks passed
@andrewlock andrewlock deleted the andrew/ci/improve-snapshot-output branch September 6, 2024 11:02
@github-actions github-actions bot added this to the vNext-v3 milestone Sep 6, 2024
andrewlock added a commit that referenced this pull request Sep 6, 2024
## Summary of changes

- Fix nuget/dd-trace installer tests in 2.x branch
- Pin system tests in 2.x branch

## Reason for change

The code we were using to install the "local" builds of the NuGet
packages added the local source. However the dotnet restore was looking
in both the local and nuget.org sources, and installing the highest
version it found. That worked fine until we released 3.2.0 publicly and
expect to install 2.59.0 of the local build.

For system-tests, we had to change how things work to support v3
(DataDog/system-tests#2962), but unfortunately
that breaks for v2.

## Implementation details

Install an explicit version of the tracer. As this version is never in
the public nuget.org source but _is_ in the local source, it uses that.

> In #5989 I tried a
different approach but it just didn't work.

For system tests, just pinning to the specific commit prior to the v3 PR
being merged.

Having to thread the version through everywhere is kinda horrible, but
is the only thing I could find that works.

## Test coverage

Running [a full installer run
here](https://dev.azure.com/datadoghq/dd-trace-dotnet/_build/results?buildId=163526&view=results)

## Other details

The whole approach should be rewritten to be managed by Nuke tbh, if we
ever find time

This PR also contains a backport of 
- #5988
for simplicity

Supersedes
- #5989
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 area:tests unit tests, integration tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants