From 67d7ed0741c3e585d4c98ed50897d742ce914676 Mon Sep 17 00:00:00 2001 From: David Barbet Date: Wed, 27 Sep 2023 17:12:12 -0700 Subject: [PATCH 01/41] Include sqlite binaries to enable persistent storage in vscode --- eng/SymbolPublishingExclusionsFile.txt | 8 ++++++++ eng/build.ps1 | 3 +++ ...icrosoft.CodeAnalysis.LanguageServer.csproj | 18 +++++++++--------- 3 files changed, 20 insertions(+), 9 deletions(-) create mode 100644 eng/SymbolPublishingExclusionsFile.txt diff --git a/eng/SymbolPublishingExclusionsFile.txt b/eng/SymbolPublishingExclusionsFile.txt new file mode 100644 index 0000000000000..41543b52df7fe --- /dev/null +++ b/eng/SymbolPublishingExclusionsFile.txt @@ -0,0 +1,8 @@ +content/LanguageServer/alpine-arm64/libe_sqlite3.so +content/LanguageServer/alpine-x64/libe_sqlite3.so +content/LanguageServer/neutral/runtimes/alpine-arm64/native/libe_sqlite3.so +content/LanguageServer/neutral/runtimes/alpine-arm/native/libe_sqlite3.so +content/LanguageServer/neutral/runtimes/alpine-x64/native/libe_sqlite3.so +content/LanguageServer/neutral/runtimes/linux-musl-arm64/native/libe_sqlite3.so +content/LanguageServer/neutral/runtimes/linux-musl-arm/native/libe_sqlite3.so +content/LanguageServer/neutral/runtimes/linux-musl-x64/native/libe_sqlite3.so \ No newline at end of file diff --git a/eng/build.ps1 b/eng/build.ps1 index 5c35898bc1c0d..f2f3568a7d03e 100644 --- a/eng/build.ps1 +++ b/eng/build.ps1 @@ -263,6 +263,8 @@ function BuildSolution() { $isNpmAvailable = IsNpmAvailable + $symbolPublishingExcludeFile = Join-Path $RepoRoot "eng\SymbolPublishingExclusionsFile.txt" + try { MSBuild $toolsetBuildProj ` $bl ` @@ -286,6 +288,7 @@ function BuildSolution() { /p:VisualStudioIbcDrop=$ibcDropName ` /p:VisualStudioDropAccessToken=$officialVisualStudioDropAccessToken ` /p:IsNpmPackable=$isNpmAvailable ` + /p:SymbolPublishingExclusionsFile=$symbolPublishingExcludeFile ` $suppressExtensionDeployment ` $msbuildWarnAsError ` $buildFromSource ` diff --git a/src/Features/LanguageServer/Microsoft.CodeAnalysis.LanguageServer/Microsoft.CodeAnalysis.LanguageServer.csproj b/src/Features/LanguageServer/Microsoft.CodeAnalysis.LanguageServer/Microsoft.CodeAnalysis.LanguageServer.csproj index 566250a4b2755..91f57ec3ef380 100644 --- a/src/Features/LanguageServer/Microsoft.CodeAnalysis.LanguageServer/Microsoft.CodeAnalysis.LanguageServer.csproj +++ b/src/Features/LanguageServer/Microsoft.CodeAnalysis.LanguageServer/Microsoft.CodeAnalysis.LanguageServer.csproj @@ -75,6 +75,13 @@ + + + + + @@ -129,20 +136,13 @@ - + - + From 72986d5456c7025666040c40980a0ee3aedc2c3f Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Wed, 24 Apr 2024 14:56:21 -0700 Subject: [PATCH 02/41] Enable Arcade V3 publishing in PR Validation --- azure-pipelines-pr-validation.yml | 514 ++++++++++++++++-------------- 1 file changed, 282 insertions(+), 232 deletions(-) diff --git a/azure-pipelines-pr-validation.yml b/azure-pipelines-pr-validation.yml index d918f22289781..9522f2610d787 100644 --- a/azure-pipelines-pr-validation.yml +++ b/azure-pipelines-pr-validation.yml @@ -1,12 +1,12 @@ -resources: -- repo: self - clean: true +trigger: none +pr: none -# Variables defined in yml cannot be overridden at queue time instead overrideable variables must be defined in the web gui. -# Commenting out until AzDO supports something like the runtime parameters outlined here: https://github.com/Microsoft/azure-pipelines-yaml/pull/129 -#variables: -# SignType: test -# IbcDrop: 'default' +resources: + repositories: + - repository: 1ESPipelineTemplates + type: git + name: 1ESPipelineTemplates/1ESPipelineTemplates + ref: refs/tags/release parameters: - name: PRNumber @@ -22,10 +22,25 @@ parameters: - name: InsertToolset type: boolean default: true + +- name: IbcDrop + type: string + default: default + +- name: SignType + default: real + type: string + values: + - real + - name: SkipApplyOptimizationData type: boolean default: false +- name: SkipTests + type: boolean + default: true + # The variables `_DotNetArtifactsCategory` and `_DotNetValidationArtifactsCategory` are required for proper publishing of build artifacts. See https://github.com/dotnet/roslyn/pull/38259 variables: - name: _DotNetArtifactsCategory @@ -47,233 +62,268 @@ variables: - name: Codeql.SkipTaskAutoInjection value: true -stages: -- stage: build - displayName: Build and Test - - jobs: - - - job: PRValidationBuild - displayName: PR Validation Build - timeoutInMinutes: 360 - # Conditionally set build pool so we can share this YAML when building with different pipeline +extends: + template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates + parameters: + featureFlags: + autoBaseline: true + sdl: + sbom: + enabled: false pool: name: VSEngSS-MicroBuild2022-1ES demands: - msbuild - visualstudio - DotNetFramework - - steps: - - powershell: Write-Host "##vso[task.setvariable variable=SourceBranchName]$('$(Build.SourceBranch)'.Substring('refs/heads/'.Length))" - displayName: Setting SourceBranchName variable - condition: succeeded() - - - task: Powershell@2 - displayName: Tag PR validation build - inputs: - targetType: inline - script: | - Write-Host "##vso[build.addBuildTag]OfficialBuild" - Write-Host "##vso[build.addBuildTag]${{ parameters.CommitSHA }}" - Write-Host "##vso[build.addBuildTag]PRNumber${{ parameters.PRNumber }}" - condition: succeeded() - - - task: PowerShell@2 - displayName: Setup branch for insertion validation - inputs: - filePath: 'eng\setup-pr-validation.ps1' - arguments: '-sourceBranchName $(SourceBranchName) -prNumber ${{ parameters.PRNumber }} -commitSHA ${{ parameters.CommitSHA }}' - condition: succeeded() - - - powershell: Write-Host "##vso[task.setvariable variable=VisualStudio.DropName]Products/$(System.TeamProject)/$(Build.Repository.Name)/$(SourceBranchName)/$(Build.BuildNumber)" - displayName: Setting VisualStudio.DropName variable - - - task: NuGetToolInstaller@0 - inputs: - versionSpec: '4.9.2' - - # Authenticate with service connections to be able to publish packages to external nuget feeds. - - task: NuGetAuthenticate@1 - inputs: - nuGetServiceConnections: azure-public/vs-impl, azure-public/vssdk - - # Needed because the build fails the NuGet Tools restore without it - - task: UseDotNet@2 - displayName: 'Use .NET Core sdk' - inputs: - packageType: sdk - useGlobalJson: true - workingDirectory: '$(Build.SourcesDirectory)' - - # Needed to restore the Microsoft.DevDiv.Optimization.Data.PowerShell package - - task: NuGetCommand@2 - displayName: Restore internal tools - inputs: - command: restore - feedsToUse: config - restoreSolution: 'eng\common\internal\Tools.csproj' - nugetConfigPath: 'NuGet.config' - restoreDirectory: '$(Build.SourcesDirectory)\.packages' - - - task: MicroBuildSigningPlugin@4 - inputs: - signType: $(SignType) - zipSources: false - condition: and(succeeded(), in(variables['SignType'], 'test', 'real')) - - - task: PowerShell@2 - displayName: Build - inputs: - filePath: eng/build.ps1 - arguments: -ci - -prepareMachine - -restore - -build - -pack - -sign - -publish - -bootstrap - -binaryLog - -configuration $(BuildConfiguration) - -officialBuildId $(Build.BuildNumber) - -officialSkipTests $(SkipTests) - -officialSkipApplyOptimizationData $(SkipApplyOptimizationData) - -officialSourceBranchName $(SourceBranchName) - -officialIbcDrop $(IbcDrop) - -officialVisualStudioDropAccessToken $(_DevDivDropAccessToken) - /p:RepositoryName=$(Build.Repository.Name) - /p:VisualStudioDropName=$(VisualStudio.DropName) - /p:DotNetSignType=$(SignType) - /p:DotNetPublishToBlobFeed=false - /p:PublishToSymbolServer=false - /p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat) - /p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat) - /p:DotNetArtifactsCategory=$(_DotNetArtifactsCategory) - /p:DotnetPublishUsingPipelines=false - /p:IgnoreIbcMergeErrors=true - /p:PreReleaseVersionLabel=pr-validation - /p:IgnoreIbcMergeErrors=true - condition: succeeded() - - - template: eng\common\templates\steps\generate-sbom.yml - - - task: PowerShell@2 - displayName: Publish Assets - inputs: - filePath: 'eng\publish-assets.ps1' - arguments: '-configuration $(BuildConfiguration) -branchName "$(SourceBranchName)" -prValidation' - condition: succeeded() - - # Publish OptProf configuration files - - task: ms-vscs-artifact.build-tasks.artifactDropTask-1.artifactDropTask@0 - inputs: - dropServiceURI: 'https://devdiv.artifacts.visualstudio.com' - buildNumber: 'ProfilingInputs/$(System.TeamProject)/$(Build.Repository.Name)/$(SourceBranchName)/$(Build.BuildNumber)' - sourcePath: '$(Build.SourcesDirectory)\artifacts\OptProf\$(BuildConfiguration)\Data' - toLowerCase: false - usePat: true - AccessToken: $(_DevDivDropAccessToken) - retentionDays: 90 - displayName: 'OptProf - Publish to Artifact Services - ProfilingInputs' - condition: succeeded() - - # Publish OptProf generated JSON files as a build artifact. This allows for easy inspection from - # a build execution. - - task: PublishBuildArtifacts@1 - displayName: Publish OptProf Data Files - inputs: - PathtoPublish: '$(Build.SourcesDirectory)\artifacts\OptProf\$(BuildConfiguration)\Data' - ArtifactName: 'OptProf Data Files' - condition: succeeded() - - - task: PublishBuildArtifacts@1 - displayName: Publish Logs - inputs: - PathtoPublish: '$(Build.SourcesDirectory)\artifacts\log\$(BuildConfiguration)' - ArtifactName: 'Build Diagnostic Files' - publishLocation: Container - continueOnError: true - condition: succeededOrFailed() - - - task: PublishBuildArtifacts@1 - displayName: Publish Ngen Logs - inputs: - PathtoPublish: '$(Build.SourcesDirectory)\artifacts\log\$(BuildConfiguration)\ngen' - ArtifactName: 'NGen Logs' - publishLocation: Container - continueOnError: true - condition: succeeded() - - - task: PublishTestResults@2 - displayName: Publish xUnit Test Results - inputs: - testRunner: XUnit - testResultsFiles: '$(Build.SourcesDirectory)\artifacts\TestResults\$(BuildConfiguration)\*.xml' - mergeTestResults: true - testRunTitle: 'Unit Tests' - condition: and(succeededOrFailed(), ne(variables['SkipTests'], 'true')) - - # Publishes setup VSIXes to a drop. - # Note: The insertion tool looks for the display name of this task in the logs. - - task: ms-vseng.MicroBuildTasks.4305a8de-ba66-4d8b-b2d1-0dc4ecbbf5e8.MicroBuildUploadVstsDropFolder@1 - displayName: Upload VSTS Drop - inputs: - DropName: $(VisualStudio.DropName) - DropFolder: 'artifacts\VSSetup\$(BuildConfiguration)\Insertion' - AccessToken: $(_DevDivDropAccessToken) - condition: succeeded() - - # Publish insertion packages to CoreXT store. - - task: NuGetCommand@2 - displayName: Publish CoreXT Packages - inputs: - command: push - packagesToPush: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(BuildConfiguration)\DevDivPackages\**\*.nupkg' - allowPackageConflicts: true - feedsToUse: config - publishVstsFeed: '97a41293-2972-4f48-8c0e-05493ae82010' - condition: succeeded() - - # Publish an artifact that the RoslynInsertionTool is able to find by its name. - - task: PublishBuildArtifacts@1 - displayName: Publish Artifact VSSetup - inputs: - PathtoPublish: 'artifacts\VSSetup\$(BuildConfiguration)' - ArtifactName: 'VSSetup' - condition: succeeded() - - - task: ms-vseng.MicroBuildTasks.521a94ea-9e68-468a-8167-6dcf361ea776.MicroBuildCleanup@1 - displayName: Perform Cleanup Tasks - condition: succeededOrFailed() - -- stage: insert - displayName: Create Insertion - dependsOn: - - build - - jobs: - - job: insert - displayName: Insert to VS - pool: - vmImage: windows-2019 - steps: - - powershell: Write-Host "##vso[task.setvariable variable=SourceBranchName]$('$(Build.SourceBranch)'.Substring('refs/heads/'.Length))" - displayName: Setting SourceBranchName variable - condition: succeeded() - - - template: eng/pipelines/insert.yml - parameters: - createDraftPR: true - autoComplete: false - insertToolset: ${{ parameters.InsertToolset }} - buildUserName: "dn-bot@microsoft.com" - buildPassword: $(dn-bot-devdiv-build-e-code-full-release-e-packaging-r) - componentUserName: "dn-bot@microsoft.com" - componentPassword: $(dn-bot-dnceng-build-e-code-full-release-e-packaging-r) - vsBranchName: ${{ parameters.VisualStudioBranchName }} - titlePrefix: ${{ parameters.OptionalTitlePrefix }} - sourceBranch: $(SourceBranchName) - publishDataURI: "https://raw.githubusercontent.com/dotnet/roslyn/main/eng/config/PublishData.json" - queueSpeedometerValidation: true - + customBuildTags: + - ES365AIMigrationTooling + stages: + + - stage: build + displayName: Build and Test + + jobs: + - job: PRValidationBuild + displayName: PR Validation Build + timeoutInMinutes: 360 + templateContext: + outputs: + + # Publish OptProf generated JSON files as a pipeline artifact. This allows for easy inspection from + # a build execution. + - output: pipelineArtifact + displayName: 'Publish OptProf Data Files' + condition: succeeded() + targetPath: '$(Build.SourcesDirectory)\artifacts\OptProf\$(BuildConfiguration)\Data' + artifactName: 'OptProf Data Files' + + - output: pipelineArtifact + displayName: 'Publish Logs' + condition: succeededOrFailed() + targetPath: '$(Build.SourcesDirectory)\artifacts\log\$(BuildConfiguration)' + artifactName: 'Build Diagnostic Files' + publishLocation: Container + + - output: pipelineArtifact + displayName: 'Publish Ngen Logs' + condition: succeeded() + targetPath: '$(Build.SourcesDirectory)\artifacts\log\$(BuildConfiguration)\ngen' + artifactName: 'NGen Logs' + publishLocation: Container + + # Publishes setup VSIXes to a drop. + # Note: The insertion tool looks for the display name of this task in the logs. + - output: microBuildVstsDrop + displayName: Upload VSTS Drop + condition: succeeded() + dropFolder: 'artifacts\VSSetup\$(BuildConfiguration)\Insertion' + dropName: $(VisualStudio.DropName) + accessToken: $(_DevDivDropAccessToken) + + # Publish insertion packages to CoreXT store. + - output: nuget + displayName: 'Publish CoreXT Packages' + condition: succeeded() + packageParentPath: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(BuildConfiguration)\DevDivPackages' + packagesToPush: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(BuildConfiguration)\DevDivPackages\**\*.nupkg' + allowPackageConflicts: true + nuGetFeedType: internal + publishVstsFeed: '97a41293-2972-4f48-8c0e-05493ae82010' + + # Publish an artifact that the RoslynInsertionTool is able to find by its name. + - output: pipelineArtifact + displayName: 'Publish Artifact VSSetup' + condition: succeeded() + targetPath: 'artifacts\VSSetup\$(BuildConfiguration)' + artifactName: 'VSSetup' + + # Publish our NuPkgs as an artifact. The name of this artifact must be PackageArtifacts as the + # arcade templates depend on the name. + - output: buildArtifacts + displayName: 'Publish Artifact Packages' + condition: succeeded() + PathtoPublish: 'artifacts\packages\$(BuildConfiguration)' + ArtifactName: 'PackageArtifacts' + + # Publish Asset Manifests for Build Asset Registry job + - output: buildArtifacts + displayName: 'Publish Asset Manifests' + condition: succeeded() + PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/$(BuildConfiguration)/AssetManifest' + ArtifactName: AssetManifests + + steps: + - powershell: Write-Host "##vso[task.setvariable variable=SourceBranchName]$('$(Build.SourceBranch)'.Substring('refs/heads/'.Length))" + displayName: Setting SourceBranchName variable + condition: succeeded() + + - task: Powershell@2 + displayName: Tag PR validation build + inputs: + targetType: inline + script: | + Write-Host "##vso[build.addBuildTag]OfficialBuild" + Write-Host "##vso[build.addBuildTag]${{ parameters.CommitSHA }}" + Write-Host "##vso[build.addBuildTag]PRNumber${{ parameters.PRNumber }}" + condition: succeeded() + + - task: PowerShell@2 + displayName: Setup branch for insertion validation + inputs: + filePath: 'eng\setup-pr-validation.ps1' + arguments: '-sourceBranchName $(SourceBranchName) -prNumber ${{ parameters.PRNumber }} -commitSHA ${{ parameters.CommitSHA }}' + condition: succeeded() + + - powershell: Write-Host "##vso[task.setvariable variable=VisualStudio.DropName]Products/$(System.TeamProject)/$(Build.Repository.Name)/$(SourceBranchName)/$(Build.BuildNumber)" + displayName: Setting VisualStudio.DropName variable + + - task: NuGetToolInstaller@0 + inputs: + versionSpec: '4.9.2' + + # Authenticate with service connections to be able to publish packages to external nuget feeds. + - task: NuGetAuthenticate@1 + inputs: + nuGetServiceConnections: azure-public/vs-impl, azure-public/vssdk + + # Needed because the build fails the NuGet Tools restore without it + - task: UseDotNet@2 + displayName: 'Use .NET Core sdk' + inputs: + packageType: sdk + useGlobalJson: true + workingDirectory: '$(Build.SourcesDirectory)' + + # Needed to restore the Microsoft.DevDiv.Optimization.Data.PowerShell package + - task: NuGetCommand@2 + displayName: Restore internal tools + inputs: + command: restore + feedsToUse: config + restoreSolution: 'eng\common\internal\Tools.csproj' + nugetConfigPath: 'NuGet.config' + restoreDirectory: '$(Build.SourcesDirectory)\.packages' + + - task: MicroBuildSigningPlugin@4 + inputs: + signType: $(SignType) + zipSources: false + condition: and(succeeded(), in(variables['SignType'], 'test', 'real')) + + - task: PowerShell@2 + displayName: Build + inputs: + filePath: eng/build.ps1 + arguments: -ci + -prepareMachine + -restore + -build + -pack + -sign + -publish + -bootstrap + -binaryLog + -configuration $(BuildConfiguration) + -officialBuildId $(Build.BuildNumber) + -officialSkipTests $(SkipTests) + -officialSkipApplyOptimizationData $(SkipApplyOptimizationData) + -officialSourceBranchName $(SourceBranchName) + -officialIbcDrop $(IbcDrop) + -officialVisualStudioDropAccessToken $(_DevDivDropAccessToken) + /p:RepositoryName=$(Build.Repository.Name) + /p:VisualStudioDropName=$(VisualStudio.DropName) + /p:DotNetSignType=$(SignType) + /p:PublishToSymbolServer=true + /p:DotNetArtifactsCategory=$(_DotNetArtifactsCategory) + /p:DotnetPublishUsingPipelines=false + /p:IgnoreIbcMergeErrors=true + /p:GenerateSbom=true + /p:PreReleaseVersionLabel=pr-validation + condition: succeeded() + + - template: eng\common\templates\steps\generate-sbom.yml + + - task: PowerShell@2 + displayName: Publish Assets + inputs: + filePath: 'eng\publish-assets.ps1' + arguments: '-configuration $(BuildConfiguration) -branchName "$(SourceBranchName)" -prValidation' + condition: succeeded() + + # Publish OptProf configuration files + - task: ms-vscs-artifact.build-tasks.artifactDropTask-1.artifactDropTask@0 + inputs: + dropServiceURI: 'https://devdiv.artifacts.visualstudio.com' + buildNumber: 'ProfilingInputs/$(System.TeamProject)/$(Build.Repository.Name)/$(SourceBranchName)/$(Build.BuildNumber)' + sourcePath: '$(Build.SourcesDirectory)\artifacts\OptProf\$(BuildConfiguration)\Data' + toLowerCase: false + usePat: true + AccessToken: $(_DevDivDropAccessToken) + retentionDays: 90 + displayName: 'OptProf - Publish to Artifact Services - ProfilingInputs' + condition: succeeded() + + - task: PublishTestResults@2 + displayName: Publish xUnit Test Results + inputs: + testRunner: XUnit + testResultsFiles: '$(Build.SourcesDirectory)\artifacts\TestResults\$(BuildConfiguration)\*.xml' + mergeTestResults: true + testRunTitle: 'Unit Tests' + condition: and(succeededOrFailed(), ne(variables['SkipTests'], 'true')) + + # Publish to Build Asset Registry + - template: /eng/common/templates-official/job/publish-build-assets.yml@self + parameters: + publishUsingPipelines: false + dependsOn: + - PRValidationBuild + pool: + name: VSEngSS-MicroBuild2022-1ES + + - task: ms-vseng.MicroBuildTasks.521a94ea-9e68-468a-8167-6dcf361ea776.MicroBuildCleanup@1 + displayName: Perform Cleanup Tasks + condition: succeededOrFailed() + + - stage: insert + dependsOn: + - publish_using_darc + displayName: Insert to VS + + jobs: + - job: insert + displayName: Insert to VS + pool: + vmImage: windows-2019 + steps: + - download: current + artifact: VSSetup + - powershell: | + $branchName = "$(Build.SourceBranch)".Substring("refs/heads/".Length) + Write-Host "##vso[task.setvariable variable=ComponentBranchName]$branchName" + displayName: Get Branch Name + - template: /eng/pipelines/insert.yml@self + parameters: + createDraftPR: true + autoComplete: false + insertToolset: ${{ parameters.InsertToolset }} + buildUserName: "dn-bot@microsoft.com" + buildPassword: $(dn-bot-devdiv-build-e-code-full-release-e-packaging-r) + componentUserName: "dn-bot@microsoft.com" + componentPassword: $(dn-bot-dnceng-build-e-code-full-release-e-packaging-r) + vsBranchName: ${{ parameters.VisualStudioBranchName }} + titlePrefix: ${{ parameters.OptionalTitlePrefix }} + sourceBranch: $(ComponentBranchName) + publishDataURI: "https://raw.githubusercontent.com/dotnet/roslyn/main/eng/config/PublishData.json" + queueSpeedometerValidation: true + + # Use post-build to publish symbol packages. + - template: /eng/common/templates-official/post-build/post-build.yml@self + parameters: + publishingInfraVersion: 3 + # Symbol validation is not entirely reliable as of yet, so should be turned off until + # https://github.com/dotnet/arcade/issues/2871 is resolved. + enableSymbolValidation: false + enableSourceLinkValidation: false + SDLValidationParameters: false From f55550170dd0d804e7ab5f6b33bac48985ebf22a Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Wed, 24 Apr 2024 15:07:46 -0700 Subject: [PATCH 03/41] Fix template reference --- azure-pipelines-pr-validation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines-pr-validation.yml b/azure-pipelines-pr-validation.yml index 9522f2610d787..97b66d6201598 100644 --- a/azure-pipelines-pr-validation.yml +++ b/azure-pipelines-pr-validation.yml @@ -242,7 +242,7 @@ extends: /p:PreReleaseVersionLabel=pr-validation condition: succeeded() - - template: eng\common\templates\steps\generate-sbom.yml + - template: eng\common\templates\steps\generate-sbom.yml@self - task: PowerShell@2 displayName: Publish Assets From 1b283a261a8e05054ff81fded1a89e704e3d0f58 Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Wed, 24 Apr 2024 15:10:41 -0700 Subject: [PATCH 04/41] Fix publish-build-template indentation --- azure-pipelines-pr-validation.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/azure-pipelines-pr-validation.yml b/azure-pipelines-pr-validation.yml index 97b66d6201598..3d7d11b78fa4d 100644 --- a/azure-pipelines-pr-validation.yml +++ b/azure-pipelines-pr-validation.yml @@ -273,19 +273,19 @@ extends: testRunTitle: 'Unit Tests' condition: and(succeededOrFailed(), ne(variables['SkipTests'], 'true')) - # Publish to Build Asset Registry - - template: /eng/common/templates-official/job/publish-build-assets.yml@self - parameters: - publishUsingPipelines: false - dependsOn: - - PRValidationBuild - pool: - name: VSEngSS-MicroBuild2022-1ES - - task: ms-vseng.MicroBuildTasks.521a94ea-9e68-468a-8167-6dcf361ea776.MicroBuildCleanup@1 displayName: Perform Cleanup Tasks condition: succeededOrFailed() + # Publish to Build Asset Registry + - template: /eng/common/templates-official/job/publish-build-assets.yml@self + parameters: + publishUsingPipelines: false + dependsOn: + - PRValidationBuild + pool: + name: VSEngSS-MicroBuild2022-1ES + - stage: insert dependsOn: - publish_using_darc From 085d6affb76b7a4b1ed4db5de7e51f515f2c5377 Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Wed, 24 Apr 2024 15:16:53 -0700 Subject: [PATCH 05/41] Fix post-build indentation --- azure-pipelines-pr-validation.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/azure-pipelines-pr-validation.yml b/azure-pipelines-pr-validation.yml index 3d7d11b78fa4d..751383fef3c1f 100644 --- a/azure-pipelines-pr-validation.yml +++ b/azure-pipelines-pr-validation.yml @@ -318,12 +318,12 @@ extends: publishDataURI: "https://raw.githubusercontent.com/dotnet/roslyn/main/eng/config/PublishData.json" queueSpeedometerValidation: true - # Use post-build to publish symbol packages. - - template: /eng/common/templates-official/post-build/post-build.yml@self - parameters: - publishingInfraVersion: 3 - # Symbol validation is not entirely reliable as of yet, so should be turned off until - # https://github.com/dotnet/arcade/issues/2871 is resolved. - enableSymbolValidation: false - enableSourceLinkValidation: false - SDLValidationParameters: false + # Use post-build to publish symbol packages. + - template: /eng/common/templates-official/post-build/post-build.yml@self + parameters: + publishingInfraVersion: 3 + # Symbol validation is not entirely reliable as of yet, so should be turned off until + # https://github.com/dotnet/arcade/issues/2871 is resolved. + enableSymbolValidation: false + enableSourceLinkValidation: false + SDLValidationParameters: false From 153c5afb9437c1711e418c8b25d0afc49ce5cd11 Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Wed, 24 Apr 2024 15:19:00 -0700 Subject: [PATCH 06/41] Use 1ES.PublishArtifacts task --- azure-pipelines-pr-validation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines-pr-validation.yml b/azure-pipelines-pr-validation.yml index 751383fef3c1f..837e315543714 100644 --- a/azure-pipelines-pr-validation.yml +++ b/azure-pipelines-pr-validation.yml @@ -252,7 +252,7 @@ extends: condition: succeeded() # Publish OptProf configuration files - - task: ms-vscs-artifact.build-tasks.artifactDropTask-1.artifactDropTask@0 + - task: 1ES.PublishArtifactsDrop@1 inputs: dropServiceURI: 'https://devdiv.artifacts.visualstudio.com' buildNumber: 'ProfilingInputs/$(System.TeamProject)/$(Build.Repository.Name)/$(SourceBranchName)/$(Build.BuildNumber)' From 49b5c5cdded871756e92da7e4e2986b9af4e5b63 Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Wed, 24 Apr 2024 15:20:41 -0700 Subject: [PATCH 07/41] Remove microbuild cleanup task --- azure-pipelines-pr-validation.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/azure-pipelines-pr-validation.yml b/azure-pipelines-pr-validation.yml index 837e315543714..acdfaf02b54d8 100644 --- a/azure-pipelines-pr-validation.yml +++ b/azure-pipelines-pr-validation.yml @@ -273,10 +273,6 @@ extends: testRunTitle: 'Unit Tests' condition: and(succeededOrFailed(), ne(variables['SkipTests'], 'true')) - - task: ms-vseng.MicroBuildTasks.521a94ea-9e68-468a-8167-6dcf361ea776.MicroBuildCleanup@1 - displayName: Perform Cleanup Tasks - condition: succeededOrFailed() - # Publish to Build Asset Registry - template: /eng/common/templates-official/job/publish-build-assets.yml@self parameters: From d492700ae0e671041ee87a8586ef94c3bf44bff0 Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Wed, 24 Apr 2024 15:44:32 -0700 Subject: [PATCH 08/41] Move ArtifactsDrop to outputs --- azure-pipelines-pr-validation.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/azure-pipelines-pr-validation.yml b/azure-pipelines-pr-validation.yml index acdfaf02b54d8..b8bd043e0a293 100644 --- a/azure-pipelines-pr-validation.yml +++ b/azure-pipelines-pr-validation.yml @@ -67,6 +67,7 @@ extends: parameters: featureFlags: autoBaseline: true + useArtifactDropTaskV1: true sdl: sbom: enabled: false @@ -90,6 +91,18 @@ extends: templateContext: outputs: + # Publish OptProf configuration files to the artifact service + - output: artifactsDrop + displayName: 'OptProf - Publish to Artifact Services - ProfilingInputs' + condition: succeeded() + dropServiceURI: 'https://devdiv.artifacts.visualstudio.com' + buildNumber: 'ProfilingInputs/$(System.TeamProject)/$(Build.Repository.Name)/$(SourceBranchName)/$(Build.BuildNumber)' + sourcePath: '$(Build.SourcesDirectory)\artifacts\OptProf\$(BuildConfiguration)\Data' + toLowerCase: false + usePat: true + AccessToken: $(_DevDivDropAccessToken) + retentionDays: 90 + # Publish OptProf generated JSON files as a pipeline artifact. This allows for easy inspection from # a build execution. - output: pipelineArtifact @@ -251,19 +264,6 @@ extends: arguments: '-configuration $(BuildConfiguration) -branchName "$(SourceBranchName)" -prValidation' condition: succeeded() - # Publish OptProf configuration files - - task: 1ES.PublishArtifactsDrop@1 - inputs: - dropServiceURI: 'https://devdiv.artifacts.visualstudio.com' - buildNumber: 'ProfilingInputs/$(System.TeamProject)/$(Build.Repository.Name)/$(SourceBranchName)/$(Build.BuildNumber)' - sourcePath: '$(Build.SourcesDirectory)\artifacts\OptProf\$(BuildConfiguration)\Data' - toLowerCase: false - usePat: true - AccessToken: $(_DevDivDropAccessToken) - retentionDays: 90 - displayName: 'OptProf - Publish to Artifact Services - ProfilingInputs' - condition: succeeded() - - task: PublishTestResults@2 displayName: Publish xUnit Test Results inputs: From 45a4cd25965cbb7c93d1c21ebe77085a2507fb5f Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Wed, 24 Apr 2024 15:45:27 -0700 Subject: [PATCH 09/41] Fix indentation --- azure-pipelines-pr-validation.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/azure-pipelines-pr-validation.yml b/azure-pipelines-pr-validation.yml index b8bd043e0a293..67c40de07a56b 100644 --- a/azure-pipelines-pr-validation.yml +++ b/azure-pipelines-pr-validation.yml @@ -93,15 +93,15 @@ extends: # Publish OptProf configuration files to the artifact service - output: artifactsDrop - displayName: 'OptProf - Publish to Artifact Services - ProfilingInputs' - condition: succeeded() - dropServiceURI: 'https://devdiv.artifacts.visualstudio.com' - buildNumber: 'ProfilingInputs/$(System.TeamProject)/$(Build.Repository.Name)/$(SourceBranchName)/$(Build.BuildNumber)' - sourcePath: '$(Build.SourcesDirectory)\artifacts\OptProf\$(BuildConfiguration)\Data' - toLowerCase: false - usePat: true - AccessToken: $(_DevDivDropAccessToken) - retentionDays: 90 + displayName: 'OptProf - Publish to Artifact Services - ProfilingInputs' + condition: succeeded() + dropServiceURI: 'https://devdiv.artifacts.visualstudio.com' + buildNumber: 'ProfilingInputs/$(System.TeamProject)/$(Build.Repository.Name)/$(SourceBranchName)/$(Build.BuildNumber)' + sourcePath: '$(Build.SourcesDirectory)\artifacts\OptProf\$(BuildConfiguration)\Data' + toLowerCase: false + usePat: true + accessToken: $(_DevDivDropAccessToken) + retentionDays: 90 # Publish OptProf generated JSON files as a pipeline artifact. This allows for easy inspection from # a build execution. From 24f59350d906596f32d3faa37c82c661c3da0e06 Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Wed, 24 Apr 2024 16:51:18 -0700 Subject: [PATCH 10/41] Update generate-bom template path --- azure-pipelines-pr-validation.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines-pr-validation.yml b/azure-pipelines-pr-validation.yml index 67c40de07a56b..2d174368fc8c9 100644 --- a/azure-pipelines-pr-validation.yml +++ b/azure-pipelines-pr-validation.yml @@ -255,7 +255,7 @@ extends: /p:PreReleaseVersionLabel=pr-validation condition: succeeded() - - template: eng\common\templates\steps\generate-sbom.yml@self + - template: /eng/common/templates-official/steps/generate-sbom.yml@self - task: PowerShell@2 displayName: Publish Assets @@ -284,7 +284,7 @@ extends: - stage: insert dependsOn: - - publish_using_darc + - publish_using_darc displayName: Insert to VS jobs: From 49be78cdb48fb5add07d1b3a1621be7b8f4e3283 Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Wed, 24 Apr 2024 17:14:51 -0700 Subject: [PATCH 11/41] Fix bad merge --- azure-pipelines-pr-validation.yml | 15 +++++++-------- eng/build.ps1 | 3 --- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/azure-pipelines-pr-validation.yml b/azure-pipelines-pr-validation.yml index 2d174368fc8c9..f546002aaf57c 100644 --- a/azure-pipelines-pr-validation.yml +++ b/azure-pipelines-pr-validation.yml @@ -49,6 +49,10 @@ variables: value: .NETCoreValidation - group: DotNet-Roslyn-SDLValidation-Params - group: DotNet-Roslyn-Insertion-Variables + - name: Codeql.Enabled + value: false + - name: Codeql.SkipTaskAutoInjection + value: true # To retrieve OptProf data we need to authenticate to the VS drop storage. # If the pipeline is running in DevDiv, the account has access to the VS drop storage. @@ -57,20 +61,16 @@ variables: - name: _DevDivDropAccessToken value: $(System.AccessToken) - - name: Codeql.Enabled - value: false - - name: Codeql.SkipTaskAutoInjection - value: true - extends: template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates parameters: featureFlags: autoBaseline: true - useArtifactDropTaskV1: true sdl: sbom: enabled: false + suppression: + suppressionFile: $(Build.SourcesDirectory)\eng\config\guardian\.gdnsuppres pool: name: VSEngSS-MicroBuild2022-1ES demands: @@ -91,7 +91,7 @@ extends: templateContext: outputs: - # Publish OptProf configuration files to the artifact service + # Publish OptProf configuration files to the artifact service - output: artifactsDrop displayName: 'OptProf - Publish to Artifact Services - ProfilingInputs' condition: succeeded() @@ -235,7 +235,6 @@ extends: -pack -sign -publish - -bootstrap -binaryLog -configuration $(BuildConfiguration) -officialBuildId $(Build.BuildNumber) diff --git a/eng/build.ps1 b/eng/build.ps1 index 68a9c3a9bac3e..af07424b5c0d2 100644 --- a/eng/build.ps1 +++ b/eng/build.ps1 @@ -260,8 +260,6 @@ function BuildSolution() { $restoreUseStaticGraphEvaluation = $true - $isNpmAvailable = IsNpmAvailable - $symbolPublishingExcludeFile = Join-Path $RepoRoot "eng\SymbolPublishingExclusionsFile.txt" try { @@ -286,7 +284,6 @@ function BuildSolution() { /p:RestoreUseStaticGraphEvaluation=$restoreUseStaticGraphEvaluation ` /p:VisualStudioIbcDrop=$ibcDropName ` /p:VisualStudioDropAccessToken=$officialVisualStudioDropAccessToken ` - /p:IsNpmPackable=$isNpmAvailable ` /p:SymbolPublishingExclusionsFile=$symbolPublishingExcludeFile ` $suppressExtensionDeployment ` $msbuildWarnAsError ` From fd6187d5b714d472d4f1ea01e115751d2e87c6ef Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Wed, 24 Apr 2024 22:25:54 -0700 Subject: [PATCH 12/41] Set Build name and fixup old changes for CPM --- azure-pipelines-pr-validation.yml | 20 +++++++ ...crosoft.CodeAnalysis.LanguageServer.csproj | 53 +++++-------------- 2 files changed, 33 insertions(+), 40 deletions(-) diff --git a/azure-pipelines-pr-validation.yml b/azure-pipelines-pr-validation.yml index f546002aaf57c..174bc8ecbc9e8 100644 --- a/azure-pipelines-pr-validation.yml +++ b/azure-pipelines-pr-validation.yml @@ -58,6 +58,8 @@ variables: # If the pipeline is running in DevDiv, the account has access to the VS drop storage. # Get $AccessToken-dotnet-build-bot-public-repo from DotNet-GitHub-Versions-Repo-Write - group: DotNet-GitHub-Versions-Repo-Write + - name: Roslyn.GitHubToken + value: $(AccessToken-dotnet-build-bot-public-repo) - name: _DevDivDropAccessToken value: $(System.AccessToken) @@ -171,6 +173,24 @@ extends: displayName: Setting SourceBranchName variable condition: succeeded() + - task: Powershell@2 + displayName: Set build name + inputs: + targetType: inline + script: | + $pull_request = Invoke-RestMethod -Uri "https://api.github.com/repos/dotnet/roslyn/pulls/${{ parameters.PRNumber }}" ` + -Headers @{ + "Accept" = "application/vnd.github+json"; + "Authorization" = "Bearer $(Roslyn.GitHubToken)"; + "X-GitHub-Api-Version" = "2022-11-28" + } + $buildNumberName = "Validating '$pull_request.title' against VS:{{ parameters.VisualStudioBranchName }} #" + # Maximum buildnumber length is 255 chars + if ($buildNumberName.Length -GT 255) { + $buildNumberName = $buildNumberName.Substring(0, 255) + } + Write-Host "##vso[build.updatebuildnumber]$buildNumberName" + - task: Powershell@2 displayName: Tag PR validation build inputs: diff --git a/src/Features/LanguageServer/Microsoft.CodeAnalysis.LanguageServer/Microsoft.CodeAnalysis.LanguageServer.csproj b/src/Features/LanguageServer/Microsoft.CodeAnalysis.LanguageServer/Microsoft.CodeAnalysis.LanguageServer.csproj index cdc60dacfb166..dc4acdbaf0a78 100644 --- a/src/Features/LanguageServer/Microsoft.CodeAnalysis.LanguageServer/Microsoft.CodeAnalysis.LanguageServer.csproj +++ b/src/Features/LanguageServer/Microsoft.CodeAnalysis.LanguageServer/Microsoft.CodeAnalysis.LanguageServer.csproj @@ -76,27 +76,23 @@ - - - - - - - - - - - - - - + + + + + + + + + + - - - + + + @@ -138,29 +134,6 @@ - - - - <_NetFrameworkBuildHostProjectReference Include="..\..\..\Workspaces\Core\MSBuild.BuildHost\Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.csproj"> - net472 - - - - - - - - - - - - - - From 60c49684ac9aad2aadb00c9932c16f44f1e0900a Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Wed, 24 Apr 2024 22:43:55 -0700 Subject: [PATCH 13/41] Fix up set build name script --- azure-pipelines-pr-validation.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/azure-pipelines-pr-validation.yml b/azure-pipelines-pr-validation.yml index 174bc8ecbc9e8..c93ea916e0dfd 100644 --- a/azure-pipelines-pr-validation.yml +++ b/azure-pipelines-pr-validation.yml @@ -181,10 +181,9 @@ extends: $pull_request = Invoke-RestMethod -Uri "https://api.github.com/repos/dotnet/roslyn/pulls/${{ parameters.PRNumber }}" ` -Headers @{ "Accept" = "application/vnd.github+json"; - "Authorization" = "Bearer $(Roslyn.GitHubToken)"; "X-GitHub-Api-Version" = "2022-11-28" } - $buildNumberName = "Validating '$pull_request.title' against VS:{{ parameters.VisualStudioBranchName }} #" + $buildNumberName = "Validating '$($pull_request.title)' against VS:{{ parameters.VisualStudioBranchName }} #" # Maximum buildnumber length is 255 chars if ($buildNumberName.Length -GT 255) { $buildNumberName = $buildNumberName.Substring(0, 255) From 002536e1525ef4e29fb82f9e659ab7e6d678efd8 Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Wed, 24 Apr 2024 22:59:21 -0700 Subject: [PATCH 14/41] Replace invalid charachers in build name --- azure-pipelines-pr-validation.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines-pr-validation.yml b/azure-pipelines-pr-validation.yml index c93ea916e0dfd..5a4e7c4aebf13 100644 --- a/azure-pipelines-pr-validation.yml +++ b/azure-pipelines-pr-validation.yml @@ -184,6 +184,7 @@ extends: "X-GitHub-Api-Version" = "2022-11-28" } $buildNumberName = "Validating '$($pull_request.title)' against VS:{{ parameters.VisualStudioBranchName }} #" + $buildNumberName = $buildNumberName -replace '["/:<>\|?@*]','_' # Maximum buildnumber length is 255 chars if ($buildNumberName.Length -GT 255) { $buildNumberName = $buildNumberName.Substring(0, 255) From 3e2364ea7d60e2e304bf9b1d27bf42025ab604ce Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Wed, 24 Apr 2024 23:33:58 -0700 Subject: [PATCH 15/41] Cleanup --- azure-pipelines-pr-validation.yml | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/azure-pipelines-pr-validation.yml b/azure-pipelines-pr-validation.yml index 5a4e7c4aebf13..e7d294a392dcf 100644 --- a/azure-pipelines-pr-validation.yml +++ b/azure-pipelines-pr-validation.yml @@ -22,25 +22,10 @@ parameters: - name: InsertToolset type: boolean default: true - -- name: IbcDrop - type: string - default: default - -- name: SignType - default: real - type: string - values: - - real - - name: SkipApplyOptimizationData type: boolean default: false -- name: SkipTests - type: boolean - default: true - # The variables `_DotNetArtifactsCategory` and `_DotNetValidationArtifactsCategory` are required for proper publishing of build artifacts. See https://github.com/dotnet/roslyn/pull/38259 variables: - name: _DotNetArtifactsCategory @@ -58,8 +43,6 @@ variables: # If the pipeline is running in DevDiv, the account has access to the VS drop storage. # Get $AccessToken-dotnet-build-bot-public-repo from DotNet-GitHub-Versions-Repo-Write - group: DotNet-GitHub-Versions-Repo-Write - - name: Roslyn.GitHubToken - value: $(AccessToken-dotnet-build-bot-public-repo) - name: _DevDivDropAccessToken value: $(System.AccessToken) @@ -183,7 +166,7 @@ extends: "Accept" = "application/vnd.github+json"; "X-GitHub-Api-Version" = "2022-11-28" } - $buildNumberName = "Validating '$($pull_request.title)' against VS:{{ parameters.VisualStudioBranchName }} #" + $buildNumberName = "Validating $(pull_request.user.login) '$($pull_request.title)' against VS ${{ parameters.VisualStudioBranchName }} #" $buildNumberName = $buildNumberName -replace '["/:<>\|?@*]','_' # Maximum buildnumber length is 255 chars if ($buildNumberName.Length -GT 255) { From 1d7cab4232f37f201aaf111fd1c46da918351433 Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Wed, 24 Apr 2024 23:43:10 -0700 Subject: [PATCH 16/41] Add missing $ --- azure-pipelines-pr-validation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines-pr-validation.yml b/azure-pipelines-pr-validation.yml index e7d294a392dcf..a6599d525fd7b 100644 --- a/azure-pipelines-pr-validation.yml +++ b/azure-pipelines-pr-validation.yml @@ -166,7 +166,7 @@ extends: "Accept" = "application/vnd.github+json"; "X-GitHub-Api-Version" = "2022-11-28" } - $buildNumberName = "Validating $(pull_request.user.login) '$($pull_request.title)' against VS ${{ parameters.VisualStudioBranchName }} #" + $buildNumberName = "Validating $($pull_request.user.login) '$($pull_request.title)' against VS ${{ parameters.VisualStudioBranchName }} #" $buildNumberName = $buildNumberName -replace '["/:<>\|?@*]','_' # Maximum buildnumber length is 255 chars if ($buildNumberName.Length -GT 255) { From 38069fea493dfe69effc705851955b460324556e Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Wed, 24 Apr 2024 23:55:01 -0700 Subject: [PATCH 17/41] Preserve the original build number --- azure-pipelines-pr-validation.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/azure-pipelines-pr-validation.yml b/azure-pipelines-pr-validation.yml index a6599d525fd7b..dda4f93a77b2b 100644 --- a/azure-pipelines-pr-validation.yml +++ b/azure-pipelines-pr-validation.yml @@ -46,6 +46,9 @@ variables: - name: _DevDivDropAccessToken value: $(System.AccessToken) + - name OriginalBuildNumber + value: $(Build.BuildNumber) + extends: template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates parameters: @@ -81,7 +84,7 @@ extends: displayName: 'OptProf - Publish to Artifact Services - ProfilingInputs' condition: succeeded() dropServiceURI: 'https://devdiv.artifacts.visualstudio.com' - buildNumber: 'ProfilingInputs/$(System.TeamProject)/$(Build.Repository.Name)/$(SourceBranchName)/$(Build.BuildNumber)' + buildNumber: 'ProfilingInputs/$(System.TeamProject)/$(Build.Repository.Name)/$(SourceBranchName)/$(OriginalBuildNumber)' sourcePath: '$(Build.SourcesDirectory)\artifacts\OptProf\$(BuildConfiguration)\Data' toLowerCase: false usePat: true @@ -166,7 +169,7 @@ extends: "Accept" = "application/vnd.github+json"; "X-GitHub-Api-Version" = "2022-11-28" } - $buildNumberName = "Validating $($pull_request.user.login) '$($pull_request.title)' against VS ${{ parameters.VisualStudioBranchName }} #" + $buildNumberName = "$(OriginalBuildNumber) - $($pull_request.user.login) '$($pull_request.title)'" $buildNumberName = $buildNumberName -replace '["/:<>\|?@*]','_' # Maximum buildnumber length is 255 chars if ($buildNumberName.Length -GT 255) { @@ -191,7 +194,7 @@ extends: arguments: '-sourceBranchName $(SourceBranchName) -prNumber ${{ parameters.PRNumber }} -commitSHA ${{ parameters.CommitSHA }}' condition: succeeded() - - powershell: Write-Host "##vso[task.setvariable variable=VisualStudio.DropName]Products/$(System.TeamProject)/$(Build.Repository.Name)/$(SourceBranchName)/$(Build.BuildNumber)" + - powershell: Write-Host "##vso[task.setvariable variable=VisualStudio.DropName]Products/$(System.TeamProject)/$(Build.Repository.Name)/$(SourceBranchName)/$(OriginalBuildNumber)" displayName: Setting VisualStudio.DropName variable - task: NuGetToolInstaller@0 @@ -240,7 +243,7 @@ extends: -publish -binaryLog -configuration $(BuildConfiguration) - -officialBuildId $(Build.BuildNumber) + -officialBuildId $(OriginalBuildNumber) -officialSkipTests $(SkipTests) -officialSkipApplyOptimizationData $(SkipApplyOptimizationData) -officialSourceBranchName $(SourceBranchName) From 16a12dc4ae88a800066ff99e237981f1568d8849 Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Wed, 24 Apr 2024 23:56:11 -0700 Subject: [PATCH 18/41] Fix yaml --- azure-pipelines-pr-validation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines-pr-validation.yml b/azure-pipelines-pr-validation.yml index dda4f93a77b2b..2206e3409fd46 100644 --- a/azure-pipelines-pr-validation.yml +++ b/azure-pipelines-pr-validation.yml @@ -46,7 +46,7 @@ variables: - name: _DevDivDropAccessToken value: $(System.AccessToken) - - name OriginalBuildNumber + - name: OriginalBuildNumber value: $(Build.BuildNumber) extends: From b3bb2f0381bbfa423d2f613683d2ac5bc1a6af48 Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Thu, 25 Apr 2024 00:07:51 -0700 Subject: [PATCH 19/41] Try setting original build number differently --- azure-pipelines-pr-validation.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/azure-pipelines-pr-validation.yml b/azure-pipelines-pr-validation.yml index 2206e3409fd46..bf55be0151d0e 100644 --- a/azure-pipelines-pr-validation.yml +++ b/azure-pipelines-pr-validation.yml @@ -46,9 +46,6 @@ variables: - name: _DevDivDropAccessToken value: $(System.AccessToken) - - name: OriginalBuildNumber - value: $(Build.BuildNumber) - extends: template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates parameters: @@ -155,6 +152,10 @@ extends: ArtifactName: AssetManifests steps: + - powershell: Write-Host "##vso[task.setvariable variable=OriginalBuildNumber]$('$(Build.BuildNumber)')" + displayName: Setting OriginalBuildNumber variable + condition: succeeded() + - powershell: Write-Host "##vso[task.setvariable variable=SourceBranchName]$('$(Build.SourceBranch)'.Substring('refs/heads/'.Length))" displayName: Setting SourceBranchName variable condition: succeeded() From 56ba906d6b5ab930c2df49a5409a011c4386731a Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Thu, 25 Apr 2024 07:44:09 -0700 Subject: [PATCH 20/41] Set PublishUsingPipelines --- azure-pipelines-pr-validation.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines-pr-validation.yml b/azure-pipelines-pr-validation.yml index bf55be0151d0e..f661cb44e3cbd 100644 --- a/azure-pipelines-pr-validation.yml +++ b/azure-pipelines-pr-validation.yml @@ -170,7 +170,7 @@ extends: "Accept" = "application/vnd.github+json"; "X-GitHub-Api-Version" = "2022-11-28" } - $buildNumberName = "$(OriginalBuildNumber) - $($pull_request.user.login) '$($pull_request.title)'" + $buildNumberName = "$(OriginalBuildNumber) - $($pull_request.user.login) - '$($pull_request.title)'" $buildNumberName = $buildNumberName -replace '["/:<>\|?@*]','_' # Maximum buildnumber length is 255 chars if ($buildNumberName.Length -GT 255) { @@ -255,7 +255,7 @@ extends: /p:DotNetSignType=$(SignType) /p:PublishToSymbolServer=true /p:DotNetArtifactsCategory=$(_DotNetArtifactsCategory) - /p:DotnetPublishUsingPipelines=false + /p:DotnetPublishUsingPipelines=true /p:IgnoreIbcMergeErrors=true /p:GenerateSbom=true /p:PreReleaseVersionLabel=pr-validation From 49cd4ed6b4a7d91605dc3028b4cb127867b4cc43 Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Thu, 25 Apr 2024 16:42:08 -0700 Subject: [PATCH 21/41] Update Publishing.props to remove packages during pr-val run --- azure-pipelines-pr-validation.yml | 2 +- eng/Publishing.props | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/azure-pipelines-pr-validation.yml b/azure-pipelines-pr-validation.yml index f661cb44e3cbd..a67ac4f30ba92 100644 --- a/azure-pipelines-pr-validation.yml +++ b/azure-pipelines-pr-validation.yml @@ -282,7 +282,7 @@ extends: # Publish to Build Asset Registry - template: /eng/common/templates-official/job/publish-build-assets.yml@self parameters: - publishUsingPipelines: false + publishUsingPipelines: true dependsOn: - PRValidationBuild pool: diff --git a/eng/Publishing.props b/eng/Publishing.props index 797de4ea1decd..ceed06938431f 100644 --- a/eng/Publishing.props +++ b/eng/Publishing.props @@ -3,4 +3,16 @@ 3 + + + + $(PublishDependsOnTargets);_ResolvePublishRoslynNuGetPackages + + + + + + + + \ No newline at end of file From 538932ac6fc1c3bb3993e2edb560df1c8509c08f Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Thu, 25 Apr 2024 21:23:22 -0700 Subject: [PATCH 22/41] Set sdl sourceAnalysisPool --- azure-pipelines-pr-validation.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines-pr-validation.yml b/azure-pipelines-pr-validation.yml index a67ac4f30ba92..fc8eabdd3378a 100644 --- a/azure-pipelines-pr-validation.yml +++ b/azure-pipelines-pr-validation.yml @@ -52,6 +52,7 @@ extends: featureFlags: autoBaseline: true sdl: + sourceAnalysisPool: VSEngSS-MicroBuild2022-1ES sbom: enabled: false suppression: From 26d2d0da79c24fa217cb581f09d9cc9c61cf82cd Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Thu, 25 Apr 2024 23:16:14 -0700 Subject: [PATCH 23/41] Use unofficial template --- azure-pipelines-pr-validation.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/azure-pipelines-pr-validation.yml b/azure-pipelines-pr-validation.yml index fc8eabdd3378a..85f59325ad948 100644 --- a/azure-pipelines-pr-validation.yml +++ b/azure-pipelines-pr-validation.yml @@ -47,16 +47,10 @@ variables: value: $(System.AccessToken) extends: - template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates + template: v1/1ES.Unofficial.PipelineTemplate.yml@1ESPipelineTemplates parameters: - featureFlags: - autoBaseline: true sdl: - sourceAnalysisPool: VSEngSS-MicroBuild2022-1ES - sbom: - enabled: false - suppression: - suppressionFile: $(Build.SourcesDirectory)\eng\config\guardian\.gdnsuppres + enableAllTools: false pool: name: VSEngSS-MicroBuild2022-1ES demands: From 989119fca0a5c925b64f640757b427da5117c173 Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Fri, 26 Apr 2024 10:04:18 -0700 Subject: [PATCH 24/41] Reset build number --- azure-pipelines-pr-validation.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/azure-pipelines-pr-validation.yml b/azure-pipelines-pr-validation.yml index 85f59325ad948..d49db9839fff4 100644 --- a/azure-pipelines-pr-validation.yml +++ b/azure-pipelines-pr-validation.yml @@ -171,6 +171,7 @@ extends: if ($buildNumberName.Length -GT 255) { $buildNumberName = $buildNumberName.Substring(0, 255) } + Write-Host "##vso[task.setvariable variable=FancyBuildNumber]$buildNumberName" Write-Host "##vso[build.updatebuildnumber]$buildNumberName" - task: Powershell@2 @@ -274,6 +275,11 @@ extends: testRunTitle: 'Unit Tests' condition: and(succeededOrFailed(), ne(variables['SkipTests'], 'true')) + # We need to reset the BuildNumber before we pass off to Arcade + - powershell: Write-Host "##vso[build.updatebuildnumber]$(OriginalBuildNumber)" + displayName: Reset BuildNumber + condition: succeeded() + # Publish to Build Asset Registry - template: /eng/common/templates-official/job/publish-build-assets.yml@self parameters: @@ -294,6 +300,10 @@ extends: pool: vmImage: windows-2019 steps: + # Arcade is done so we can set BuildNumber back + - powershell: Write-Host "##vso[build.updatebuildnumber]$(FancyBuildNumber)" + displayName: Reset BuildNumber + condition: succeeded() - download: current artifact: VSSetup - powershell: | @@ -314,6 +324,7 @@ extends: sourceBranch: $(ComponentBranchName) publishDataURI: "https://raw.githubusercontent.com/dotnet/roslyn/main/eng/config/PublishData.json" queueSpeedometerValidation: true + dropPath: '$(Pipeline.Workspace)\VSSetup' # Use post-build to publish symbol packages. - template: /eng/common/templates-official/post-build/post-build.yml@self From 8e987801a3721e31ba0b03e3781a9cd1bd67e1e5 Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Fri, 26 Apr 2024 14:13:44 -0700 Subject: [PATCH 25/41] Use 1es hosted pool for creating VS Insertion. --- azure-pipelines-pr-validation.yml | 2 +- eng/Publishing.props | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/azure-pipelines-pr-validation.yml b/azure-pipelines-pr-validation.yml index d49db9839fff4..551435eaaf6bc 100644 --- a/azure-pipelines-pr-validation.yml +++ b/azure-pipelines-pr-validation.yml @@ -298,7 +298,7 @@ extends: - job: insert displayName: Insert to VS pool: - vmImage: windows-2019 + name: VSEngSS-MicroBuild2022-1ES steps: # Arcade is done so we can set BuildNumber back - powershell: Write-Host "##vso[build.updatebuildnumber]$(FancyBuildNumber)" diff --git a/eng/Publishing.props b/eng/Publishing.props index ceed06938431f..53cd822c62f47 100644 --- a/eng/Publishing.props +++ b/eng/Publishing.props @@ -4,12 +4,13 @@ 3 - - $(PublishDependsOnTargets);_ResolvePublishRoslynNuGetPackages + _ResolvePublishRoslynNuGetPackages;$(PublishDependsOnTargets) - + From f1d6d6e151ac2910d4f995b9d0f5b7f78e0fbaa1 Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Fri, 26 Apr 2024 16:30:03 -0700 Subject: [PATCH 26/41] Fix build number update --- azure-pipelines-pr-validation.yml | 11 +++++++---- eng/Publishing.props | 3 ++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/azure-pipelines-pr-validation.yml b/azure-pipelines-pr-validation.yml index 551435eaaf6bc..a36a9b3bb8bc7 100644 --- a/azure-pipelines-pr-validation.yml +++ b/azure-pipelines-pr-validation.yml @@ -147,16 +147,17 @@ extends: ArtifactName: AssetManifests steps: - - powershell: Write-Host "##vso[task.setvariable variable=OriginalBuildNumber]$('$(Build.BuildNumber)')" + - powershell: Write-Host "##vso[task.setvariable variable=OriginalBuildNumber;isreadonly=true]$('$(Build.BuildNumber)')" displayName: Setting OriginalBuildNumber variable condition: succeeded() - - powershell: Write-Host "##vso[task.setvariable variable=SourceBranchName]$('$(Build.SourceBranch)'.Substring('refs/heads/'.Length))" + - powershell: Write-Host "##vso[task.setvariable variable=SourceBranchName;isreadonly=true]$('$(Build.SourceBranch)'.Substring('refs/heads/'.Length))" displayName: Setting SourceBranchName variable condition: succeeded() - task: Powershell@2 - displayName: Set build name + name: FancyBuild + displayName: Setting FancyBuild.BuildNumber inputs: targetType: inline script: | @@ -171,7 +172,7 @@ extends: if ($buildNumberName.Length -GT 255) { $buildNumberName = $buildNumberName.Substring(0, 255) } - Write-Host "##vso[task.setvariable variable=FancyBuildNumber]$buildNumberName" + Write-Host "##vso[task.setvariable variable=BuildNumber;isoutput=true;isreadonly=true]$buildNumberName" Write-Host "##vso[build.updatebuildnumber]$buildNumberName" - task: Powershell@2 @@ -296,6 +297,8 @@ extends: jobs: - job: insert + variables: + FancyBuildNumber: $[stageDependencies.build.PRValidationBuild.outputs['FancyBuild.BuildNumber']] displayName: Insert to VS pool: name: VSEngSS-MicroBuild2022-1ES diff --git a/eng/Publishing.props b/eng/Publishing.props index 53cd822c62f47..ab29f57605296 100644 --- a/eng/Publishing.props +++ b/eng/Publishing.props @@ -13,7 +13,8 @@ BeforeTargets="PublishToAzureDevOpsArtifacts"> - + \ No newline at end of file From 31a4371adb97e6151b03716e20589bb794b1c130 Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Mon, 29 Apr 2024 14:57:08 -0700 Subject: [PATCH 27/41] Fix buildnumber reset and symbol publishing --- azure-pipelines-pr-validation.yml | 1 + eng/Publishing.props | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/azure-pipelines-pr-validation.yml b/azure-pipelines-pr-validation.yml index a36a9b3bb8bc7..9d249baede7f3 100644 --- a/azure-pipelines-pr-validation.yml +++ b/azure-pipelines-pr-validation.yml @@ -292,6 +292,7 @@ extends: - stage: insert dependsOn: + - build - publish_using_darc displayName: Insert to VS diff --git a/eng/Publishing.props b/eng/Publishing.props index ab29f57605296..386a421ba6ce5 100644 --- a/eng/Publishing.props +++ b/eng/Publishing.props @@ -11,10 +11,13 @@ - - - + + + <_SymbolPackagesToPush Include="@(ItemsToPushToBlobFeed)" Condition="$([System.String]::Copy(%(FullPath)).EndsWith('.symbols.nupkg'))" + \ No newline at end of file From 70752d107b67adb6bdb1ea171f1931fd1b87fc1b Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Mon, 29 Apr 2024 17:09:15 -0700 Subject: [PATCH 28/41] Fix bad xml --- eng/Publishing.props | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/eng/Publishing.props b/eng/Publishing.props index 386a421ba6ce5..aaf8ad7cab974 100644 --- a/eng/Publishing.props +++ b/eng/Publishing.props @@ -16,8 +16,11 @@ since our packages are published separately to the CoreXT feed. --> - <_SymbolPackagesToPush Include="@(ItemsToPushToBlobFeed)" Condition="$([System.String]::Copy(%(FullPath)).EndsWith('.symbols.nupkg'))" - + <_SymbolPackagesToPush Include="@(ItemsToPushToBlobFeed)" + Condition="$([System.String]::Copy(%(FullPath)).EndsWith('.symbols.nupkg'))" /> + + \ No newline at end of file From b8a1f9047066a69322c63394292c39cf274eb9ad Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Mon, 29 Apr 2024 20:44:50 -0700 Subject: [PATCH 29/41] Remove packages from being published --- eng/Publishing.props | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/eng/Publishing.props b/eng/Publishing.props index aaf8ad7cab974..c5c83efca092a 100644 --- a/eng/Publishing.props +++ b/eng/Publishing.props @@ -16,11 +16,19 @@ since our packages are published separately to the CoreXT feed. --> - <_SymbolPackagesToPush Include="@(ItemsToPushToBlobFeed)" + + <_NuGetPackagesToPush Include="@(ItemsToPushToBlobFeed)" + Condition=" '%(Extension)' == '.nupkg' " /> + + + <_SymbolPackagesToPush Include="@(_NuGetPackagesToPush)" Condition="$([System.String]::Copy(%(FullPath)).EndsWith('.symbols.nupkg'))" /> - + + + + + \ No newline at end of file From 8d138d90b7e520a32c4010342b3a9c81c5199688 Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Wed, 1 May 2024 15:29:02 -0700 Subject: [PATCH 30/41] Update exclusion file and fix vs insertion. --- azure-pipelines-pr-validation.yml | 8 ++++---- eng/SymbolPublishingExclusionsFile.txt | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/azure-pipelines-pr-validation.yml b/azure-pipelines-pr-validation.yml index 9d249baede7f3..0c10e657d46d0 100644 --- a/azure-pipelines-pr-validation.yml +++ b/azure-pipelines-pr-validation.yml @@ -304,10 +304,6 @@ extends: pool: name: VSEngSS-MicroBuild2022-1ES steps: - # Arcade is done so we can set BuildNumber back - - powershell: Write-Host "##vso[build.updatebuildnumber]$(FancyBuildNumber)" - displayName: Reset BuildNumber - condition: succeeded() - download: current artifact: VSSetup - powershell: | @@ -329,6 +325,10 @@ extends: publishDataURI: "https://raw.githubusercontent.com/dotnet/roslyn/main/eng/config/PublishData.json" queueSpeedometerValidation: true dropPath: '$(Pipeline.Workspace)\VSSetup' + # Arcade is done so we can set BuildNumber back + - powershell: Write-Host "##vso[build.updatebuildnumber]$(FancyBuildNumber)" + displayName: Reset BuildNumber + condition: succeeded() # Use post-build to publish symbol packages. - template: /eng/common/templates-official/post-build/post-build.yml@self diff --git a/eng/SymbolPublishingExclusionsFile.txt b/eng/SymbolPublishingExclusionsFile.txt index 41543b52df7fe..7f69b5489513b 100644 --- a/eng/SymbolPublishingExclusionsFile.txt +++ b/eng/SymbolPublishingExclusionsFile.txt @@ -1,5 +1,7 @@ content/LanguageServer/alpine-arm64/libe_sqlite3.so content/LanguageServer/alpine-x64/libe_sqlite3.so +content/LanguageServer/linux-musl-arm64/libe_sqlite3.so +content/LanguageServer/linux-musl-x64/libe_sqlite3.so content/LanguageServer/neutral/runtimes/alpine-arm64/native/libe_sqlite3.so content/LanguageServer/neutral/runtimes/alpine-arm/native/libe_sqlite3.so content/LanguageServer/neutral/runtimes/alpine-x64/native/libe_sqlite3.so From e42f3d8bf114571f2c2e299bd95ab3513cd39348 Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Wed, 1 May 2024 15:55:00 -0700 Subject: [PATCH 31/41] PR feedback. --- eng/Publishing.props | 13 +++++++------ eng/SymbolPublishingExclusionsFile.txt | 5 ----- eng/build.ps1 | 3 --- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/eng/Publishing.props b/eng/Publishing.props index c5c83efca092a..0f367adff3e22 100644 --- a/eng/Publishing.props +++ b/eng/Publishing.props @@ -8,14 +8,15 @@ _ResolvePublishRoslynNuGetPackages;$(PublishDependsOnTargets) + - - + BeforeTargets="PublishToAzureDevOpsArtifacts" + Condition=" '$(PreReleaseVersionLabel)' == 'pr-validation' "> + <_NuGetPackagesToPush Include="@(ItemsToPushToBlobFeed)" Condition=" '%(Extension)' == '.nupkg' " /> diff --git a/eng/SymbolPublishingExclusionsFile.txt b/eng/SymbolPublishingExclusionsFile.txt index 7f69b5489513b..1a5fa3389baa2 100644 --- a/eng/SymbolPublishingExclusionsFile.txt +++ b/eng/SymbolPublishingExclusionsFile.txt @@ -1,10 +1,5 @@ -content/LanguageServer/alpine-arm64/libe_sqlite3.so -content/LanguageServer/alpine-x64/libe_sqlite3.so content/LanguageServer/linux-musl-arm64/libe_sqlite3.so content/LanguageServer/linux-musl-x64/libe_sqlite3.so -content/LanguageServer/neutral/runtimes/alpine-arm64/native/libe_sqlite3.so -content/LanguageServer/neutral/runtimes/alpine-arm/native/libe_sqlite3.so -content/LanguageServer/neutral/runtimes/alpine-x64/native/libe_sqlite3.so content/LanguageServer/neutral/runtimes/linux-musl-arm64/native/libe_sqlite3.so content/LanguageServer/neutral/runtimes/linux-musl-arm/native/libe_sqlite3.so content/LanguageServer/neutral/runtimes/linux-musl-x64/native/libe_sqlite3.so \ No newline at end of file diff --git a/eng/build.ps1 b/eng/build.ps1 index af07424b5c0d2..edbcc77f9ec0e 100644 --- a/eng/build.ps1 +++ b/eng/build.ps1 @@ -260,8 +260,6 @@ function BuildSolution() { $restoreUseStaticGraphEvaluation = $true - $symbolPublishingExcludeFile = Join-Path $RepoRoot "eng\SymbolPublishingExclusionsFile.txt" - try { MSBuild $toolsetBuildProj ` $bl ` @@ -284,7 +282,6 @@ function BuildSolution() { /p:RestoreUseStaticGraphEvaluation=$restoreUseStaticGraphEvaluation ` /p:VisualStudioIbcDrop=$ibcDropName ` /p:VisualStudioDropAccessToken=$officialVisualStudioDropAccessToken ` - /p:SymbolPublishingExclusionsFile=$symbolPublishingExcludeFile ` $suppressExtensionDeployment ` $msbuildWarnAsError ` $buildFromSource ` From 572dae176ec39e19dbd38bb10be79d59ddc82554 Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Wed, 1 May 2024 21:58:32 -0700 Subject: [PATCH 32/41] Ignore the SDK warnings for SQLitePCLRaw. --- .../Microsoft.CodeAnalysis.LanguageServer.UnitTests.csproj | 6 ++++++ .../Microsoft.CodeAnalysis.LanguageServer.csproj | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/Features/LanguageServer/Microsoft.CodeAnalysis.LanguageServer.UnitTests/Microsoft.CodeAnalysis.LanguageServer.UnitTests.csproj b/src/Features/LanguageServer/Microsoft.CodeAnalysis.LanguageServer.UnitTests/Microsoft.CodeAnalysis.LanguageServer.UnitTests.csproj index d1514de4c67c8..77929c4963a52 100644 --- a/src/Features/LanguageServer/Microsoft.CodeAnalysis.LanguageServer.UnitTests/Microsoft.CodeAnalysis.LanguageServer.UnitTests.csproj +++ b/src/Features/LanguageServer/Microsoft.CodeAnalysis.LanguageServer.UnitTests/Microsoft.CodeAnalysis.LanguageServer.UnitTests.csproj @@ -7,6 +7,12 @@ UnitTest false + + + $(NoWarn);NETSDK1206 + diff --git a/src/Features/LanguageServer/Microsoft.CodeAnalysis.LanguageServer/Microsoft.CodeAnalysis.LanguageServer.csproj b/src/Features/LanguageServer/Microsoft.CodeAnalysis.LanguageServer/Microsoft.CodeAnalysis.LanguageServer.csproj index dc4acdbaf0a78..ab0ad8d348f91 100644 --- a/src/Features/LanguageServer/Microsoft.CodeAnalysis.LanguageServer/Microsoft.CodeAnalysis.LanguageServer.csproj +++ b/src/Features/LanguageServer/Microsoft.CodeAnalysis.LanguageServer/Microsoft.CodeAnalysis.LanguageServer.csproj @@ -33,8 +33,11 @@ --> PackPublishContent;$(BeforePack) - - $(NoWarn);NU5100 + + $(NoWarn);NU5100;NETSDK1206 false From 6a00a22dfc5f8ff0654bf63f5391d63ce82e81bd Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Thu, 2 May 2024 16:06:58 -0700 Subject: [PATCH 33/41] PR Feedback --- azure-pipelines-pr-validation.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/azure-pipelines-pr-validation.yml b/azure-pipelines-pr-validation.yml index 0c10e657d46d0..10194d8b3ebd7 100644 --- a/azure-pipelines-pr-validation.yml +++ b/azure-pipelines-pr-validation.yml @@ -113,6 +113,7 @@ extends: dropFolder: 'artifacts\VSSetup\$(BuildConfiguration)\Insertion' dropName: $(VisualStudio.DropName) accessToken: $(_DevDivDropAccessToken) + dropRetentionDays: 90 # Publish insertion packages to CoreXT store. - output: nuget @@ -167,11 +168,13 @@ extends: "X-GitHub-Api-Version" = "2022-11-28" } $buildNumberName = "$(OriginalBuildNumber) - $($pull_request.user.login) - '$($pull_request.title)'" - $buildNumberName = $buildNumberName -replace '["/:<>\|?@*]','_' - # Maximum buildnumber length is 255 chars - if ($buildNumberName.Length -GT 255) { - $buildNumberName = $buildNumberName.Substring(0, 255) + $buildNumberName = $buildNumberName -replace '["/:<>\|?@*`']','_' + # Maximum buildnumber length is 255 chars and we are going to append to the end to ensure we have space. + if ($buildNumberName.Length -GT 253) { + $buildNumberName = $buildNumberName.Substring(0, 253) } + # Avoid ever ending the BuildNumber with a `.` by always appending to it. + $buildNumberName += ' #' Write-Host "##vso[task.setvariable variable=BuildNumber;isoutput=true;isreadonly=true]$buildNumberName" Write-Host "##vso[build.updatebuildnumber]$buildNumberName" From 58032fbdf150723304cfd466f3a3be1d6c84a3c5 Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Thu, 2 May 2024 16:19:29 -0700 Subject: [PATCH 34/41] Escape single quote differently --- azure-pipelines-pr-validation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines-pr-validation.yml b/azure-pipelines-pr-validation.yml index 10194d8b3ebd7..adec0ebfcc2bd 100644 --- a/azure-pipelines-pr-validation.yml +++ b/azure-pipelines-pr-validation.yml @@ -168,7 +168,7 @@ extends: "X-GitHub-Api-Version" = "2022-11-28" } $buildNumberName = "$(OriginalBuildNumber) - $($pull_request.user.login) - '$($pull_request.title)'" - $buildNumberName = $buildNumberName -replace '["/:<>\|?@*`']','_' + $buildNumberName = $buildNumberName -replace '["/:<>\|?@*'']','_' # Maximum buildnumber length is 255 chars and we are going to append to the end to ensure we have space. if ($buildNumberName.Length -GT 253) { $buildNumberName = $buildNumberName.Substring(0, 253) From 0a53b750ce73af6a17580ec1c82f76704b6257e2 Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Thu, 2 May 2024 16:40:07 -0700 Subject: [PATCH 35/41] Do not replace single quotes in buildnumber --- azure-pipelines-pr-validation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines-pr-validation.yml b/azure-pipelines-pr-validation.yml index adec0ebfcc2bd..b47158c36063d 100644 --- a/azure-pipelines-pr-validation.yml +++ b/azure-pipelines-pr-validation.yml @@ -168,7 +168,7 @@ extends: "X-GitHub-Api-Version" = "2022-11-28" } $buildNumberName = "$(OriginalBuildNumber) - $($pull_request.user.login) - '$($pull_request.title)'" - $buildNumberName = $buildNumberName -replace '["/:<>\|?@*'']','_' + $buildNumberName = $buildNumberName -replace '["/:<>\|?@*]','_' # Maximum buildnumber length is 255 chars and we are going to append to the end to ensure we have space. if ($buildNumberName.Length -GT 253) { $buildNumberName = $buildNumberName.Substring(0, 253) From 764a0716f0200d525092e2fd907124608a8d85bc Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Thu, 2 May 2024 21:03:04 -0700 Subject: [PATCH 36/41] Add back necessary symbol exclusions --- eng/SymbolPublishingExclusionsFile.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eng/SymbolPublishingExclusionsFile.txt b/eng/SymbolPublishingExclusionsFile.txt index 1a5fa3389baa2..58e11a1e6b135 100644 --- a/eng/SymbolPublishingExclusionsFile.txt +++ b/eng/SymbolPublishingExclusionsFile.txt @@ -2,4 +2,7 @@ content/LanguageServer/linux-musl-arm64/libe_sqlite3.so content/LanguageServer/linux-musl-x64/libe_sqlite3.so content/LanguageServer/neutral/runtimes/linux-musl-arm64/native/libe_sqlite3.so content/LanguageServer/neutral/runtimes/linux-musl-arm/native/libe_sqlite3.so -content/LanguageServer/neutral/runtimes/linux-musl-x64/native/libe_sqlite3.so \ No newline at end of file +content/LanguageServer/neutral/runtimes/linux-musl-x64/native/libe_sqlite3.so +content/LanguageServer/neutral/runtimes/alpine-arm64/native/libe_sqlite3.so +content/LanguageServer/neutral/runtimes/alpine-arm/native/libe_sqlite3.so +content/LanguageServer/neutral/runtimes/alpine-x64/native/libe_sqlite3.so From c92035364ae8be609ef1399a00e60bcc3f2df03c Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Fri, 17 May 2024 17:06:06 -0700 Subject: [PATCH 37/41] Test correctness of symbol publishing with v3 publishing --- azure-pipelines.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7ea4ad03c07e3..840bece18e3a7 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -388,9 +388,22 @@ stages: - powershell: eng/build.ps1 -configuration Release -prepareMachine -ci -restore -binaryLogName Restore.binlog displayName: Restore - - powershell: eng/build.ps1 -configuration Release -prepareMachine -ci -build -pack -publish -sign -binaryLogName Build.binlog + - powershell: eng/build.ps1 -configuration Release -prepareMachine -ci -build -pack -publish -sign -binaryLogName Build.binlog /p:DotnetPublishUsingPipelines=true displayName: Build + - task: PowerShell@2 + displayName: Publish Symbols Dry-Run + inputs: + filePath: eng\common\sdk-task.ps1 + arguments: -task PublishToSymbolServers /p:DryRun="true" -restore -msbuildEngine dotnet + /p:DotNetSymbolServerTokenMsdl=DryRunPTA + /p:DotNetSymbolServerTokenSymWeb=DryRunPTA + /p:PDBArtifactsDirectory='$(Build.ArtifactStagingDirectory)/PDBArtifacts/' + /p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' + /p:SymbolPublishingExclusionsFile='$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt' + /p:Configuration=Release + /p:PublishToMSDL=false + - script: $(Build.SourcesDirectory)\artifacts\bin\BuildBoss\Release\net472\BuildBoss.exe -r "$(Build.SourcesDirectory)/" -c Release -p Roslyn.sln displayName: Validate Build Artifacts From b43ec6d2a3c4981ea867d2a81e48755350cbcaa5 Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Fri, 17 May 2024 21:52:20 -0700 Subject: [PATCH 38/41] Point to the correct folder for symbol packages --- azure-pipelines.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 840bece18e3a7..a0d1ced15a000 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -398,8 +398,7 @@ stages: arguments: -task PublishToSymbolServers /p:DryRun="true" -restore -msbuildEngine dotnet /p:DotNetSymbolServerTokenMsdl=DryRunPTA /p:DotNetSymbolServerTokenSymWeb=DryRunPTA - /p:PDBArtifactsDirectory='$(Build.ArtifactStagingDirectory)/PDBArtifacts/' - /p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' + /p:BlobBasePath='$(Build.SourcesDirectory)/artifacts/tmp/Release/SymbolPackages/' /p:SymbolPublishingExclusionsFile='$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt' /p:Configuration=Release /p:PublishToMSDL=false From ed6e0e7ed916385deb87bea39662835cb1ed310a Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Fri, 17 May 2024 23:00:55 -0700 Subject: [PATCH 39/41] Point to a non-existant directory for pdb artifacts --- azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a0d1ced15a000..177845e3afeb1 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -398,6 +398,7 @@ stages: arguments: -task PublishToSymbolServers /p:DryRun="true" -restore -msbuildEngine dotnet /p:DotNetSymbolServerTokenMsdl=DryRunPTA /p:DotNetSymbolServerTokenSymWeb=DryRunPTA + /p:PDBArtifactsDirectory='$(Build.ArtifactStagingDirectory)/PDBArtifacts/' /p:BlobBasePath='$(Build.SourcesDirectory)/artifacts/tmp/Release/SymbolPackages/' /p:SymbolPublishingExclusionsFile='$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt' /p:Configuration=Release From 7589a5e54de44c0320bb707145bfc1d4c9c6de53 Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Sat, 18 May 2024 00:05:07 -0700 Subject: [PATCH 40/41] Test symbol publishing correctness --- eng/SymbolPublishingExclusionsFile.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/eng/SymbolPublishingExclusionsFile.txt b/eng/SymbolPublishingExclusionsFile.txt index 58e11a1e6b135..90fa31bc1d38a 100644 --- a/eng/SymbolPublishingExclusionsFile.txt +++ b/eng/SymbolPublishingExclusionsFile.txt @@ -1,4 +1,3 @@ -content/LanguageServer/linux-musl-arm64/libe_sqlite3.so content/LanguageServer/linux-musl-x64/libe_sqlite3.so content/LanguageServer/neutral/runtimes/linux-musl-arm64/native/libe_sqlite3.so content/LanguageServer/neutral/runtimes/linux-musl-arm/native/libe_sqlite3.so From 7f48578400b916a89cb51afe2d7ced6102cacc69 Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Sat, 18 May 2024 01:00:06 -0700 Subject: [PATCH 41/41] Restore symbol publishing exclusion file --- eng/SymbolPublishingExclusionsFile.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/eng/SymbolPublishingExclusionsFile.txt b/eng/SymbolPublishingExclusionsFile.txt index 90fa31bc1d38a..58e11a1e6b135 100644 --- a/eng/SymbolPublishingExclusionsFile.txt +++ b/eng/SymbolPublishingExclusionsFile.txt @@ -1,3 +1,4 @@ +content/LanguageServer/linux-musl-arm64/libe_sqlite3.so content/LanguageServer/linux-musl-x64/libe_sqlite3.so content/LanguageServer/neutral/runtimes/linux-musl-arm64/native/libe_sqlite3.so content/LanguageServer/neutral/runtimes/linux-musl-arm/native/libe_sqlite3.so