From 9f81c2459ee16f26bf3b587db5c0fd47b9eb19cc Mon Sep 17 00:00:00 2001 From: Paul Medynski <31868385+paulmedynski@users.noreply.github.com> Date: Mon, 5 Jan 2026 10:11:28 -0400 Subject: [PATCH 1/8] Task 40503: Create stress test pipeline - Added initial placeholder pipeline entry point file. --- eng/pipelines/stress-tests-pipeline.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/eng/pipelines/stress-tests-pipeline.yml b/eng/pipelines/stress-tests-pipeline.yml index e694a4cb03..a593c4591f 100644 --- a/eng/pipelines/stress-tests-pipeline.yml +++ b/eng/pipelines/stress-tests-pipeline.yml @@ -37,17 +37,29 @@ trigger: none resources: pipelines: # The PR-SqlClient-Package pipeline in the Public project. +<<<<<<< HEAD - pipeline: upstreamPipeline1 +======= + - pipeline: upstreamPipeline +>>>>>>> 70270623 (Task 40503: Create stress test pipeline) project: Public source: /ADO/PR-SqlClient-Package trigger: true # The CI-SqlClient-Package pipeline in the Public project. +<<<<<<< HEAD - pipeline: upstreamPipeline2 +======= + - pipeline: upstreamPipeline +>>>>>>> 70270623 (Task 40503: Create stress test pipeline) project: Public source: /ADO/CI-SqlClient-Package trigger: true # The MDS Main CI-Package pipeline in the ADO.net project. +<<<<<<< HEAD - pipeline: upstreamPipeline3 +======= + - pipeline: upstreamPipeline +>>>>>>> 70270623 (Task 40503: Create stress test pipeline) project: ADO.net source: /Internal CI/MDS Main CI-Package trigger: true From 92cf1d46a0a24bd295ff2f14694543248bbb7e03 Mon Sep 17 00:00:00 2001 From: Paul Medynski <31868385+paulmedynski@users.noreply.github.com> Date: Mon, 5 Jan 2026 10:21:50 -0400 Subject: [PATCH 2/8] Addressed Copilot comments. --- eng/pipelines/stress-tests-pipeline.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/eng/pipelines/stress-tests-pipeline.yml b/eng/pipelines/stress-tests-pipeline.yml index a593c4591f..e694a4cb03 100644 --- a/eng/pipelines/stress-tests-pipeline.yml +++ b/eng/pipelines/stress-tests-pipeline.yml @@ -37,29 +37,17 @@ trigger: none resources: pipelines: # The PR-SqlClient-Package pipeline in the Public project. -<<<<<<< HEAD - pipeline: upstreamPipeline1 -======= - - pipeline: upstreamPipeline ->>>>>>> 70270623 (Task 40503: Create stress test pipeline) project: Public source: /ADO/PR-SqlClient-Package trigger: true # The CI-SqlClient-Package pipeline in the Public project. -<<<<<<< HEAD - pipeline: upstreamPipeline2 -======= - - pipeline: upstreamPipeline ->>>>>>> 70270623 (Task 40503: Create stress test pipeline) project: Public source: /ADO/CI-SqlClient-Package trigger: true # The MDS Main CI-Package pipeline in the ADO.net project. -<<<<<<< HEAD - pipeline: upstreamPipeline3 -======= - - pipeline: upstreamPipeline ->>>>>>> 70270623 (Task 40503: Create stress test pipeline) project: ADO.net source: /Internal CI/MDS Main CI-Package trigger: true From 71c911b28009e5b1a3248ea64ff8d85d6dbb9f5c Mon Sep 17 00:00:00 2001 From: Paul Medynski <31868385+paulmedynski@users.noreply.github.com> Date: Mon, 5 Jan 2026 14:38:10 -0400 Subject: [PATCH 3/8] Wired up the new top-level stress test pipeline to the existing stages/jobs. --- eng/pipelines/dotnet-sqlclient-ci-core.yml | 15 -- ...qlclient-ci-package-reference-pipeline.yml | 6 - ...qlclient-ci-project-reference-pipeline.yml | 6 - eng/pipelines/jobs/stress-tests-ci-job.yml | 230 +++++++++++------- .../sqlclient-pr-package-ref-pipeline.yml | 6 - .../sqlclient-pr-project-ref-pipeline.yml | 6 - .../stages/stress-tests-ci-stage.yml | 43 ++-- eng/pipelines/stress-tests-pipeline.yml | 35 +-- 8 files changed, 182 insertions(+), 165 deletions(-) diff --git a/eng/pipelines/dotnet-sqlclient-ci-core.yml b/eng/pipelines/dotnet-sqlclient-ci-core.yml index f94432880f..8bb6228e71 100644 --- a/eng/pipelines/dotnet-sqlclient-ci-core.yml +++ b/eng/pipelines/dotnet-sqlclient-ci-core.yml @@ -85,11 +85,6 @@ parameters: type: string default: $(ci_var_defaultPoolName) -- name: enableStressTests - displayName: Enable Stress Tests - type: boolean - default: false - # The timeout, in minutes, for each test job. - name: testJobTimeout type: number @@ -121,16 +116,6 @@ stages: SNIVersion: ${{parameters.SNIVersion}} SNIValidationFeed: ${{parameters.SNIValidationFeed}} - - ${{ if eq(parameters.enableStressTests, true) }}: - - template: stages/stress-tests-ci-stage.yml@self - parameters: - buildConfiguration: ${{ parameters.buildConfiguration }} - dependsOn: [build_nugets] - pipelineArtifactName: $(artifactName) - mdsPackageVersion: $(NugetPackageVersion) - ${{ if eq(parameters.debug, 'true') }}: - verbosity: 'detailed' - - template: common/templates/stages/ci-run-tests-stage.yml@self parameters: debug: ${{ parameters.debug }} diff --git a/eng/pipelines/dotnet-sqlclient-ci-package-reference-pipeline.yml b/eng/pipelines/dotnet-sqlclient-ci-package-reference-pipeline.yml index 6c2f4ea169..7afcf6ad8e 100644 --- a/eng/pipelines/dotnet-sqlclient-ci-package-reference-pipeline.yml +++ b/eng/pipelines/dotnet-sqlclient-ci-package-reference-pipeline.yml @@ -119,11 +119,6 @@ parameters: type: boolean default: false - - name: enableStressTests - displayName: Enable Stress Tests - type: boolean - default: false - # The target frameworks to build and run tests for on Windows. # # These are _not_ the target frameworks to build the driver packages for. @@ -176,7 +171,6 @@ extends: buildType: Package codeCovTargetFrameworks: ${{ parameters.codeCovTargetFrameworks }} debug: ${{ parameters.debug }} - enableStressTests: ${{ parameters.enableStressTests }} targetFrameworks: ${{ parameters.targetFrameworks }} targetFrameworksUnix: ${{ parameters.targetFrameworksUnix }} testSets: ${{ parameters.testSets }} diff --git a/eng/pipelines/dotnet-sqlclient-ci-project-reference-pipeline.yml b/eng/pipelines/dotnet-sqlclient-ci-project-reference-pipeline.yml index d83e65dcb0..5f94a0399c 100644 --- a/eng/pipelines/dotnet-sqlclient-ci-project-reference-pipeline.yml +++ b/eng/pipelines/dotnet-sqlclient-ci-project-reference-pipeline.yml @@ -119,11 +119,6 @@ parameters: type: boolean default: false - - name: enableStressTests - displayName: Enable Stress Tests - type: boolean - default: false - # The target frameworks to build and run tests for on Windows. # # These are _not_ the target frameworks to build the driver packages for. @@ -176,7 +171,6 @@ extends: buildType: Project codeCovTargetFrameworks: ${{ parameters.codeCovTargetFrameworks }} debug: ${{ parameters.debug }} - enableStressTests: ${{ parameters.enableStressTests }} targetFrameworks: ${{ parameters.targetFrameworks }} targetFrameworksUnix: ${{ parameters.targetFrameworksUnix }} testSets: ${{ parameters.testSets }} diff --git a/eng/pipelines/jobs/stress-tests-ci-job.yml b/eng/pipelines/jobs/stress-tests-ci-job.yml index 2e01470fe5..29a65030f4 100644 --- a/eng/pipelines/jobs/stress-tests-ci-job.yml +++ b/eng/pipelines/jobs/stress-tests-ci-job.yml @@ -18,7 +18,6 @@ parameters: # The suffix to append to the job name. - name: jobNameSuffix type: string - default: '' # The prefix to prepend to the job's display name: # @@ -26,52 +25,53 @@ parameters: # - name: displayNamePrefix type: string - default: '' # The name of the Azure Pipelines pool to use. - name: poolName type: string - default: '' # The pool VM image to use. - name: vmImage type: string - default: '' - # The pipeline step to run to configure SQL Server. + # The filename (absolute path) of a template step to run to configure SQL + # Server. # # This step is expected to require no parameters. It must configure a SQL # Server instance listening on localhost for SQL auth via the 'sa' user with # the pipeline variable $(Password) as the password. - name: sqlSetupStep type: string - default: '' # The name of the pipeline artifact to download that contains the MDS package # to stress test. - name: pipelineArtifactName type: string + + # The MDS package version to stress test. This version must be available in + # one of the configured NuGet sources. + # + # If empty, the MDS version will be parsed from the NuGet package filename + # downloaded from the pipeline artifact. + - name: mdsPackageVersion + type: string default: '' # The solution file to restore/build. - name: solution type: string - default: '' # The test project to run. - name: testProject type: string - default: '' # dotnet CLI arguments for the restore step. - name: restoreArguments type: string - default: '' # dotnet CLI arguments for the build and run steps. - name: buildArguments type: string - default: '' # The list of .NET runtimes to test against. - name: netTestRuntimes @@ -89,7 +89,6 @@ parameters: # parameter, with user 'sa' and password of $(Password). - name: configContent type: string - default: '' jobs: - job: run_stress_tests_job_${{ parameters.jobNameSuffix }} @@ -107,6 +106,13 @@ jobs: - name: testArguments value: -a SqlClient.Stress.Tests -console + # The MDS package version to use. + # + # We assign the parameter to a variable so we can update it later via a + # PowerShell script that parses the version from the package filename. + - name: mdsVersion + value: ${{ parameters.mdsPackageVersion }} + # Explicitly unset the $PLATFORM environment variable that is set by the # 'ADO Build properties' Library in the ADO SqlClientDrivers public project. # This is defined with a non-standard Platform of 'AnyCPU', and will fail @@ -131,84 +137,138 @@ jobs: steps: - # Install the .NET 9.0 SDK. - - task: UseDotNet@2 - displayName: Install .NET 9.0 SDK - inputs: - packageType: sdk - version: 9.x - - # Install the .NET 8.0 runtime. - - task: UseDotNet@2 - displayName: Install .NET 8.0 Runtime - inputs: - packageType: runtime - version: 8.x - - # Download the pipeline artifact that contains the MDS package to test. - - task: DownloadPipelineArtifact@2 - displayName: Download Pipeline Artifact - inputs: - artifactName: ${{ parameters.pipelineArtifactName }} - # The stress tests solution has a NuGet.config file that configures - # sources to look in this packages/ directory. - targetPath: $(Build.SourcesDirectory)/packages - - # Setup the local SQL Server. - - template: ${{ parameters.sqlSetupStep }}@self - - # We use the 'custom' command because the DotNetCoreCLI@2 task doesn't support - # all of our argument combinations for the different build steps. - - # Restore the solution. - - task: DotNetCoreCLI@2 - displayName: Restore Solution - inputs: - command: custom - custom: restore - projects: ${{ parameters.solution }} - arguments: ${{ parameters.restoreArguments }} - - # Build the solution. - - task: DotNetCoreCLI@2 - displayName: Build Solution - inputs: - command: custom - custom: build - projects: ${{ parameters.solution }} - arguments: ${{ parameters.buildArguments }} --no-restore - - # Write the config file. - - task: PowerShell@2 - displayName: Write Config File - inputs: - pwsh: true - targetType: inline - script: | - # Capture the multi-line JSON content into a variable. - $content = @" - ${{ parameters.configContent }} - "@ - - # Write the JSON content to the config file. - $content | Out-File -FilePath "config.json" - - # Run the stress tests for each .NET runtime. - - ${{ each runtime in parameters.netTestRuntimes }}: + # Install the .NET 10.0 SDK. + - task: UseDotNet@2 + displayName: Install .NET 10.0 SDK + inputs: + packageType: sdk + version: 10.x + + # Install the .NET 9.0 Runtime. + - task: UseDotNet@2 + displayName: Install .NET 9.0 Runtime + inputs: + packageType: runtime + version: 9.x + + # Install the .NET 8.0 Runtime. + - task: UseDotNet@2 + displayName: Install .NET 8.0 Runtime + inputs: + packageType: runtime + version: 8.x + + # Download the pipeline artifact that contains the MDS package to test. + # We download from the pipeline that triggered us. + - task: DownloadPipelineArtifact@2 + displayName: Download Pipeline Artifact + inputs: + buildType: specific + # Download the artifacts from the pipeline run that triggered us. + specificBuildWithTriggering: true + artifactName: ${{ parameters.pipelineArtifactName }} + # The stress tests solution has a NuGet.config file that configures + # sources to look in this packages/ directory. + targetPath: $(Build.SourcesDirectory)/packages + + # Determine the MDS package version if not specified. + # + # This will clobber the $(mdsVersion) variable. + # + - ${{ if eq(parameters.mdsPackageVersion, '') }}: + - task: PowerShell@2 + displayName: Determine MDS Package Version + inputs: + pwsh: true + targetType: inline + script: | + # Get the list of MDS package files in the packages directory. + $packageFiles = Get-ChildItem -Path "$(Build.SourcesDirectory)/packages" -Filter "Microsoft.Data.SqlClient.*.nupkg" + + if ($packageFiles.Count -eq 0) + { + throw "No Microsoft.Data.SqlClient NuGet package found in packages directory." + } + elseif ($packageFiles.Count -gt 1) + { + throw "Multiple Microsoft.Data.SqlClient NuGet packages found in packages directory." + } + else + { + # Extract the version from the package filename. + $packageFile = $packageFiles[0] + if ($packageFile.Name -match 'Microsoft\.Data\.SqlClient\.(?.+)\.nupkg') + { + $version = $matches['version'] + Write-Host "##vso[task.setvariable variable=mdsVersion]$version" + Write-Host "Determined MDS package version: $version" + } + else + { + throw "Failed to parse version from package filename: $($packageFile.Name)" + } + } + + # Emit the MDS version under test. + - pwsh: | + Write-Host "Testing MDS package version: $(mdsVersion)" + displayName: Emit MDS Version + + # Setup the local SQL Server. + - template: ${{ parameters.sqlSetupStep }}@self + + # We use the 'custom' command because the DotNetCoreCLI@2 task doesn't support + # all of our argument combinations for the different build steps. + + # Restore the solution. - task: DotNetCoreCLI@2 - displayName: Test [${{runtime}}] + displayName: Restore Solution inputs: command: custom - custom: run - projects: ${{ parameters.testProject }} - arguments: ${{ parameters.buildArguments }} --no-build -f ${{runtime}} -e STRESS_CONFIG_FILE=config.json -- $(testArguments) + custom: restore + projects: ${{ parameters.solution }} + arguments: ${{ parameters.restoreArguments }} -p:MdsPackageVersion=$(mdsVersion) - # Run the stress tests for each .NET Framework runtime. - - ${{ each runtime in parameters.netFrameworkTestRuntimes }}: + # Build the solution. - task: DotNetCoreCLI@2 - displayName: Test [${{runtime}}] + displayName: Build Solution inputs: command: custom - custom: run - projects: ${{ parameters.testProject }} - arguments: ${{ parameters.buildArguments }} --no-build -f ${{runtime}} -e STRESS_CONFIG_FILE=config.json -- $(testArguments) + custom: build + projects: ${{ parameters.solution }} + arguments: ${{ parameters.buildArguments }} --no-restore -p:MdsPackageVersion=$(mdsVersion) + + # Write the config file. + - task: PowerShell@2 + displayName: Write Config File + inputs: + pwsh: true + targetType: inline + script: | + # Capture the multi-line JSON content into a variable. + $content = @" + ${{ parameters.configContent }} + "@ + + # Write the JSON content to the config file. + $content | Out-File -FilePath "config.json" + + # Run the stress tests for each .NET runtime. + - ${{ each runtime in parameters.netTestRuntimes }}: + - task: DotNetCoreCLI@2 + displayName: Test [${{runtime}}] + inputs: + command: custom + custom: run + projects: ${{ parameters.testProject }} + arguments: ${{ parameters.buildArguments }} --no-build -p:MdsPackageVersion=$(mdsVersion) -f ${{runtime}} -e STRESS_CONFIG_FILE=config.json -- $(testArguments) + + # Run the stress tests for each .NET Framework runtime. + - ${{ each runtime in parameters.netFrameworkTestRuntimes }}: + - task: DotNetCoreCLI@2 + displayName: Test [${{runtime}}] + inputs: + command: custom + custom: run + projects: ${{ parameters.testProject }} + arguments: ${{ parameters.buildArguments }} --no-build -p:MdsPackageVersion=$(mdsVersion) -f ${{runtime}} -e STRESS_CONFIG_FILE=config.json -- $(testArguments) diff --git a/eng/pipelines/sqlclient-pr-package-ref-pipeline.yml b/eng/pipelines/sqlclient-pr-package-ref-pipeline.yml index bc88cb5f38..af60795f11 100644 --- a/eng/pipelines/sqlclient-pr-package-ref-pipeline.yml +++ b/eng/pipelines/sqlclient-pr-package-ref-pipeline.yml @@ -76,11 +76,6 @@ parameters: type: boolean default: false - - name: enableStressTests - displayName: Enable Stress Tests - type: boolean - default: false - # The target frameworks to build and run tests for on Windows. # # These are _not_ the target frameworks to build the driver packages for. @@ -131,7 +126,6 @@ extends: buildType: Package codeCovTargetFrameworks: ${{ parameters.codeCovTargetFrameworks }} debug: ${{ parameters.debug }} - enableStressTests: ${{ parameters.enableStressTests }} targetFrameworks: ${{ parameters.targetFrameworks }} targetFrameworksUnix: ${{ parameters.targetFrameworksUnix }} testSets: ${{ parameters.testSets }} diff --git a/eng/pipelines/sqlclient-pr-project-ref-pipeline.yml b/eng/pipelines/sqlclient-pr-project-ref-pipeline.yml index 2fc0cad210..cee2f07470 100644 --- a/eng/pipelines/sqlclient-pr-project-ref-pipeline.yml +++ b/eng/pipelines/sqlclient-pr-project-ref-pipeline.yml @@ -76,11 +76,6 @@ parameters: type: boolean default: false - - name: enableStressTests - displayName: Enable Stress Tests - type: boolean - default: false - # The target frameworks to build and run tests for on Windows. # # These are _not_ the target frameworks to build the driver packages for. @@ -131,7 +126,6 @@ extends: buildType: Project codeCovTargetFrameworks: ${{ parameters.codeCovTargetFrameworks }} debug: ${{ parameters.debug }} - enableStressTests: ${{ parameters.enableStressTests }} targetFrameworks: ${{ parameters.targetFrameworks }} targetFrameworksUnix: ${{ parameters.targetFrameworksUnix }} testSets: ${{ parameters.testSets }} diff --git a/eng/pipelines/stages/stress-tests-ci-stage.yml b/eng/pipelines/stages/stress-tests-ci-stage.yml index b7cea84b82..b3845611f4 100644 --- a/eng/pipelines/stages/stress-tests-ci-stage.yml +++ b/eng/pipelines/stages/stress-tests-ci-stage.yml @@ -22,49 +22,37 @@ parameters: # The type of build to produce (Debug or Release) - name: buildConfiguration - displayName: Build Configuration type: string - default: Debug values: - Debug - Release - # The names of any stages this stage depends on, for example the stages - # that publish the MDS package artifacts we will test. - - name: dependsOn - displayName: Depends On Stages - type: object - default: [] - # The name of the pipeline artifact to download that contains the MDS package # to stress test. - name: pipelineArtifactName - displayName: Pipeline Artifact Name type: string - default: Artifacts # The MDS package version to stress test. This version must be available in # one of the configured NuGet sources. + # + # If empty, the MDS version will be parsed from the NuGet package filename + # downloaded from the pipeline artifact. - name: mdsPackageVersion - displayName: MDS Package Version type: string default: '' # The list of .NET runtimes to test against. - name: netTestRuntimes - displayName: .NET Test Runtimes type: object - default: [net8.0, net9.0] + default: [net8.0, net9.0, net10.0] # The list of .NET Framework runtimes to test against. - name: netFrameworkTestRuntimes - displayName: .NET Framework Test Runtimes type: object - default: [net462, net47, net471, net472, net48, net481] + default: [net462] # The verbosity level for the dotnet CLI commands. - name: verbosity - displayName: Dotnet CLI verbosity type: string default: normal values: @@ -77,11 +65,10 @@ parameters: stages: - stage: run_stress_tests_stage displayName: Run Stress Tests - dependsOn: ${{ parameters.dependsOn }} variables: # The directory where dotnet artifacts will be staged. Not to be - # confused with pipeline artifact. + # confused with pipeline artifacts. - name: dotnetArtifactsDir value: $(Build.StagingDirectory)/dotnetArtifacts @@ -98,7 +85,6 @@ stages: value: >- --verbosity ${{parameters.verbosity}} --artifacts-path $(dotnetArtifactsDir) - -p:MdsPackageVersion=${{parameters.mdsPackageVersion}} # dotnet CLI arguments for build/run commands. - name: buildArguments @@ -109,7 +95,7 @@ stages: # The contents of the config file to use for all tests. We will write # this to a JSON file for each test job, and then point to it via the # STRESS_CONFIG_FILE environment variable. - - name: ConfigContent + - name: configContent value: | [ { @@ -132,7 +118,7 @@ stages: # -------------------------------------------------------------------------- # Build and test on Linux. - - template: ../jobs/stress-tests-ci-job.yml@self + - template: /eng/pipelines/jobs/stress-tests-ci-job.yml@self parameters: jobNameSuffix: linux displayNamePrefix: Linux @@ -140,17 +126,18 @@ stages: vmImage: ADO-UB20-SQL22 sqlSetupStep: /eng/pipelines/common/templates/steps/configure-sql-server-linux-step.yml pipelineArtifactName: ${{ parameters.pipelineArtifactName }} + mdsPackageVersion: ${{ parameters.mdsPackageVersion }} solution: $(solution) testProject: $(testProject) restoreArguments: $(commonArguments) buildArguments: $(buildArguments) netTestRuntimes: ${{ parameters.netTestRuntimes }} - configContent: $(ConfigContent) + configContent: $(configContent) # -------------------------------------------------------------------------- # Build and test on Windows - - template: ../jobs/stress-tests-ci-job.yml + - template: /eng/pipelines/jobs/stress-tests-ci-job.yml@self parameters: jobNameSuffix: windows displayNamePrefix: Win @@ -160,6 +147,7 @@ stages: vmImage: ADO-MMS22-SQL22 sqlSetupStep: /eng/pipelines/common/templates/steps/configure-sql-server-win-step.yml pipelineArtifactName: ${{ parameters.pipelineArtifactName }} + mdsPackageVersion: ${{ parameters.mdsPackageVersion }} solution: $(solution) testProject: $(testProject) restoreArguments: $(commonArguments) @@ -168,12 +156,12 @@ stages: # Note that we include the .NET Framework runtimes for test runs on # Windows. netFrameworkTestRuntimes: ${{ parameters.netFrameworkTestRuntimes }} - configContent: $(ConfigContent) + configContent: $(configContent) # -------------------------------------------------------------------------- # Build and test on macOS. - - template: ../jobs/stress-tests-ci-job.yml + - template: /eng/pipelines/jobs/stress-tests-ci-job.yml@self parameters: jobNameSuffix: macos displayNamePrefix: macOS @@ -183,9 +171,10 @@ stages: vmImage: macos-latest sqlSetupStep: /eng/pipelines/common/templates/steps/configure-sql-server-macos-step.yml pipelineArtifactName: ${{ parameters.pipelineArtifactName }} + mdsPackageVersion: ${{ parameters.mdsPackageVersion }} solution: $(solution) testProject: $(testProject) restoreArguments: $(commonArguments) buildArguments: $(buildArguments) netTestRuntimes: ${{ parameters.netTestRuntimes }} - configContent: $(ConfigContent) + configContent: $(configContent) diff --git a/eng/pipelines/stress-tests-pipeline.yml b/eng/pipelines/stress-tests-pipeline.yml index e694a4cb03..7556a9f58f 100644 --- a/eng/pipelines/stress-tests-pipeline.yml +++ b/eng/pipelines/stress-tests-pipeline.yml @@ -1,8 +1,8 @@ -################################################################################# -# Licensed to the .NET Foundation under one or more agreements. # -# The .NET Foundation licenses this file to you under the MIT license. # -# See the LICENSE file in the project root for more information. # -################################################################################# +################################################################################ +# Licensed to the .NET Foundation under one or more agreements. +# The .NET Foundation licenses this file to you under the MIT license. +# See the LICENSE file in the project root for more information. +################################################################################ # This pipeline runs the stress test suite using the most recent artifacts from # the CI-SqlClient-Package pipeline. @@ -33,7 +33,14 @@ name: $(DayOfYear)$(Rev:rr) pr: none trigger: none -# Trigger this pipeline after successful runs of each of the following pipelines. +# Trigger this pipeline after successful runs of each of the following +# pipelines. +# +# Note that the pipeline identifiers must be unique, but we never refer to them +# by name, so we just number them 1, 2, 3. The identifier of the particular +# pipeline that triggered us is available via the predefined variable +# $(Resources.TriggeringAlias). +# resources: pipelines: # The PR-SqlClient-Package pipeline in the Public project. @@ -70,11 +77,11 @@ parameters: default: false stages: -- stage: Placeholder - displayName: Placeholder Stage - jobs: - - job: PlaceholderJob - displayName: Placeholder Job - steps: - - script: echo "This is a placeholder stage." - displayName: Placeholder Step + - template: /eng/pipelines/stages/stress-tests-ci-stage.yml@self + parameters: + buildConfiguration: ${{ parameters.buildConfiguration }} + # All of the pipelines that trigger us produce the same artifact name. + # (See dotnet-sqlclient-ci-core.yml.) + pipelineArtifactName: Artifacts + ${{ if eq(parameters.debug, 'true') }}: + verbosity: 'detailed' From f30c49ab577495b4f9d73a9aeea6d4926e5e7bb5 Mon Sep 17 00:00:00 2001 From: Paul Medynski <31868385+paulmedynski@users.noreply.github.com> Date: Mon, 5 Jan 2026 15:17:46 -0400 Subject: [PATCH 4/8] Using human friendly triggering pipeline names. --- eng/pipelines/stress-tests-pipeline.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/eng/pipelines/stress-tests-pipeline.yml b/eng/pipelines/stress-tests-pipeline.yml index 7556a9f58f..8c07bf3d77 100644 --- a/eng/pipelines/stress-tests-pipeline.yml +++ b/eng/pipelines/stress-tests-pipeline.yml @@ -36,26 +36,25 @@ trigger: none # Trigger this pipeline after successful runs of each of the following # pipelines. # -# Note that the pipeline identifiers must be unique, but we never refer to them -# by name, so we just number them 1, 2, 3. The identifier of the particular -# pipeline that triggered us is available via the predefined variable -# $(Resources.TriggeringAlias). +# The pipeline identifiers are displayed in the Azure DevOps UI, so it is +# helpful if they indicate the project and pipeline name, hence the strange +# looking values below. # resources: pipelines: # The PR-SqlClient-Package pipeline in the Public project. - - pipeline: upstreamPipeline1 + - pipeline: Public-ADO-PR-SqlClient-Package project: Public source: /ADO/PR-SqlClient-Package trigger: true # The CI-SqlClient-Package pipeline in the Public project. - - pipeline: upstreamPipeline2 + - pipeline: Public-ADO-CI-SqlClient-Package project: Public source: /ADO/CI-SqlClient-Package trigger: true # The MDS Main CI-Package pipeline in the ADO.net project. - - pipeline: upstreamPipeline3 - project: ADO.net + - pipeline: ADO-Net-Internal-CI-MDS-Main-CI-Package + project: ADO.Net source: /Internal CI/MDS Main CI-Package trigger: true From 09ff3c2fd00af22e85c2dcbfb5913a6288f9a411 Mon Sep 17 00:00:00 2001 From: Paul Medynski <31868385+paulmedynski@users.noreply.github.com> Date: Mon, 5 Jan 2026 15:52:31 -0400 Subject: [PATCH 5/8] - Removed PR pipeline as upstream trigger. - Fixed default pool name. --- .../stages/stress-tests-ci-stage.yml | 4 +-- eng/pipelines/stress-tests-pipeline.yml | 30 +++++++++---------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/eng/pipelines/stages/stress-tests-ci-stage.yml b/eng/pipelines/stages/stress-tests-ci-stage.yml index b3845611f4..546bd93321 100644 --- a/eng/pipelines/stages/stress-tests-ci-stage.yml +++ b/eng/pipelines/stages/stress-tests-ci-stage.yml @@ -122,7 +122,7 @@ stages: parameters: jobNameSuffix: linux displayNamePrefix: Linux - poolName: $(ci_var_defaultPoolName) + poolName: ADO-CI-1ES-Pool vmImage: ADO-UB20-SQL22 sqlSetupStep: /eng/pipelines/common/templates/steps/configure-sql-server-linux-step.yml pipelineArtifactName: ${{ parameters.pipelineArtifactName }} @@ -141,7 +141,7 @@ stages: parameters: jobNameSuffix: windows displayNamePrefix: Win - poolName: $(ci_var_defaultPoolName) + poolName: ADO-CI-1ES-Pool # The Windows images include a suitable .NET Framework runtime, so we # don't have to install one explicitly. vmImage: ADO-MMS22-SQL22 diff --git a/eng/pipelines/stress-tests-pipeline.yml b/eng/pipelines/stress-tests-pipeline.yml index 8c07bf3d77..d5b92a6e4c 100644 --- a/eng/pipelines/stress-tests-pipeline.yml +++ b/eng/pipelines/stress-tests-pipeline.yml @@ -4,23 +4,22 @@ # See the LICENSE file in the project root for more information. ################################################################################ -# This pipeline runs the stress test suite using the most recent artifacts from -# the CI-SqlClient-Package pipeline. +# This pipeline runs the stress test suite using the artifacts from the +# triggering pipeline. # # It runs after every successful run of the following pipelines: # # Public project: -# - PR-SqlClient-Package -# - CI-SqlClient-Package +# - CI-SqlClient-Package (branch main only) # -# ADO.net project: -# - MDS Main CI-Package +# ADO.Net project: +# - MDS Main CI-Package (branch internal/main only) # # This pipeline definition is mapped to the Stress-SqlClient pipelines: # # Public project: # -# TODO +# https://dev.azure.com/SqlClientDrivers/public/_build?definitionId=2212 # # ADO.net project: # @@ -42,21 +41,22 @@ trigger: none # resources: pipelines: - # The PR-SqlClient-Package pipeline in the Public project. - - pipeline: Public-ADO-PR-SqlClient-Package - project: Public - source: /ADO/PR-SqlClient-Package - trigger: true # The CI-SqlClient-Package pipeline in the Public project. - pipeline: Public-ADO-CI-SqlClient-Package project: Public source: /ADO/CI-SqlClient-Package - trigger: true - # The MDS Main CI-Package pipeline in the ADO.net project. + trigger: + branches: + include: + - main + # The MDS Main CI-Package pipeline in the ADO.Net project. - pipeline: ADO-Net-Internal-CI-MDS-Main-CI-Package project: ADO.Net source: /Internal CI/MDS Main CI-Package - trigger: true + trigger: + branches: + include: + - internal/main # Pipeline parameters, visible in the Azure DevOps UI. parameters: From a20ecf22d9226e915171a99b777ff2cab5d0b4df Mon Sep 17 00:00:00 2001 From: Paul Medynski <31868385+paulmedynski@users.noreply.github.com> Date: Tue, 6 Jan 2026 08:04:17 -0400 Subject: [PATCH 6/8] - When triggered manually, we must choose one of the upstream pipelines to use for artifact download. - Temporarily added PR-SqlClient-Package to help with PR-based testing. --- eng/pipelines/jobs/stress-tests-ci-job.yml | 336 +++++++++--------- .../stages/stress-tests-ci-stage.yml | 18 + eng/pipelines/stress-tests-pipeline.yml | 22 +- 3 files changed, 204 insertions(+), 172 deletions(-) diff --git a/eng/pipelines/jobs/stress-tests-ci-job.yml b/eng/pipelines/jobs/stress-tests-ci-job.yml index 29a65030f4..c4445f085d 100644 --- a/eng/pipelines/jobs/stress-tests-ci-job.yml +++ b/eng/pipelines/jobs/stress-tests-ci-job.yml @@ -43,6 +43,21 @@ parameters: - name: sqlSetupStep type: string + # The alias of the pipeline whose artifacts we should download. This is the + # name given to a pipeline resource in the resources definition section of the + # top-level pipeline, for example: + # + # resources: + # pipelines: + # - pipeline: + # + # See: + # + # https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema/resources-pipelines-pipeline?view=azure-pipelines#the-pipeline-resource-metadata-as-predefined-variables + # + - name: pipelineAlias + type: string + # The name of the pipeline artifact to download that contains the MDS package # to stress test. - name: pipelineArtifactName @@ -91,184 +106,169 @@ parameters: type: string jobs: -- job: run_stress_tests_job_${{ parameters.jobNameSuffix }} - displayName: '[${{ parameters.displayNamePrefix }}] Run Stress Tests' - pool: - name: ${{ parameters.poolName }} - ${{ if eq(parameters.poolName, 'Azure Pipelines') }}: - vmImage: ${{ parameters.vmImage }} - ${{ else }}: - demands: - - imageOverride -equals ${{ parameters.vmImage }} - - variables: - # Stress test command-line arguments. - - name: testArguments - value: -a SqlClient.Stress.Tests -console - - # The MDS package version to use. - # - # We assign the parameter to a variable so we can update it later via a - # PowerShell script that parses the version from the package filename. - - name: mdsVersion - value: ${{ parameters.mdsPackageVersion }} - - # Explicitly unset the $PLATFORM environment variable that is set by the - # 'ADO Build properties' Library in the ADO SqlClientDrivers public project. - # This is defined with a non-standard Platform of 'AnyCPU', and will fail - # the builds if left defined. The stress tests solution does not require - # any specific Platform, and so its solution file doesn't support any - # non-standard platforms. - # - # Note that Azure Pipelines will inject this variable as PLATFORM into the - # environment of all tasks in this job. - # - # See: - # https://learn.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch - # - - name: Platform - value: '' - - # Do the same for $CONFIGURATION since we explicitly set it using our - # 'buildConfiguration' parameter, and we don't want the environment to - # override us. - - name: Configuration - value: '' - - steps: - - # Install the .NET 10.0 SDK. - - task: UseDotNet@2 - displayName: Install .NET 10.0 SDK - inputs: - packageType: sdk - version: 10.x - - # Install the .NET 9.0 Runtime. - - task: UseDotNet@2 - displayName: Install .NET 9.0 Runtime - inputs: - packageType: runtime - version: 9.x - - # Install the .NET 8.0 Runtime. - - task: UseDotNet@2 - displayName: Install .NET 8.0 Runtime - inputs: - packageType: runtime - version: 8.x - - # Download the pipeline artifact that contains the MDS package to test. - # We download from the pipeline that triggered us. - - task: DownloadPipelineArtifact@2 - displayName: Download Pipeline Artifact - inputs: - buildType: specific - # Download the artifacts from the pipeline run that triggered us. - specificBuildWithTriggering: true - artifactName: ${{ parameters.pipelineArtifactName }} - # The stress tests solution has a NuGet.config file that configures - # sources to look in this packages/ directory. - targetPath: $(Build.SourcesDirectory)/packages - - # Determine the MDS package version if not specified. - # - # This will clobber the $(mdsVersion) variable. - # - - ${{ if eq(parameters.mdsPackageVersion, '') }}: - - task: PowerShell@2 - displayName: Determine MDS Package Version + - job: run_stress_tests_job_${{ parameters.jobNameSuffix }} + displayName: '[${{ parameters.displayNamePrefix }}] Run Stress Tests' + pool: + name: ${{ parameters.poolName }} + ${{ if eq(parameters.poolName, 'Azure Pipelines') }}: + vmImage: ${{ parameters.vmImage }} + ${{ else }}: + demands: + - imageOverride -equals ${{ parameters.vmImage }} + + variables: + + # Stress test command-line arguments. + - name: testArguments + value: -a SqlClient.Stress.Tests -console + + # The MDS package version to use. + # + # We assign the parameter to a variable so we can update it later via a + # PowerShell script that parses the version from the package filename. + - name: mdsVersion + value: ${{ parameters.mdsPackageVersion }} + + steps: + + # Install the .NET 10.0 SDK. + - task: UseDotNet@2 + displayName: Install .NET 10.0 SDK inputs: - pwsh: true - targetType: inline - script: | - # Get the list of MDS package files in the packages directory. - $packageFiles = Get-ChildItem -Path "$(Build.SourcesDirectory)/packages" -Filter "Microsoft.Data.SqlClient.*.nupkg" - - if ($packageFiles.Count -eq 0) - { - throw "No Microsoft.Data.SqlClient NuGet package found in packages directory." - } - elseif ($packageFiles.Count -gt 1) - { - throw "Multiple Microsoft.Data.SqlClient NuGet packages found in packages directory." - } - else - { - # Extract the version from the package filename. - $packageFile = $packageFiles[0] - if ($packageFile.Name -match 'Microsoft\.Data\.SqlClient\.(?.+)\.nupkg') + packageType: sdk + version: 10.x + + # Install the .NET 9.0 Runtime. + - task: UseDotNet@2 + displayName: Install .NET 9.0 Runtime + inputs: + packageType: runtime + version: 9.x + + # Install the .NET 8.0 Runtime. + - task: UseDotNet@2 + displayName: Install .NET 8.0 Runtime + inputs: + packageType: runtime + version: 8.x + + # Download the pipeline artifact that contains the MDS package to test. + - task: DownloadPipelineArtifact@2 + displayName: Download Pipeline Artifact + inputs: + buildType: specific + artifactName: ${{ parameters.pipelineArtifactName }} + # The stress tests solution has a NuGet.config file that configures + # sources to look in this packages/ directory. + targetPath: $(Build.SourcesDirectory)/packages + # If we were triggered by an upstream pipeline run, download the + # artifacts from that specific run. + preferTriggeringPipeline: true + # Otherwise, use the pipeline alias to explicitly choose the + # artifacts. + project: $[variables['resources.pipeline.${{ parameters.pipelineAlias }}.projectID']] + pipeline: $[variables['resources.pipeline.${{ parameters.pipelineAlias }}.pipelineID']] + runVersion: specific + runId: $[variables['resources.pipeline.${{ parameters.pipelineAlias }}.runID']] + + # Determine the MDS package version if not specified. + # + # This will clobber the $(mdsVersion) variable. + # + - ${{ if eq(parameters.mdsPackageVersion, '') }}: + - task: PowerShell@2 + displayName: Determine MDS Package Version + inputs: + pwsh: true + targetType: inline + script: | + # Get the list of MDS package files in the packages directory. + $packageFiles = Get-ChildItem -Path "$(Build.SourcesDirectory)/packages" -Filter "Microsoft.Data.SqlClient.*.nupkg" + + if ($packageFiles.Count -eq 0) + { + throw "No Microsoft.Data.SqlClient NuGet package found in packages directory." + } + elseif ($packageFiles.Count -gt 1) { - $version = $matches['version'] - Write-Host "##vso[task.setvariable variable=mdsVersion]$version" - Write-Host "Determined MDS package version: $version" + throw "Multiple Microsoft.Data.SqlClient NuGet packages found in packages directory." } else { - throw "Failed to parse version from package filename: $($packageFile.Name)" + # Extract the version from the package filename. + $packageFile = $packageFiles[0] + if ($packageFile.Name -match 'Microsoft\.Data\.SqlClient\.(?.+)\.nupkg') + { + $version = $matches['version'] + Write-Host "##vso[task.setvariable variable=mdsVersion]$version" + Write-Host "Determined MDS package version: $version" + } + else + { + throw "Failed to parse version from package filename: $($packageFile.Name)" + } } - } - - # Emit the MDS version under test. - - pwsh: | - Write-Host "Testing MDS package version: $(mdsVersion)" - displayName: Emit MDS Version - - # Setup the local SQL Server. - - template: ${{ parameters.sqlSetupStep }}@self - - # We use the 'custom' command because the DotNetCoreCLI@2 task doesn't support - # all of our argument combinations for the different build steps. - - # Restore the solution. - - task: DotNetCoreCLI@2 - displayName: Restore Solution - inputs: - command: custom - custom: restore - projects: ${{ parameters.solution }} - arguments: ${{ parameters.restoreArguments }} -p:MdsPackageVersion=$(mdsVersion) - - # Build the solution. - - task: DotNetCoreCLI@2 - displayName: Build Solution - inputs: - command: custom - custom: build - projects: ${{ parameters.solution }} - arguments: ${{ parameters.buildArguments }} --no-restore -p:MdsPackageVersion=$(mdsVersion) - - # Write the config file. - - task: PowerShell@2 - displayName: Write Config File - inputs: - pwsh: true - targetType: inline - script: | - # Capture the multi-line JSON content into a variable. - $content = @" - ${{ parameters.configContent }} - "@ - - # Write the JSON content to the config file. - $content | Out-File -FilePath "config.json" - - # Run the stress tests for each .NET runtime. - - ${{ each runtime in parameters.netTestRuntimes }}: + + # Emit the MDS version under test. + - pwsh: | + Write-Host "Testing MDS package version: $(mdsVersion)" + displayName: Emit MDS Version + + # Setup the local SQL Server. + - template: ${{ parameters.sqlSetupStep }}@self + + # We use the 'custom' command because the DotNetCoreCLI@2 task doesn't support + # all of our argument combinations for the different build steps. + + # Restore the solution. - task: DotNetCoreCLI@2 - displayName: Test [${{runtime}}] + displayName: Restore Solution inputs: command: custom - custom: run - projects: ${{ parameters.testProject }} - arguments: ${{ parameters.buildArguments }} --no-build -p:MdsPackageVersion=$(mdsVersion) -f ${{runtime}} -e STRESS_CONFIG_FILE=config.json -- $(testArguments) + custom: restore + projects: ${{ parameters.solution }} + arguments: ${{ parameters.restoreArguments }} -p:MdsPackageVersion=$(mdsVersion) - # Run the stress tests for each .NET Framework runtime. - - ${{ each runtime in parameters.netFrameworkTestRuntimes }}: + # Build the solution. - task: DotNetCoreCLI@2 - displayName: Test [${{runtime}}] + displayName: Build Solution inputs: command: custom - custom: run - projects: ${{ parameters.testProject }} - arguments: ${{ parameters.buildArguments }} --no-build -p:MdsPackageVersion=$(mdsVersion) -f ${{runtime}} -e STRESS_CONFIG_FILE=config.json -- $(testArguments) + custom: build + projects: ${{ parameters.solution }} + arguments: ${{ parameters.buildArguments }} --no-restore -p:MdsPackageVersion=$(mdsVersion) + + # Write the config file. + - task: PowerShell@2 + displayName: Write Config File + inputs: + pwsh: true + targetType: inline + script: | + # Capture the multi-line JSON content into a variable. + $content = @" + ${{ parameters.configContent }} + "@ + + # Write the JSON content to the config file. + $content | Out-File -FilePath "config.json" + + # Run the stress tests for each .NET runtime. + - ${{ each runtime in parameters.netTestRuntimes }}: + - task: DotNetCoreCLI@2 + displayName: Test [${{runtime}}] + inputs: + command: custom + custom: run + projects: ${{ parameters.testProject }} + arguments: ${{ parameters.buildArguments }} --no-build -p:MdsPackageVersion=$(mdsVersion) -f ${{runtime}} -e STRESS_CONFIG_FILE=config.json -- $(testArguments) + + # Run the stress tests for each .NET Framework runtime. + - ${{ each runtime in parameters.netFrameworkTestRuntimes }}: + - task: DotNetCoreCLI@2 + displayName: Test [${{runtime}}] + inputs: + command: custom + custom: run + projects: ${{ parameters.testProject }} + arguments: ${{ parameters.buildArguments }} --no-build -p:MdsPackageVersion=$(mdsVersion) -f ${{runtime}} -e STRESS_CONFIG_FILE=config.json -- $(testArguments) diff --git a/eng/pipelines/stages/stress-tests-ci-stage.yml b/eng/pipelines/stages/stress-tests-ci-stage.yml index 546bd93321..9755cf5cd8 100644 --- a/eng/pipelines/stages/stress-tests-ci-stage.yml +++ b/eng/pipelines/stages/stress-tests-ci-stage.yml @@ -27,6 +27,21 @@ parameters: - Debug - Release + # The alias of the pipeline whose artifacts we should download. This is the + # name given to a pipeline resource in the resources definition section of the + # top-level pipeline, for example: + # + # resources: + # pipelines: + # - pipeline: + # + # See: + # + # https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema/resources-pipelines-pipeline?view=azure-pipelines#the-pipeline-resource-metadata-as-predefined-variables + # + - name: pipelineAlias + type: string + # The name of the pipeline artifact to download that contains the MDS package # to stress test. - name: pipelineArtifactName @@ -125,6 +140,7 @@ stages: poolName: ADO-CI-1ES-Pool vmImage: ADO-UB20-SQL22 sqlSetupStep: /eng/pipelines/common/templates/steps/configure-sql-server-linux-step.yml + pipelineAlias: ${{ parameters.pipelineAlias }} pipelineArtifactName: ${{ parameters.pipelineArtifactName }} mdsPackageVersion: ${{ parameters.mdsPackageVersion }} solution: $(solution) @@ -146,6 +162,7 @@ stages: # don't have to install one explicitly. vmImage: ADO-MMS22-SQL22 sqlSetupStep: /eng/pipelines/common/templates/steps/configure-sql-server-win-step.yml + pipelineAlias: ${{ parameters.pipelineAlias }} pipelineArtifactName: ${{ parameters.pipelineArtifactName }} mdsPackageVersion: ${{ parameters.mdsPackageVersion }} solution: $(solution) @@ -170,6 +187,7 @@ stages: poolName: Azure Pipelines vmImage: macos-latest sqlSetupStep: /eng/pipelines/common/templates/steps/configure-sql-server-macos-step.yml + pipelineAlias: ${{ parameters.pipelineAlias }} pipelineArtifactName: ${{ parameters.pipelineArtifactName }} mdsPackageVersion: ${{ parameters.mdsPackageVersion }} solution: $(solution) diff --git a/eng/pipelines/stress-tests-pipeline.yml b/eng/pipelines/stress-tests-pipeline.yml index d5b92a6e4c..37f3205675 100644 --- a/eng/pipelines/stress-tests-pipeline.yml +++ b/eng/pipelines/stress-tests-pipeline.yml @@ -36,11 +36,17 @@ trigger: none # pipelines. # # The pipeline identifiers are displayed in the Azure DevOps UI, so it is -# helpful if they indicate the project and pipeline name, hence the strange -# looking values below. +# helpful if they indicate the project, folder, and pipeline name, hence the +# verbose values below. # resources: pipelines: + + # TODO: Remove this pipeline; it exists for testing via PR runs. + - pipeline: Public-ADO-PR-SqlClient-Package + project: Public + source: /ADO/PR-SqlClient-Package + # The CI-SqlClient-Package pipeline in the Public project. - pipeline: Public-ADO-CI-SqlClient-Package project: Public @@ -48,7 +54,8 @@ resources: trigger: branches: include: - - main + - main + # The MDS Main CI-Package pipeline in the ADO.Net project. - pipeline: ADO-Net-Internal-CI-MDS-Main-CI-Package project: ADO.Net @@ -56,7 +63,7 @@ resources: trigger: branches: include: - - internal/main + - internal/main # Pipeline parameters, visible in the Azure DevOps UI. parameters: @@ -79,6 +86,13 @@ stages: - template: /eng/pipelines/stages/stress-tests-ci-stage.yml@self parameters: buildConfiguration: ${{ parameters.buildConfiguration }} + # If we were triggered by an upstream pipeline, use the alias of that + # pipeline resource. Otherwise, assume we were triggered manually via the + # Azure DevOps UI and arbitrarily choose use the Public + # CI-SqlClient-Package pipeline. + # + # TODO: Use CI-SqlClient-Package instead of PR-SqlClient-Package. + pipelineAlias: $[coalesce(variables['Resources.TriggeringAlias'], 'Public-ADO-PR-SqlClient-Package')] # All of the pipelines that trigger us produce the same artifact name. # (See dotnet-sqlclient-ci-core.yml.) pipelineArtifactName: Artifacts From f103509e58b9b564cd169b55117680b027fe9389 Mon Sep 17 00:00:00 2001 From: Paul Medynski <31868385+paulmedynski@users.noreply.github.com> Date: Tue, 6 Jan 2026 08:19:46 -0400 Subject: [PATCH 7/8] - Fixed pipeline alias value expansion. --- eng/pipelines/stress-tests-pipeline.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/eng/pipelines/stress-tests-pipeline.yml b/eng/pipelines/stress-tests-pipeline.yml index 37f3205675..dd584983c9 100644 --- a/eng/pipelines/stress-tests-pipeline.yml +++ b/eng/pipelines/stress-tests-pipeline.yml @@ -82,17 +82,21 @@ parameters: type: boolean default: false +variables: + # If we were triggered by an upstream pipeline, use the alias of that + # pipeline resource. Otherwise, assume we were triggered manually via the + # Azure DevOps UI and arbitrarily choose use the Public + # CI-SqlClient-Package pipeline. + # + # TODO: Use CI-SqlClient-Package instead of PR-SqlClient-Package. + - name: pipelineAlias + value: $[coalesce(variables['Resources.TriggeringAlias'], 'Public-ADO-PR-SqlClient-Package')] + stages: - template: /eng/pipelines/stages/stress-tests-ci-stage.yml@self parameters: buildConfiguration: ${{ parameters.buildConfiguration }} - # If we were triggered by an upstream pipeline, use the alias of that - # pipeline resource. Otherwise, assume we were triggered manually via the - # Azure DevOps UI and arbitrarily choose use the Public - # CI-SqlClient-Package pipeline. - # - # TODO: Use CI-SqlClient-Package instead of PR-SqlClient-Package. - pipelineAlias: $[coalesce(variables['Resources.TriggeringAlias'], 'Public-ADO-PR-SqlClient-Package')] + pipelineAlias: $(pipelineAlias) # All of the pipelines that trigger us produce the same artifact name. # (See dotnet-sqlclient-ci-core.yml.) pipelineArtifactName: Artifacts From 23d23c30bc2c8e52bc450c4ebac71720ae7b4b9a Mon Sep 17 00:00:00 2001 From: Paul Medynski <31868385+paulmedynski@users.noreply.github.com> Date: Tue, 6 Jan 2026 08:30:49 -0400 Subject: [PATCH 8/8] - Fixed expansion of artifact download identifiers. --- eng/pipelines/jobs/stress-tests-ci-job.yml | 16 +++++++++++++--- eng/pipelines/stress-tests-pipeline.yml | 9 ++++----- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/eng/pipelines/jobs/stress-tests-ci-job.yml b/eng/pipelines/jobs/stress-tests-ci-job.yml index c4445f085d..7a2d417110 100644 --- a/eng/pipelines/jobs/stress-tests-ci-job.yml +++ b/eng/pipelines/jobs/stress-tests-ci-job.yml @@ -129,6 +129,16 @@ jobs: - name: mdsVersion value: ${{ parameters.mdsPackageVersion }} + # Variables for the specific pipeline run to download artifacts from. We + # must expand these values here; they don't expand properly if used + # directly in the download task step below. + - name: artifactProjectId + value: $[variables['resources.pipeline.${{ parameters.pipelineAlias }}.projectID']] + - name: artifactPipelineId + value: $[variables['resources.pipeline.${{ parameters.pipelineAlias }}.pipelineID']] + - name: artifactRunId + value: $[variables['resources.pipeline.${{ parameters.pipelineAlias }}.runID']] + steps: # Install the .NET 10.0 SDK. @@ -166,10 +176,10 @@ jobs: preferTriggeringPipeline: true # Otherwise, use the pipeline alias to explicitly choose the # artifacts. - project: $[variables['resources.pipeline.${{ parameters.pipelineAlias }}.projectID']] - pipeline: $[variables['resources.pipeline.${{ parameters.pipelineAlias }}.pipelineID']] + project: $(artifactProjectId) + pipeline: $(artifactPipelineId) runVersion: specific - runId: $[variables['resources.pipeline.${{ parameters.pipelineAlias }}.runID']] + runId: $(artifactRunId) # Determine the MDS package version if not specified. # diff --git a/eng/pipelines/stress-tests-pipeline.yml b/eng/pipelines/stress-tests-pipeline.yml index dd584983c9..1103754b9c 100644 --- a/eng/pipelines/stress-tests-pipeline.yml +++ b/eng/pipelines/stress-tests-pipeline.yml @@ -21,7 +21,7 @@ # # https://dev.azure.com/SqlClientDrivers/public/_build?definitionId=2212 # -# ADO.net project: +# ADO.Net project: # # TODO @@ -83,10 +83,9 @@ parameters: default: false variables: - # If we were triggered by an upstream pipeline, use the alias of that - # pipeline resource. Otherwise, assume we were triggered manually via the - # Azure DevOps UI and arbitrarily choose use the Public - # CI-SqlClient-Package pipeline. + # If we were triggered by an upstream pipeline, use the alias of that pipeline + # resource. Otherwise, assume we were triggered manually via the Azure DevOps + # UI and arbitrarily choose the Public CI-SqlClient-Package pipeline. # # TODO: Use CI-SqlClient-Package instead of PR-SqlClient-Package. - name: pipelineAlias