Cleanup and fix the GeneratePackageVersions#8478
Conversation
|
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
BenchmarksBenchmark execution time: 2026-04-21 20:49:43 Comparing candidate commit 5774103 in PR branch Found 0 performance improvements and 1 performance regressions! Performance is the same for 26 metrics, 0 unstable metrics, 87 known flaky benchmarks.
|
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (8478) 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 (8478) - mean (73ms) : 70, 76
master - mean (73ms) : 70, 75
section Bailout
This PR (8478) - mean (80ms) : 75, 85
master - mean (80ms) : 76, 84
section CallTarget+Inlining+NGEN
This PR (8478) - mean (1,083ms) : 1037, 1128
master - mean (1,089ms) : 1017, 1162
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 (8478) - mean (116ms) : 108, 124
master - mean (115ms) : 109, 122
section Bailout
This PR (8478) - mean (118ms) : 111, 125
master - mean (117ms) : 112, 123
section CallTarget+Inlining+NGEN
This PR (8478) - mean (800ms) : 777, 824
master - mean (801ms) : 776, 825
FakeDbCommand (.NET 6)gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8478) - mean (101ms) : 98, 104
master - mean (101ms) : 96, 105
section Bailout
This PR (8478) - mean (106ms) : 101, 111
master - mean (106ms) : 99, 112
section CallTarget+Inlining+NGEN
This PR (8478) - mean (945ms) : 909, 982
master - mean (942ms) : 910, 974
FakeDbCommand (.NET 8)gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8478) - mean (100ms) : 97, 104
master - mean (101ms) : 98, 104
section Bailout
This PR (8478) - mean (101ms) : 99, 104
master - mean (102ms) : 99, 104
section CallTarget+Inlining+NGEN
This PR (8478) - mean (832ms) : 785, 878
master - mean (830ms) : 789, 870
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 (8478) - mean (209ms) : 198, 220
master - mean (221ms) : 196, 246
section Bailout
This PR (8478) - mean (214ms) : 205, 223
master - mean (226ms) : 200, 251
section CallTarget+Inlining+NGEN
This PR (8478) - mean (1,227ms) : 1178, 1275
master - mean (1,293ms) : 1225, 1361
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 (8478) - mean (302ms) : 286, 317
master - mean (322ms) : 287, 357
section Bailout
This PR (8478) - mean (302ms) : 287, 317
master - mean (322ms) : 289, 354
section CallTarget+Inlining+NGEN
This PR (8478) - mean (999ms) : 969, 1028
master - mean (1,038ms) : 1001, 1075
HttpMessageHandler (.NET 6)gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8478) - mean (294ms) : 278, 309
master - mean (306ms) : 278, 335
section Bailout
This PR (8478) - mean (296ms) : 278, 314
master - mean (308ms) : 276, 340
section CallTarget+Inlining+NGEN
This PR (8478) - mean (1,180ms) : 1134, 1226
master - mean (1,205ms) : 1131, 1278
HttpMessageHandler (.NET 8)gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8478) - mean (296ms) : 276, 315
master - mean (299ms) : 274, 323
section Bailout
This PR (8478) - mean (295ms) : 277, 312
master - mean (304ms) : 275, 333
section CallTarget+Inlining+NGEN
This PR (8478) - mean (1,096ms) : 988, 1205
master - mean (1,134ms) : 1017, 1252
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
d41ac11 to
3d9a18e
Compare
| /// Returns the highest previously-tested version for the given entry, restricted to its | ||
| /// [MinVersion, MaxVersionExclusive) range. The range restriction matters for split-range | ||
| /// packages (e.g. GraphQL 4.x-6.x and 7.x-9.x): a high max from the 7.x-9.x entry must not | ||
| /// suppress cooldown checks on the 4.x-6.x entry. |
There was a problem hiding this comment.
Something still doesn't feel quite right here to me, as I think we should really probably be keyed on major version, as opposed to "range", but 1. Maybe that already works 2. That's a super edge case, 3. meh 😄
There was a problem hiding this comment.
I've modified this a bit more, probably needs a bit more work
Co-authored-by: Andrew Lock <andrew.lock@datadoghq.com>
Summary of changes
This goes back through the recent changes (#8371 and #8340) to
GeneratePackageVersionsand attempts to do some removals, refactorings, and fixes that have come up. Notably this removes thenuget_cache, fixesIncludePackages(again 😅), and rewrites the cooldown logic to not usesupported_versions.jsonandnuget_cacheand instead reads from the.g.csfiles in addition to refactoring the verbage used throughout.Reason for change
While working on (#8128) I started running into several issues with
GeneratePackageVersionsnamely that I couldn't getIncludePackagesto work and then I started fighting issues with thenuget_cacheas well when attempting to add a new integration.This sets out to do a few things:
nuget_cache- this was added so that we wouldn't go and query NuGet info for packages not listed in theIncludePackagessupported_versions(this is what I previously used to determine what the highest version was currently allowed) - this file is planned to be changed/modified/removed by another team in the near future hence why we shouldn't use it.nuget_cachebefore so if someone ran it depending on their locale it would change.Implementation details
CooldownModeenum:Normal,BypassCooldown,FreezeIncludePackagesis used is an example)XUnitFileGenerator.LoadExistingVersionsreads the previous.g.csand returnsDictionary<IntegrationName, List<(Framework, Versions)>>.PackageGrouploads this once and exposesTryGetFrozenVersionsnuget_version_cache.jsonandNuGetVersionCache.csIsWithinCooldown→WasPublishedTooRecentlybaseline→previousMaxVersionsApplyCooldownnow uses two named local booleans (publishedTooRecently,atOrBelowPreviousMax) so the drop condition reads positively: "drop the version if it was published too recently and we haven't already shipped against it."Test coverage
I ran it locally for a handful of cases I think it is better.
Other details
I have ran through several instances with this and it seems to be good, basically default runs, runs with configurable cooldowns, runs with
IncludePackagesand runs withExcludePackages. All appeared as expected to me.