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

Build the FleetInstaller executable and include in Windows OCI image #6644

Merged
merged 5 commits into from
Feb 12, 2025

Conversation

andrewlock
Copy link
Member

@andrewlock andrewlock commented Feb 10, 2025

Summary of changes

  • Build the fleet installer exe in GitLab
  • Include the fleet installer exe in Windows OCI
  • Produce Windows OCI images in Staging

Reason for change

We need to build the fleet installer executable, and include it in a Windows OI image

Implementation details

  • Add a stage BuildFleetInstaller to explicitly publish the fleet installer
  • Update the download-single-step-artifacts to grab the windows-tracer-home.zip and fleet installer artifact from the Build stage
  • Update the OCI image

For tagged releases this flow is a bit more convoluted. We need to grab the fleet-instller.exe artifact from the s3 upload that's done in the publish step, because we don't store it on the GitHub release. It's a bit ugly, but it works.

Test coverage

This is the test - if it builds, and the OCI image contains the expected files, we're good

Other details

Note that currently, the final OCI images will not contain Windows layers, until we unblock that both in our gitlab YAML, and in the libdatadog-build one pipeline.

Part of a stack of PRs:

@andrewlock andrewlock added area:builds project files, build scripts, pipelines, versioning, releases, packages area:ssi labels Feb 10, 2025
@andrewlock andrewlock requested review from a team as code owners February 10, 2025 11:46
@andrewlock andrewlock force-pushed the andrew/win-ssi/2-build branch from 0b6eda5 to d090638 Compare February 10, 2025 11:47
@datadog-ddstaging
Copy link

datadog-ddstaging bot commented Feb 10, 2025

Datadog Report

Branch report: andrew/win-ssi/2-build
Commit report: 2341ef9
Test service: dd-trace-dotnet

✅ 0 Failed, 250536 Passed, 2448 Skipped, 18h 33m 52.4s Total Time

@andrewlock andrewlock force-pushed the andrew/win-ssi/2-build branch 2 times, most recently from 0f5a72e to 8f8c907 Compare February 10, 2025 12:44
@andrewlock
Copy link
Member Author

andrewlock commented Feb 10, 2025

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 (6644) - mean (69ms)  : 65, 74
     .   : milestone, 69,
    master - mean (69ms)  : 66, 71
     .   : milestone, 69,

    section CallTarget+Inlining+NGEN
    This PR (6644) - mean (992ms)  : 966, 1018
     .   : milestone, 992,
    master - mean (997ms)  : 975, 1018
     .   : milestone, 997,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6644) - mean (102ms)  : 100, 103
     .   : milestone, 102,
    master - mean (102ms)  : 100, 104
     .   : milestone, 102,

    section CallTarget+Inlining+NGEN
    This PR (6644) - mean (674ms)  : 657, 690
     .   : milestone, 674,
    master - mean (674ms)  : 658, 690
     .   : milestone, 674,

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

    section CallTarget+Inlining+NGEN
    This PR (6644) - mean (630ms)  : 609, 650
     .   : milestone, 630,
    master - mean (633ms)  : 618, 647
     .   : milestone, 633,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6644) - mean (191ms)  : 186, 196
     .   : milestone, 191,
    master - mean (191ms)  : 186, 196
     .   : milestone, 191,

    section CallTarget+Inlining+NGEN
    This PR (6644) - mean (1,103ms)  : 1072, 1134
     .   : milestone, 1103,
    master - mean (1,105ms)  : 1078, 1133
     .   : milestone, 1105,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6644) - mean (272ms)  : 267, 276
     .   : milestone, 272,
    master - mean (271ms)  : 266, 275
     .   : milestone, 271,

    section CallTarget+Inlining+NGEN
    This PR (6644) - mean (864ms)  : 828, 900
     .   : milestone, 864,
    master - mean (871ms)  : 829, 913
     .   : milestone, 871,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6644) - mean (262ms)  : 257, 267
     .   : milestone, 262,
    master - mean (263ms)  : 259, 266
     .   : milestone, 263,

    section CallTarget+Inlining+NGEN
    This PR (6644) - mean (848ms)  : 819, 876
     .   : milestone, 848,
    master - mean (853ms)  : 813, 893
     .   : milestone, 853,

Loading

@andrewlock
Copy link
Member Author

andrewlock commented Feb 10, 2025

Benchmarks Report for tracer 🐌

Benchmarks for #6644 compared to master:

  • 1 benchmarks are faster, with geometric mean 1.125
  • 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.95μs 44ns 268ns 0.0325 0.0163 0 5.61 KB
master StartStopWithChild netcoreapp3.1 9.9μs 52.4ns 262ns 0.0202 0.0101 0 5.8 KB
master StartStopWithChild net472 16.1μs 39.8ns 154ns 1.05 0.329 0.104 6.21 KB
#6644 StartStopWithChild net6.0 8.09μs 45.3ns 307ns 0.0234 0.0117 0 5.61 KB
#6644 StartStopWithChild netcoreapp3.1 9.9μs 55.3ns 341ns 0.0145 0.00484 0 5.8 KB
#6644 StartStopWithChild net472 16.1μs 46.4ns 180ns 1.03 0.291 0.0972 6.21 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 476μs 248ns 928ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 666μs 463ns 1.79μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 854μs 551ns 2.13μs 0.425 0 0 3.3 KB
#6644 WriteAndFlushEnrichedTraces net6.0 485μs 281ns 1.09μs 0 0 0 2.7 KB
#6644 WriteAndFlushEnrichedTraces netcoreapp3.1 667μs 731ns 2.83μs 0 0 0 2.7 KB
#6644 WriteAndFlushEnrichedTraces net472 843μs 408ns 1.58μ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 132μs 334ns 1.3μs 0.196 0 0 14.47 KB
master SendRequest netcoreapp3.1 149μs 286ns 1.11μs 0.149 0 0 17.27 KB
master SendRequest net472 0.00159ns 0.000562ns 0.00218ns 0 0 0 0 b
#6644 SendRequest net6.0 132μs 356ns 1.38μs 0.197 0 0 14.47 KB
#6644 SendRequest netcoreapp3.1 151μs 87.2ns 338ns 0.226 0 0 17.27 KB
#6644 SendRequest net472 4.48E‑05ns 4.48E‑05ns 0.000174ns 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 573μs 2.93μs 13.1μs 0.288 0 0 41.74 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 709μs 4.13μs 35.3μs 0.334 0 0 41.87 KB
master WriteAndFlushEnrichedTraces net472 846μs 3.56μs 13.8μs 8.45 2.53 0.422 53.35 KB
#6644 WriteAndFlushEnrichedTraces net6.0 587μs 3.25μs 20.3μs 0.566 0 0 41.75 KB
#6644 WriteAndFlushEnrichedTraces netcoreapp3.1 662μs 3.34μs 15.6μs 0.327 0 0 41.79 KB
#6644 WriteAndFlushEnrichedTraces net472 842μs 4.37μs 21.4μs 8.08 2.55 0.425 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.55ns 6.01ns 0.0145 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 1.85μs 2.56ns 9.93ns 0.0139 0 0 1.02 KB
master ExecuteNonQuery net472 2.1μs 2.83ns 11ns 0.157 0.00104 0 987 B
#6644 ExecuteNonQuery net6.0 1.31μs 1.08ns 4.19ns 0.0144 0 0 1.02 KB
#6644 ExecuteNonQuery netcoreapp3.1 1.71μs 2.44ns 9.44ns 0.0136 0 0 1.02 KB
#6644 ExecuteNonQuery net472 2.06μs 2.51ns 9.73ns 0.156 0.00103 0 987 B
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master CallElasticsearch net6.0 1.28μs 0.79ns 2.95ns 0.0136 0 0 976 B
master CallElasticsearch netcoreapp3.1 1.48μs 0.459ns 1.72ns 0.0133 0 0 976 B
master CallElasticsearch net472 2.56μs 1.95ns 7.56ns 0.158 0 0 995 B
master CallElasticsearchAsync net6.0 1.26μs 0.441ns 1.65ns 0.0133 0 0 952 B
master CallElasticsearchAsync netcoreapp3.1 1.74μs 0.697ns 2.61ns 0.0139 0 0 1.02 KB
master CallElasticsearchAsync net472 2.74μs 1.55ns 5.99ns 0.167 0 0 1.05 KB
#6644 CallElasticsearch net6.0 1.22μs 0.566ns 2.12ns 0.0141 0 0 976 B
#6644 CallElasticsearch netcoreapp3.1 1.58μs 1.38ns 5.35ns 0.0134 0 0 976 B
#6644 CallElasticsearch net472 2.58μs 2.03ns 7.88ns 0.158 0 0 995 B
#6644 CallElasticsearchAsync net6.0 1.29μs 0.346ns 1.29ns 0.0129 0 0 952 B
#6644 CallElasticsearchAsync netcoreapp3.1 1.57μs 0.804ns 3.11ns 0.0134 0 0 1.02 KB
#6644 CallElasticsearchAsync net472 2.72μs 1.14ns 4.41ns 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.35μs 0.803ns 2.9ns 0.013 0 0 952 B
master ExecuteAsync netcoreapp3.1 1.68μs 0.734ns 2.84ns 0.0126 0 0 952 B
master ExecuteAsync net472 1.85μs 0.692ns 2.59ns 0.145 0 0 915 B
#6644 ExecuteAsync net6.0 1.37μs 0.502ns 1.88ns 0.013 0 0 952 B
#6644 ExecuteAsync netcoreapp3.1 1.65μs 1.31ns 4.91ns 0.0122 0 0 952 B
#6644 ExecuteAsync net472 1.87μs 0.678ns 2.35ns 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.3μs 0.942ns 3.4ns 0.0322 0 0 2.31 KB
master SendAsync netcoreapp3.1 5.32μs 2.31ns 8.93ns 0.0372 0 0 2.85 KB
master SendAsync net472 7.41μs 1.74ns 6.53ns 0.496 0 0 3.12 KB
#6644 SendAsync net6.0 4.13μs 2.04ns 7.9ns 0.0313 0 0 2.31 KB
#6644 SendAsync netcoreapp3.1 5.28μs 6.07ns 23.5ns 0.0367 0 0 2.85 KB
#6644 SendAsync net472 7.47μs 11.1ns 41.4ns 0.494 0 0 3.12 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.657ns 2.46ns 0.023 0 0 1.64 KB
master EnrichedLog netcoreapp3.1 2.18μs 1.01ns 3.79ns 0.0218 0 0 1.64 KB
master EnrichedLog net472 2.41μs 0.67ns 2.41ns 0.249 0 0 1.57 KB
#6644 EnrichedLog net6.0 1.47μs 0.873ns 3.27ns 0.0231 0 0 1.64 KB
#6644 EnrichedLog netcoreapp3.1 2.22μs 11ns 64.4ns 0.0214 0 0 1.64 KB
#6644 EnrichedLog net472 2.54μs 0.977ns 3.66ns 0.25 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 112μs 97.9ns 379ns 0 0 0 4.28 KB
master EnrichedLog netcoreapp3.1 117μs 216ns 837ns 0.0586 0 0 4.28 KB
master EnrichedLog net472 150μs 86.7ns 324ns 0.674 0.225 0 4.46 KB
#6644 EnrichedLog net6.0 114μs 57.6ns 215ns 0.0561 0 0 4.28 KB
#6644 EnrichedLog netcoreapp3.1 117μs 113ns 424ns 0.0584 0 0 4.28 KB
#6644 EnrichedLog net472 151μs 103ns 398ns 0.675 0.225 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 2.94μs 0.786ns 3.05ns 0.031 0 0 2.2 KB
master EnrichedLog netcoreapp3.1 4.1μs 1.96ns 7.34ns 0.0288 0 0 2.2 KB
master EnrichedLog net472 4.92μs 0.984ns 3.68ns 0.321 0 0 2.02 KB
#6644 EnrichedLog net6.0 2.92μs 0.7ns 2.62ns 0.0307 0 0 2.2 KB
#6644 EnrichedLog netcoreapp3.1 4.08μs 1.62ns 6.05ns 0.0306 0 0 2.2 KB
#6644 EnrichedLog net472 4.98μs 1.2ns 4.64ns 0.32 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.35μs 0.852ns 3.3ns 0.0162 0 0 1.14 KB
master SendReceive netcoreapp3.1 1.78μs 0.645ns 2.5ns 0.015 0 0 1.14 KB
master SendReceive net472 2.14μs 1.51ns 5.43ns 0.183 0 0 1.16 KB
#6644 SendReceive net6.0 1.4μs 1.55ns 5.99ns 0.0161 0 0 1.14 KB
#6644 SendReceive netcoreapp3.1 1.76μs 0.754ns 2.82ns 0.015 0 0 1.14 KB
#6644 SendReceive net472 2.05μs 0.693ns 2.59ns 0.183 0 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.81μs 0.819ns 3.07ns 0.0224 0 0 1.6 KB
master EnrichedLog netcoreapp3.1 3.9μs 1.5ns 5.6ns 0.0215 0 0 1.65 KB
master EnrichedLog net472 4.49μs 3.72ns 14.4ns 0.323 0 0 2.04 KB
#6644 EnrichedLog net6.0 3μs 1.19ns 4.62ns 0.0225 0 0 1.6 KB
#6644 EnrichedLog netcoreapp3.1 3.87μs 1.24ns 4.81ns 0.0213 0 0 1.65 KB
#6644 EnrichedLog net472 4.37μs 2.38ns 9.23ns 0.323 0 0 2.04 KB
Benchmarks.Trace.SpanBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #6644

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0 1.125 461.61 410.33

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 463ns 0.636ns 2.46ns 0.00808 0 0 576 B
master StartFinishSpan netcoreapp3.1 553ns 0.772ns 2.99ns 0.00779 0 0 576 B
master StartFinishSpan net472 609ns 1.24ns 4.78ns 0.0916 0 0 578 B
master StartFinishScope net6.0 540ns 0.8ns 3.1ns 0.00978 0 0 696 B
master StartFinishScope netcoreapp3.1 738ns 0.965ns 3.74ns 0.00938 0 0 696 B
master StartFinishScope net472 888ns 1.47ns 5.7ns 0.104 0 0 658 B
#6644 StartFinishSpan net6.0 410ns 0.498ns 1.93ns 0.00812 0 0 576 B
#6644 StartFinishSpan netcoreapp3.1 556ns 1ns 3.88ns 0.00766 0 0 576 B
#6644 StartFinishSpan net472 603ns 1.51ns 5.85ns 0.0916 0 0 578 B
#6644 StartFinishScope net6.0 491ns 1.25ns 4.83ns 0.00965 0 0 696 B
#6644 StartFinishScope netcoreapp3.1 763ns 1.34ns 5.19ns 0.00907 0 0 696 B
#6644 StartFinishScope net472 856ns 1.76ns 6.8ns 0.104 0 0 658 B
Benchmarks.Trace.TraceAnnotationsBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net6.0 657ns 0.752ns 2.91ns 0.00979 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 956ns 1.04ns 4.02ns 0.00917 0 0 696 B
master RunOnMethodBegin net472 1.1μs 1.64ns 6.34ns 0.104 0 0 658 B
#6644 RunOnMethodBegin net6.0 661ns 0.913ns 3.53ns 0.00997 0 0 696 B
#6644 RunOnMethodBegin netcoreapp3.1 944ns 1.53ns 5.93ns 0.00915 0 0 696 B
#6644 RunOnMethodBegin net472 1.11μs 1.62ns 6.26ns 0.104 0 0 658 B

@andrewlock andrewlock force-pushed the andrew/win-ssi/2-build branch from 8f8c907 to 91fc7fe Compare February 11, 2025 10:10
@lucaspimentel lucaspimentel requested a review from a team February 11, 2025 18:29
@andrewlock andrewlock force-pushed the andrew/win-ssi/2-build branch from 2341ef9 to e3f1d41 Compare February 12, 2025 12:38
andrewlock added a commit that referenced this pull request Feb 12, 2025
…6643)

## Summary of changes

Creates an "installer" executable, designed to be executed by the fleet
installer as part of configuring Windows SSI.

## Reason for change

We don't want to use the existing MSI, primarily because it requires
stopping and starting IIS when you update it, otherwise we risk causing
crashes.

The datadog-installer is responsible for copying the files added to the
Windows OCI image, and running the Datadog.FleetInstaller.exe executable
to configure the application. Similarly, it calls this exe when
uninstalling a tracer version or removing the product

## Implementation details

- Uses the fusion.dll API directly to manage the GAC entries, based on
the generated PInvoke APIs defined
[here](https://github.com/dotnet/pinvoke/tree/main/src/Fusion)
- Sets the envivornment variables by setting the `environmentVariables`
section in applicationHost.config. Uses [the
_Microsoft.Web.Administration_
NuGet](https://www.nuget.org/packages/Microsoft.Web.Administration) to
interact with the native API.

## Test coverage

Manually tested. Subsequent PRs in the stack will add smoke and
integration tests.

## Other details

Explicitly designed to run on Windows Server 2016+, so targets .NET FX
for simplicity. The _Microsoft.Web.Administration_ nuget is a .NET
Standard 1.x dll, which creates an annoying number of dlls in the
output, but it's just ugly, it works fine.

There's a fair amount of duplication in the Fusion
API/Microsoft.Web.Administration code with what the
`dd-dotnet`/`dd-trace` tool currently does. We could certainly look at
consolidating that down the line, and potentially rewriting the fleet
installer tool to be a NativeAOT executable, but it's probably not worth
the effort at this point.

The explicit `<RuntimeIdentifier>win-x64</RuntimeIdentifier>` in the
_.csproj_ is an odd one. Without it, for some reason, the gitlab build
restores for x86 but tries to build for x64 which is... weird. Also,
can't repro the issue locally. _Really_ don't understand what's
happening there, but this works so... 🙈

Part of a stack of PRs:
 
- #6643 👈
- #6644
- #6645
Base automatically changed from andrew/win-ssi/1-poc to master February 12, 2025 15:30
@andrewlock andrewlock force-pushed the andrew/win-ssi/2-build branch from e3f1d41 to 4236975 Compare February 12, 2025 15:32
@andrewlock andrewlock merged commit 69b23ed into master Feb 12, 2025
138 of 141 checks passed
@andrewlock andrewlock deleted the andrew/win-ssi/2-build branch February 12, 2025 18:45
@github-actions github-actions bot added this to the vNext-v3 milestone Feb 12, 2025
andrewlock added a commit that referenced this pull request Feb 13, 2025
## Summary of changes

Adds a new smoke test stage, for running inside Windows using the fleet
installer

## Reason for change

Emulates an end-to-end smoke test for the fleet installer executable. 

## Implementation details

- Build the fleet installer in the AzDo pipeline, as part of the
`package-windows` stage
- Adds a new `fleet_installer_smoke_tests` stage for running the smoke
tests
- Fix issues in ASP.NET Core test app, so that it works when hosted in
IIS
- Add a dockerfile for running the ASP.NET Core app with the fleet
installer, hosted in IIS

That latter point proved to be somewhat of a nightmare. The resulting
dockerfile feels kind of horrible, but I couldn't find another way to
have:

- Delay the start of the app pool until the container image is running
(i.e. not during build time)
- Start the worker process when the app pool starts, _without_ an
incoming request
- Shut down the app pool when the worker process exits (which is the way
the aspnetcore app works)
- Exit the container

The workaround, using the entrypoint script, makes a 404 request to the
app to spin up the worker process, manually shuts down the app pool (to
make sure the app definitely shuts down and flushes), and then exits.
This causes an additional span in the traces, so needed to create new
snapshots.

## Test coverage

This gives basic snapshot testing on 2022 which is the only version I
could get to work given the hosted images on AzDo and the available
python base images for the test agent. I think that is sufficient - we
are going to have additional end-to-end testing of Windows images in
system tests anyway.

## Other details

Part of a stack of PRs:

 
- #6643
- #6644
- #6645 👈
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:ssi
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants