From 10eb816170a1632c65a89c266e4f7b8393c9ab02 Mon Sep 17 00:00:00 2001 From: Viktor Hofer <7412651+ViktorHofer@users.noreply.github.com> Date: Tue, 1 Sep 2026 10:04:25 +0200 Subject: [PATCH] [vs16.11] Disable OptProf bootstrapper The vs16.11 official build fails in 'OptProf - Build VS bootstrapper' with 'Failed to obtain an access token from the VSDrop Managed Identity'. vs16.11 is in servicing and does not need fresh OptProf data. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 083f8ce7-b343-4cc6-8bb2-ddc92f3d0117 --- .vsts-dotnet.yml | 7 +++++++ azure-pipelines/.vsts-dotnet-build-jobs.yml | 15 ++++++++++----- eng/Versions.props | 2 +- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/.vsts-dotnet.yml b/.vsts-dotnet.yml index 04ec7983e76..1ca508b0709 100644 --- a/.vsts-dotnet.yml +++ b/.vsts-dotnet.yml @@ -13,6 +13,12 @@ parameters: displayName: Optional OptProfDrop Override type: string default: 'default' +- name: enableOptProf + displayName: Enable OptProf data collection for this build + # vs16.11 is in servicing and no longer collects fresh OptProf data: the VS + # bootstrapper build (required only for OptProf collection) is disabled by default. + type: boolean + default: false - name: enableSigningValidation displayName: Enable Signing Validation type: boolean @@ -77,6 +83,7 @@ extends: isExperimental: false enableComponentGovernance: true signTypeParameter: ${{ parameters.signTypeParameter }} + enableOptProf: ${{ parameters.enableOptProf }} - template: /eng/common/templates-official/post-build/post-build.yml@self parameters: diff --git a/azure-pipelines/.vsts-dotnet-build-jobs.yml b/azure-pipelines/.vsts-dotnet-build-jobs.yml index 5e67dd6d8e5..b42983e61d9 100644 --- a/azure-pipelines/.vsts-dotnet-build-jobs.yml +++ b/azure-pipelines/.vsts-dotnet-build-jobs.yml @@ -9,6 +9,9 @@ parameters: - name: signTypeParameter type: string default: 'test' +- name: enableOptProf + type: boolean + default: false jobs: - job: Windows_NT @@ -61,6 +64,7 @@ jobs: AccessToken: '$(System.AccessToken)' feedSource: 'https://devdiv.pkgs.visualstudio.com/DefaultCollection/_packaging/MicroBuildToolset/nuget/v3/index.json' displayName: 'Install OptProf Plugin' + condition: and(succeeded(), ${{ parameters.enableOptProf }}) # Required by MicroBuildBuildVSBootstrapper - task: MicroBuildSwixPlugin@4 @@ -104,7 +108,7 @@ jobs: toLowerCase: false usePat: true displayName: 'OptProf - Publish to Artifact Services - ProfilingInputs' - condition: succeeded() + condition: and(succeeded(), ${{ parameters.enableOptProf }}) # Build VS bootstrapper # Generates $(Build.StagingDirectory)\MicroBuild\Output\BootstrapperInfo.json @@ -115,7 +119,7 @@ jobs: manifests: $(VisualStudio.SetupManifestList) outputFolder: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(BuildConfiguration)\Insertion' displayName: 'OptProf - Build VS bootstrapper' - condition: succeeded() + condition: and(succeeded(), ${{ parameters.enableOptProf }}) # Publish run settings - task: PowerShell@2 @@ -127,7 +131,7 @@ jobs: /p:BootstrapperInfoPath=$(Build.StagingDirectory)\MicroBuild\Output\BootstrapperInfo.json /p:VisualStudioIbcTrainingSettingsPath=$(Build.SourcesDirectory)\eng\config\OptProf.runsettings displayName: 'OptProf - Build IBC training settings' - condition: succeeded() + condition: and(succeeded(), ${{ parameters.enableOptProf }}) # Publish bootstrapper info - task: 1ES.PublishBuildArtifacts@1 @@ -136,7 +140,8 @@ jobs: ArtifactName: MicroBuildOutputs ArtifactType: Container displayName: 'OptProf - Publish Artifact: MicroBuildOutputs' - condition: succeeded() + # Only produced when the OptProf bootstrapper runs; skip when OptProf collection is disabled. + condition: and(succeeded(), ${{ parameters.enableOptProf }}) - task: 1ES.PublishBuildArtifacts@1 displayName: 'Publish Artifact: logs' @@ -205,7 +210,7 @@ jobs: displayName: Tag build as ready for optimization training inputs: tags: 'ready-for-training' - condition: succeeded() + condition: and(succeeded(), ${{ parameters.enableOptProf }}) - task: ms-vseng.MicroBuildTasks.521a94ea-9e68-468a-8167-6dcf361ea776.MicroBuildCleanup@1 displayName: Execute cleanup tasks diff --git a/eng/Versions.props b/eng/Versions.props index 9ac277499f5..c0a0d7a22ef 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -2,7 +2,7 @@ - 16.11.20 + 16.11.21 release 15.1.0.0 preview