Skip to content

[vs17.12] Disable OptProf bootstrapper - #14861

Merged
ViktorHofer merged 1 commit into
dotnet:vs17.12from
AlesProkop:backport-disable-optprof-vs17.12
Aug 28, 2026
Merged

ViktorHofer merged 1 commit into
dotnet:vs17.12from
AlesProkop:backport-disable-optprof-vs17.12

Conversation

@AlesProkop

Copy link
Copy Markdown
Member

Related to #14105

Context

The vs17.12 official build restores and compiles successfully, then fails in OptProf - Build VS bootstrapper because VSEng-VSDrop-MI cannot obtain a managed-identity token. vs17.12 is in servicing and no longer needs to collect fresh OptProf data.

Changes Made

  • Changed enableOptProf to default to false, disabling OptProf collection and the failing bootstrapper step.
  • Preserved application of the last-collected optimization data by leaving SkipApplyOptimizationData governed by the pipeline variable.
  • Gated OptProf - Publish Artifact: MicroBuildOutputs on enableOptProf because the bootstrapper output is not produced when collection is disabled.
  • Bumped VersionPrefix from 17.12.72 to 17.12.73.

Testing

  • Parsed .vsts-dotnet.yml and azure-pipelines/.vsts-dotnet-build-jobs.yml with ConvertFrom-Yaml and parsed eng/Versions.props as XML.
  • Attempted $env:MSBUILDFORCEMULTITHREADED=1; .\build.cmd -v quiet; the locally bootstrapped .NET SDK lacked Microsoft.NET.Sdk\tools\net472\Microsoft.NET.Build.Tasks.dll, causing MSB4062 before compilation.

Notes

  • MSBuild-OptProf definition 17389 may still resource-trigger without MicroBuildOutputs; its branch filtering is evaluated from its main default-branch configuration and requires a separate central change.

Disable fresh OptProf collection while continuing to apply existing optimization data.

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

Copilot-Session: a3e55e73-c65c-4e40-a051-c8de402438fb
Copilot AI lite review requested due to automatic review settings August 27, 2026 14:37
@AlesProkop
AlesProkop requested a review from a team as a code owner August 27, 2026 14:37

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

Disables OptProf data collection by default on the vs17.12 servicing branch to avoid failures in the VS bootstrapper build step (managed-identity token acquisition), while keeping application of previously collected optimization data controlled by the existing pipeline variable.

Changes:

  • Default enableOptProf to false to skip OptProf collection (including bootstrapper build) in official builds.
  • Gate OptProf - Publish Artifact: MicroBuildOutputs on enableOptProf so the artifact publish doesn’t run when the bootstrapper output isn’t produced.
  • Bump VersionPrefix to 17.12.73.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
eng/Versions.props Bumps VersionPrefix for the branch build/versioning flow.
azure-pipelines/.vsts-dotnet-build-jobs.yml Skips publishing MicroBuildOutputs when OptProf collection is disabled.
.vsts-dotnet.yml Changes enableOptProf default to false and updates commentary around applying existing optimization data.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread .vsts-dotnet.yml
@ViktorHofer
ViktorHofer merged commit 75d265f into dotnet:vs17.12 Aug 28, 2026
16 of 17 checks passed
ViktorHofer pushed a commit that referenced this pull request Aug 28, 2026
Depends on #14867. Merge #14867 first so the downstream OptProf pipeline
does not trigger for builds without OptProf artifacts.

Related to #14861.

### Context

The latest `vs17.11` official build
([15107183](https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=15107183&view=results))
fails before compilation while restoring optimization data:

`No drops matching the specified prefix were returned`

The requested prefix is
`OptimizationData/DotNet-msbuild-Trusted/vs17.11`. Previous successful
`vs17.11` Windows builds used `-officialSkipApplyOptimizationData true`,
and this servicing branch no longer needs to collect fresh OptProf data.

### Changes Made

- Changed `enableOptProf` to default to `false`.
- Kept the existing behavior that sets `SkipApplyOptimizationData=true`
when OptProf collection is disabled, avoiding the unavailable-data
restore.
- Gated `OptProf - Publish Artifact: MicroBuildOutputs` on
`enableOptProf` because the bootstrapper output is not produced when
collection is disabled.
- Bumped `VersionPrefix` from `17.11.66` to `17.11.67`.

### Testing

- Parsed `.vsts-dotnet.yml` and
`azure-pipelines/.vsts-dotnet-build-jobs.yml` with `ConvertFrom-Yaml`.
- Parsed `eng/Versions.props` as XML.
- End-to-end validation requires the official pipeline run.

### Notes
- We can skip the OptProf because this branch only inserts into .NET SDK
and not VS, so there is no risk of introducing a performance regressions
in VS.

Copilot-Session: 1eca2b3e-1d22-46f4-aa2c-327ca9861c34
ViktorHofer pushed a commit that referenced this pull request Aug 28, 2026
Depends on #14867. Merge #14867 first so the downstream OptProf pipeline
does not trigger for builds without OptProf artifacts.

Related to #14861.

### Context

The latest `vs17.8` official build
([15087653](https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=15087653&view=results))
fails before compilation while restoring optimization data:

`No drops matching the specified prefix were returned`

The requested prefix is
`OptimizationData/DotNet-msbuild-Trusted/vs17.8`. All four official
builds since August 17 have failed this way. An earlier build that got
past restore then failed the OptProf bootstrapper because it could not
obtain a VSDrop managed-identity token, so this servicing branch should
stop both applying unavailable data and collecting fresh data.

### Changes Made

- Added an `enableOptProf` parameter to the official pipeline and
defaulted it to `false`.
- Set `SkipApplyOptimizationData=true` when OptProf collection is
disabled.
- Gated the OptProf plugin, ProfilingInputs publish, bootstrapper,
training-settings generation, `MicroBuildOutputs` publish, and
`ready-for-training` tag on `enableOptProf`.
- Kept the shared job-template default at `true` so the experimental
pipeline preserves its existing OptProf behavior.
- Bumped `VersionPrefix` from `17.8.58` to `17.8.59`.

### Testing

- Parsed `.vsts-dotnet.yml`,
`azure-pipelines/.vsts-dotnet-build-jobs.yml`, and the unchanged
experimental caller with `ConvertFrom-Yaml`.
- Parsed `eng/Versions.props` as XML.
- End-to-end validation requires the official pipeline run.

### Notes
- We can skip the OptProf because this branch only inserts into .NET SDK
and not VS, so there is no risk of introducing a performance regressions
in VS.

Copilot-Session: 1eca2b3e-1d22-46f4-aa2c-327ca9861c34
ViktorHofer added a commit that referenced this pull request Sep 1, 2026
Fixes the `vs16.11` official build, which fails in `OptProf - Build VS
bootstrapper` with `Failed to obtain an access token from the VSDrop
Managed Identity` (e.g. [build
15153038](https://dev.azure.com/devdiv/DevDiv/_build/results?buildId=15153038)).
Same fix as #14105 (vs17.14) and #14861 (vs17.12); `vs16.11` is the last
branch without an `enableOptProf` switch.

- Added an `enableOptProf` parameter to `.vsts-dotnet.yml`, defaulting
to `false`, and threaded it to `.vsts-dotnet-build-jobs.yml`.
- Gated the OptProf-collection steps on it: `MicroBuildOptProfPlugin@6`,
ProfilingInputs publish, `MicroBuildBuildVSBootstrapper@3`,
`VisualStudio.BuildIbcTrainingSettings`, `MicroBuildOutputs` publish,
and the `ready-for-training` tag.
- Bumped `VersionPrefix` to `16.11.21`.

Unlike vs17.12/vs17.14, no `SkipApplyOptimizationData` change is needed:
`.vsts-dotnet.yml` already forces it to `true` on this branch because
there is no optimization data for vs16.11. VSSetup/packages are still
produced, so VS insertion is unaffected. `enableOptProf` stays a
queue-time parameter.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 083f8ce7-b343-4cc6-8bb2-ddc92f3d0117
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.

4 participants