[Azure Functions] Add Nuke targets to build local nuget for testing#7537
Conversation
|
@codex review |
|
Codex Review: Didn't find any major issues. Another round soon, please! About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback". |
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:
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.8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7537) - mean (72ms) : 71, 73
. : milestone, 72,
master - mean (92ms) : 79, 105
. : milestone, 92,
section Baseline
This PR (7537) - mean (68ms) : 66, 70
. : milestone, 68,
master - mean (85ms) : 73, 98
. : milestone, 85,
section CallTarget+Inlining+NGEN
This PR (7537) - mean (1,006ms) : 981, 1032
. : milestone, 1006,
master - mean (1,132ms) : 1042, 1222
. : milestone, 1132,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7537) - mean (107ms) : 105, 108
. : milestone, 107,
master - mean (136ms) : 121, 152
. : milestone, 136,
section Baseline
This PR (7537) - mean (106ms) : 103, 109
. : milestone, 106,
master - mean (132ms) : 114, 150
. : milestone, 132,
section CallTarget+Inlining+NGEN
This PR (7537) - mean (710ms) : 693, 726
. : milestone, 710,
master - mean (827ms) : 763, 892
. : milestone, 827,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7537) - mean (94ms) : 93, 96
. : milestone, 94,
master - mean (122ms) : 99, 144
. : milestone, 122,
section Baseline
This PR (7537) - mean (93ms) : 91, 96
. : milestone, 93,
master - mean (119ms) : 98, 140
. : milestone, 119,
section CallTarget+Inlining+NGEN
This PR (7537) - mean (664ms) : 645, 683
. : milestone, 664,
master - mean (780ms) : 714, 847
. : milestone, 780,
gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7537) - mean (93ms) : 92, 94
. : milestone, 93,
master - mean (117ms) : 102, 131
. : milestone, 117,
section Baseline
This PR (7537) - mean (92ms) : 89, 94
. : milestone, 92,
master - mean (115ms) : 102, 129
. : milestone, 115,
section CallTarget+Inlining+NGEN
This PR (7537) - mean (597ms) : 583, 611
. : milestone, 597,
master - mean (714ms) : 652, 776
. : milestone, 714,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7537) - mean (215ms) : 209, 221
. : milestone, 215,
master - mean (213ms) : 203, 222
. : milestone, 213,
section Baseline
This PR (7537) - mean (208ms) : 202, 214
. : milestone, 208,
master - mean (209ms) : 193, 225
. : milestone, 209,
section CallTarget+Inlining+NGEN
This PR (7537) - mean (1,188ms) : 1128, 1248
. : milestone, 1188,
master - mean (1,177ms) : 1130, 1224
. : milestone, 1177,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7537) - mean (306ms) : 295, 317
. : milestone, 306,
master - mean (302ms) : 288, 316
. : milestone, 302,
section Baseline
This PR (7537) - mean (303ms) : 293, 314
. : milestone, 303,
master - mean (299ms) : 289, 310
. : milestone, 299,
section CallTarget+Inlining+NGEN
This PR (7537) - mean (963ms) : 931, 996
. : milestone, 963,
master - mean (951ms) : 916, 986
. : milestone, 951,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7537) - mean (301ms) : 288, 314
. : milestone, 301,
master - mean (292ms) : 279, 305
. : milestone, 292,
section Baseline
This PR (7537) - mean (296ms) : 288, 304
. : milestone, 296,
master - mean (295ms) : 280, 311
. : milestone, 295,
section CallTarget+Inlining+NGEN
This PR (7537) - mean (948ms) : 900, 995
. : milestone, 948,
master - mean (941ms) : 882, 1001
. : milestone, 941,
gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7537) - mean (297ms) : 284, 309
. : milestone, 297,
master - mean (292ms) : 278, 307
. : milestone, 292,
section Baseline
This PR (7537) - mean (292ms) : 278, 306
. : milestone, 292,
master - mean (297ms) : 287, 307
. : milestone, 297,
section CallTarget+Inlining+NGEN
This PR (7537) - mean (870ms) : 763, 976
. : milestone, 870,
master - mean (868ms) : 774, 962
. : milestone, 868,
|
andrewlock
left a comment
There was a problem hiding this comment.
LGTM in general - though I'd rather we didn't provide an entirely separate way of building datadog.trace
| Target UpdateAzureFunctionsNugetFromBuild => _ => _ | ||
| .Description("Updates the bundle home contents with local builds of Datadog.Trace.dll, and rebuilds the Datadog.AzureFunctions package") | ||
| .After(DownloadBundleNugetFromBuild) | ||
| .Triggers(BuildAzureFunctionsNuget) |
There was a problem hiding this comment.
We generally try to avoid Triggers because it makes it even harder to understand the already complex web than we currently have 🙁
I would also recommend against having a completely separate way of building Datadog.Trace here. Could this target be rewritten as the following?
Target UpdateAzureFunctionsNugetFromBuild => _ => _
.Description("Updates the bundle home contents with local builds of Datadog.Trace.dll, and rebuilds the Datadog.AzureFunctions package")
.After(DownloadBundleNugetFromBuild)
.DependsOn(Restore, CompileManagedSrc, PublishManagedTracer);(You would need to make sure DownloadBundleNugetFromBuild has a Before(PublishManagedTracer) to ensure it downloads before the publish)
There was a problem hiding this comment.
On second thought, I'll only add DownloadBundleNugetFromBuild for now and remove this UpdateAzureFunctionsNugetFromBuild. Downloading the artifact and extracting it is the more annoying part.
I can always add this second target later if needed.
f3c26f7 to
a2778a5
Compare
|
|
||
| Target DownloadBundleNugetFromBuild => _ => _ | ||
| .Description("Downloads Datadog.Trace.Bundle package from Azure DevOps and extracts it to the local bundle home directory." + | ||
| " Useful for building Datadog.Trace.Bundle or Datadog.AzureFunctions nupkg packages locally.") |
There was a problem hiding this comment.
nit I think it changed to just be this?
| " Useful for building Datadog.Trace.Bundle or Datadog.AzureFunctions nupkg packages locally.") | |
| " Useful for building the Datadog.AzureFunctions nupkg package locally.") |
There was a problem hiding this comment.
This new target downloads Datadog.Trace.Bundle.nupkg and extracts the files where they are expected to build either of those two nuget packages with BuildBundleNuget or BuildAzureFunctionsNuget.
My focus is building Datadog.AzureFunctions, not the bundle, but I'm trying to keep this target generic enough that it can be used for either one.
There was a problem hiding this comment.
in other words, you can use either
# new target added in this PR
.\tracer\build.ps1 DownloadBundleNugetFromBuild --BuildId 187203
...do stuff to replace some bundle files...
# build new bundle nuget
.\tracer\build.ps1 BuildBundleNuget
or
# new target added in this PR
.\tracer\build.ps1 DownloadBundleNugetFromBuild --BuildId 187203
...do stuff to replace some bundle files...
# build new azfunc nuget
.\tracer\build.ps1 BuildAzureFunctionsNuget
Summary of changes
Adds a Nuke target to download
Datadog.Trace.Bundleand extract it into the local bundle home directory.Reason for change
This is useful for building
Datadog.Trace.BundleorDatadog.AzureFunctionsnupkg packages locally for testing, and I do it manually too often. Automate all the things?Implementation details
Add Nuke target
DownloadBundleNugetFromBuild:Datadog.Trace.Bundlefrom an Azure DevOps buildtracer/src/Datadog.Trace.Bundle/homeUsage:
Test coverage
Tested locally. Not used in production builds.
Other details