Skip to content

Determinize release: hardcode OptProf baseline + Phase 3.2 baseline resolver - #14222

Merged
JanProvaznik merged 2 commits into
dotnet:mainfrom
JanProvaznik:optprof-baseline-determinization
Jun 30, 2026
Merged

JanProvaznik merged 2 commits into
dotnet:mainfrom
JanProvaznik:optprof-baseline-determinization

Conversation

@JanProvaznik

Copy link
Copy Markdown
Member

Two release-process determinizations, plus re-includes the Phase 3.2 baseline helper that missed the #14220 merge.

1. Hardcode the OptProf baseline (new)

A freshly-cut vs* branch has no OptProf optimization data of its own, so its first official build fails — today handled by the manual Phase 4.4 dance (cancel the auto-build, re-run with an Optional OptProfDrop Override). This makes it automatic:

  • .vsts-dotnet.yml: new OptProfBaselineDrop variable holding the latest known-good main OptimizationData drop. On vs* branches the build seeds OptProfDrop from it (→ /p:VisualStudioIbcDrop) and clears SourceBranch, so the first build of a brand-new branch has valid OptProf data.
    • main is unaffected (still resolves its own OptProf via SourceBranch); the manual OptProfDropName override still wins; existing vs* branches keep their frozen copies (forward-only change).
  • scripts/Get-LatestOptProfDrop.ps1: resolves the value deterministically from the MSBuild-OptProf pipeline (def 17389) latest successful main run, reading the Set PreviousOptimizationInputsDropName step. Validated → OptimizationData/DotNet-msbuild-Trusted/main/20260623.5/14471019/1.
  • Process: new checklist Phase 3.3 refreshes OptProfBaselineDrop in the main-bump PR (API-compat → 3.4, merge → 3.5). Phase 4.4 demoted to a fallback (only if the seeded build still fails).

⚠️ Infra change to the official build — worth a careful review of the ${{ if startsWith(... 'refs/heads/vs') }} seeding block and a validation run on a vs* branch. Trade-off: a vs* branch now uses the OptProf data pinned at cut time (deterministic; fine for a servicing branch) rather than resolving its own over its lifetime.

2. Deterministic Phase 3.2 baseline (re-include)

scripts/Get-PackageValidationBaseline.ps1 + its doc wiring — this was committed after #14220 had already merged at its first commit, so it never landed. Re-included here. Resolves PackageValidationBaselineVersion via git merge-base → pipeline 9434 → dotnet-tools feed. Validated → 18.9.0-preview-26330-01.

Both scripts require az login with devdiv access; the manual procedures remain as fallbacks.

JanProvaznik and others added 2 commits June 30, 2026 16:29
Adds scripts/Get-PackageValidationBaseline.ps1: given the release version, it computes git merge-base(origin/main, origin/vs<ver>), finds the matching successful build in official pipeline 9434, derives the package version from the OfficialBuildId via the Arcade date encoding, and verifies it on the dotnet-tools feed — collapsing the manual Phase 3.2 investigation into one command.

Validated against 18.9: outputs 18.9.0-preview-26330-01 (the branch-point main build 20260630.1 @ 0ac5599). The Arcade date formula (yy*1000 + month*50 + day) was cross-checked against the 18.7 (26230), 18.8 (26276), and 18.9 (26330) baselines.

Wires the script into the checklist Phase 3.2, the skill's baseline procedure (as the preferred path; manual steps kept as fallback), and the Key Files table.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…otstrap

Eliminates the recurring Phase 4.4 dance (cancel the failing auto-build, re-run with a manual OptProf override) for freshly-cut release branches.

.vsts-dotnet.yml:
- New OptProfBaselineDrop variable holding the latest known-good main OptimizationData drop.
- On vs* branches, seed OptProfDrop from it (and clear SourceBranch) so the first official build of a brand-new branch has valid OptProf data. main is unaffected (still resolves its own OptProf via SourceBranch); existing vs branches keep their frozen copies.

scripts/Get-LatestOptProfDrop.ps1:
- Resolves the value deterministically from the MSBuild-OptProf pipeline (17389) latest successful run on main, reading the 'Set PreviousOptimizationInputsDropName' step. Validated -> OptimizationData/DotNet-msbuild-Trusted/main/20260623.5/14471019/1.

Process:
- New release-checklist Phase 3.3 refreshes OptProfBaselineDrop in the main-bump PR (renumbered API-compat->3.4, merge->3.5; artifact-table ref updated).
- Phase 4.4 demoted to a fallback (only if the seeded build still fails).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 30, 2026 14:33
@JanProvaznik
JanProvaznik requested a review from a team as a code owner June 30, 2026 14:33
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Skill Validator Results

⚠️ Warnings or advisories found

Scope Checked
Skills 1
Agents 0
Total 1
Severity Count
--- ---:
❌ Errors 0
⚠️ Warnings 1
ℹ️ Advisories 0

Summary

Level Finding
ℹ️ Found 1 skill(s)
ℹ️ [release] 📊 release: 3,668 BPE tokens [chars/4: 3,588] (standard ~), 13 sections, 1 code blocks
ℹ️ [release] ⚠ Skill is 3,668 BPE tokens (chars/4 estimate: 3,588) — approaching "comprehensive" range where gains diminish.
ℹ️ ✅ All checks passed (1 skill(s))
Full validator output ```text Found 1 skill(s) [release] 📊 release: 3,668 BPE tokens [chars/4: 3,588] (standard ~), 13 sections, 1 code blocks [release] ⚠ Skill is 3,668 BPE tokens (chars/4 estimate: 3,588) — approaching "comprehensive" range where gains diminish. ✅ All checks passed (1 skill(s)) ```

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR determinizes two parts of the MSBuild release process: (1) ensuring newly-cut vs* branches have a known-good OptProf baseline so the first official build succeeds without manual intervention, and (2) reintroducing a deterministic resolver script for PackageValidationBaselineVersion (Phase 3.2) and wiring it into the release checklist + release skill docs.

Changes:

  • Add a hardcoded OptProfBaselineDrop in .vsts-dotnet.yml and seed OptProfDrop from it on vs* branches (while keeping main behavior unchanged).
  • Add/re-include two helper scripts to deterministically resolve (a) the latest OptProf drop and (b) the package validation baseline.
  • Update release checklist and release skill documentation to incorporate the new deterministic steps and revised Phase numbering.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
scripts/Get-PackageValidationBaseline.ps1 New helper script to compute PackageValidationBaselineVersion via merge-base + pipeline query + dotnet-tools feed verification.
scripts/Get-LatestOptProfDrop.ps1 New helper script to pull the latest OptProf drop from MSBuild-OptProf pipeline logs.
documentation/release-checklist.md Updates Phase 3 to reference the new scripts and documents the new OptProf baseline refresh + fallback behavior.
.vsts-dotnet.yml Adds OptProfBaselineDrop and seeds OptProfDrop for vs* branches to avoid first-build failures.
.github/skills/release/SKILL.md Documents the deterministic baseline resolver and adds OptProf baseline refresh into Phase 3 guidance and quick links.

Comment thread scripts/Get-LatestOptProfDrop.ps1
Comment thread scripts/Get-PackageValidationBaseline.ps1
Comment thread documentation/release-checklist.md
@JanProvaznik
JanProvaznik enabled auto-merge (squash) June 30, 2026 14:43
@JanProvaznik JanProvaznik mentioned this pull request Jun 30, 2026
70 tasks
@JanProvaznik
JanProvaznik merged commit 986ade9 into dotnet:main Jun 30, 2026
21 of 22 checks passed
WarperSan pushed a commit to WarperSan/ThunderPipe that referenced this pull request Sep 17, 2026
Updated
[Microsoft.Build.Utilities.Core](https://github.com/dotnet/msbuild) from
18.9.6 to 18.10.1.

<details>
<summary>Release notes</summary>

_Sourced from [Microsoft.Build.Utilities.Core's
releases](https://github.com/dotnet/msbuild/releases)._

## 18.10.1

## What's Changed
* [vs16.11] Update dependencies from dotnet/arcade by
@​dotnet-maestro[bot] in dotnet/msbuild#13103
* [vs17.12] Update dependencies from dotnet/arcade by
@​dotnet-maestro[bot] in dotnet/msbuild#13796
* [vs17.8] Update dependencies from dotnet/arcade by
@​dotnet-maestro[bot] in dotnet/msbuild#13902
* [vs17.11] Update dependencies from dotnet/arcade by
@​dotnet-maestro[bot] in dotnet/msbuild#13903
* [vs17.12] Update dependencies from dotnet/arcade by
@​dotnet-maestro[bot] in dotnet/msbuild#13909
* [vs17.12] Update dependencies from dotnet/arcade by
@​dotnet-maestro[bot] in dotnet/msbuild#13986
* Add vs18.9 to merge-flow config; retire vs18.3 by @​JanProvaznik in
dotnet/msbuild#14214
* Bump labeler-cache-retention to use issue-labeler v2.1.0 by
@​jeffhandley in dotnet/msbuild#14171
* Bump main to 18.10.0 after vs18.9 snap by @​JanProvaznik in
dotnet/msbuild#14216
* Improve release skill: Phase 2 DARC rules, VMR backflow, deterministic
baseline by @​JanProvaznik in
dotnet/msbuild#14220
* Determinize release: hardcode OptProf baseline + Phase 3.2 baseline
resolver by @​JanProvaznik in
dotnet/msbuild#14222
* Serialize BuildRequestConfiguration.RequestedTargets to fix solution
metaproject MSB4057 in parallel builds by @​ViktorHofer in
dotnet/msbuild#14223
* [main] Update dependencies from nuget/nuget.client by
@​dotnet-maestro[bot] in dotnet/msbuild#14203
* Core support for AbsolutePath/FileInfo/DirectoryInfo and ITaskItem<T>
as task parameters by @​baronfel in
dotnet/msbuild#13971
* [main] Update dependencies from dotnet/roslyn by @​dotnet-maestro[bot]
in dotnet/msbuild#14206
* Fix existence cache kind poisoning by @​AlesProkop in
dotnet/msbuild#14249
* [main] Source code updates from dotnet/dotnet by @​dotnet-maestro[bot]
in dotnet/msbuild#14226
* Don't disable the MSBuild server for /mt builds when node reuse is off
by @​AR-May in dotnet/msbuild#14248
* Enhance expert reviewer guidelines with additional checks. by @​AR-May
in dotnet/msbuild#14255
* [main] Source code updates from dotnet/dotnet by @​dotnet-maestro[bot]
in dotnet/msbuild#14253
* [main] Update dependencies from dotnet/roslyn by @​dotnet-maestro[bot]
in dotnet/msbuild#14268
* [main] Update dependencies from nuget/nuget.client by
@​dotnet-maestro[bot] in dotnet/msbuild#14267
* Bump github/gh-aw-actions/setup from 0.81.6 to 0.82.2 by
@​dependabot[bot] in dotnet/msbuild#14266
* Avoid boxing the struct enumerator in
PropertyDictionary<T>.GetEnumerator() by @​nareshjo in
dotnet/msbuild#14272
* Refresh copy marker when implementation output changes by @​AlesProkop
in dotnet/msbuild#14231
* Send task-host build process environment as delta by @​OvesN in
dotnet/msbuild#14126
* Add regression coverage for metadata newline preservation by
@​VolPlita in dotnet/msbuild#14261
* Fix EmbedInBinlog items with relative paths from child projects by
@​huulinhnguyen-dev in dotnet/msbuild#13990
* Stop requiring VersionPrefix updates in servicing - insert prerelease
versions to VS by @​ViktorHofer in
dotnet/msbuild#14277
* Fix WriteLinesToFile rewriting unchanged file when custom encoding is
used by @​huulinhnguyen-dev in
dotnet/msbuild#14146
* Enable trim/AOT analyzers for Microsoft.Build and clean up annotations
by @​JeremyKuhne in dotnet/msbuild#14064
* [automated] Merge branch 'vs18.9' => 'main' by @​github-actions[bot]
in dotnet/msbuild#14291
* Fix MicroBuild plugin feed URL to use allowed pkgs.dev.azure.com
format by @​AlesProkop in dotnet/msbuild#14295
* Pass ExcludeRestorePackageImports during restore to avoid redundant
evaluations by @​ViktorHofer with @​Copilot in
dotnet/msbuild#14274
* [vs18.7] Update dependencies from dotnet/arcade by
@​dotnet-maestro[bot] in dotnet/msbuild#13988
* Adopt Clever Test Selection (CTS) as parallel, non-blocking PR
pipeline by @​jankratochvilcz in
dotnet/msbuild#14212
* Harden exceptions when connecting to server by @​JanProvaznik in
dotnet/msbuild#14292
* Update MicrosoftBuildVersion in analyzer template by
@​github-actions[bot] in dotnet/msbuild#13886
* Fix MSBuild Server client dropping build result under WaitAny race
(#​14172) by @​JanProvaznik in
dotnet/msbuild#14251
* Partially revert #​13660: remove NuGet RestoreTask transient TaskHost
workaround by @​JanProvaznik in
dotnet/msbuild#14297
* Disable daily AI credits guardrail for Expert Code Review workflow by
@​JanProvaznik with @​Copilot in
dotnet/msbuild#14314
* Localized file check-in by OneLocBuild Task: Build definition ID 9434:
Build ID 14614733 by @​dotnet-bot in
dotnet/msbuild#14246
* Add opt-in partial (stop-after-pass) project evaluation by
@​ViktorHofer in dotnet/msbuild#14290
* Use partial evaluation for -getProperty/-getItem without a target by
@​ViktorHofer in dotnet/msbuild#14296
* [main] Source code updates from dotnet/dotnet by @​dotnet-maestro[bot]
in dotnet/msbuild#14324
* [main] Update dependencies from dotnet/roslyn by @​dotnet-maestro[bot]
in dotnet/msbuild#14333
* [main] Update dependencies from nuget/nuget.client by
@​dotnet-maestro[bot] in dotnet/msbuild#14330
* Bump github/gh-aw-actions/setup from 0.82.2 to 0.82.8 by
@​dependabot[bot] in dotnet/msbuild#14328
* Restrict partial evaluation to ProjectInstance by @​ViktorHofer in
dotnet/msbuild#14340
 ... (truncated)

Commits viewable in [compare
view](dotnet/msbuild@v18.9.6...v18.10.1).
</details>

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=Microsoft.Build.Utilities.Core&package-manager=nuget&previous-version=18.9.6&new-version=18.10.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This was referenced Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants