Stress | Move to ci/stress and build against sqlclient-ci-package output#4456
Stress | Move to ci/stress and build against sqlclient-ci-package output#4456paulmedynski wants to merge 2 commits into
Conversation
Relocate and rework the stress test pipeline so it validates the packaged driver produced by the sqlclient-ci-package pipeline. Pipeline: - Move eng/pipelines/stress/* to eng/pipelines/ci/stress/ and rename the pipeline/stage/job to sqlclient-ci-stress-*.yml. - Trigger on successful completion of sqlclient-ci-package (Public and ADO.Net projects) instead of the legacy PR/CI pipelines. - Download the SqlClient-Driver-Packages artifact into the local NuGet feed and resolve the exact MDS/Azure versions from the .nupkg filenames. - Build and run the stress tests in Package mode (ReferenceType=Package) against those versions. - Derive the pool from a single isInternalBuild variable; route macOS images to the Microsoft-hosted 'Azure Pipelines' pool and other images to the 1ES pool via imageOverride. Remove the threaded poolName parameter. Projects: - Add the standard ReferenceType Package/Project toggle to the three stress projects that reference MDS (Framework also toggles the Azure extension), defaulting to Project for local/IDE builds. - Declare MDS and Azure PackageVersion entries (Package mode) in the stress Directory.Packages.props. Docs: - Update pipeline path references and drop the now-redundant stress path exclusion from the PR pipelines.
There was a problem hiding this comment.
Pull request overview
Relocates the stress test pipeline under eng/pipelines/ci/stress/ and updates stress test projects so they can build either against in-repo project references (local/IDE) or against produced NuGet packages (CI), aligning stress coverage with the standard Package/Project ReferenceType pattern used elsewhere in SqlClient.
Changes:
- Moved/reworked the stress pipeline to trigger from
sqlclient-ci-packageand run stress tests inReferenceType=Packagemode. - Added
ReferenceType-based conditionalProjectReferencevsPackageReferencewiring to the stress test projects, plus stress-local CPM entries for SqlClient/Azure package versions. - Updated docs/prompts and PR pipeline path exclusions to reflect the new stress pipeline location under
eng/pipelines/ci/.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/Microsoft.Data.SqlClient/tests/StressTests/SqlClient.Stress.Tests/SqlClient.Stress.Tests.csproj | Conditional MDS project/package reference based on ReferenceType. |
| src/Microsoft.Data.SqlClient/tests/StressTests/SqlClient.Stress.Runner/SqlClient.Stress.Runner.csproj | Conditional MDS project/package reference based on ReferenceType. |
| src/Microsoft.Data.SqlClient/tests/StressTests/SqlClient.Stress.Framework/SqlClient.Stress.Framework.csproj | Conditional MDS + Azure extension project/package references based on ReferenceType. |
| src/Microsoft.Data.SqlClient/tests/StressTests/Directory.Packages.props | Defaults ReferenceType to Project; in Package mode wires PackageVersion to pipeline-supplied versions. |
| eng/pipelines/sqlclient-pr-project-ref-pipeline.yml | Removes redundant exclusion for the old eng/pipelines/stress/* path. |
| eng/pipelines/sqlclient-pr-package-ref-pipeline.yml | Removes redundant exclusion for the old eng/pipelines/stress/* path. |
| eng/pipelines/ci/stress/sqlclient-ci-stress-stage.yml | Switches stage to new stress job template and removes threaded pool parameter. |
| eng/pipelines/ci/stress/sqlclient-ci-stress-pipeline.yml | Updates pipeline resource triggers to run from sqlclient-ci-package and points at new stage template path. |
| eng/pipelines/ci/stress/sqlclient-ci-stress-job.yml | Downloads packaged outputs, stages packages into local feed, resolves versions, and runs stress tests in Package mode; adjusts pool selection logic. |
| .github/prompts/update-build-pipelines.prompt.md | Updates stress pipeline reference path in maintainer prompt. |
| .github/instructions/ado-pipelines.instructions.md | Updates stress pipeline reference path in ADO pipeline guidance. |
Comments suppressed due to low confidence (3)
eng/pipelines/ci/stress/sqlclient-ci-stress-job.yml:109
- The job expects the downloaded artifact to be under
.../SqlClient-Driver-Packages, but thesqlclient-ci-packagepipeline publishes its NuGet packages artifact asPackages(seeeng/pipelines/ci/package/sqlclient-package.yml, PublishPipelineArtifactartifactName: Packages). As written,$(packageArtifactDir)will point to a non-existent folder and the staging step will fail.
eng/pipelines/ci/stress/sqlclient-ci-stress-job.yml:218 - The
download:steps request an artifact namedSqlClient-Driver-Packages, but thesqlclient-ci-packagepipeline publishes the packages artifact asPackages(seeeng/pipelines/ci/package/sqlclient-package.yml). This will cause the download step to fail because the artifact name won't be found.
eng/pipelines/ci/stress/sqlclient-ci-stress-job.yml:150 referenceArgsembeds$(mdsPackageVersion)/$(azurePackageVersion)inside another variable. If Azure Pipelines does not recursively expand nested macros,dotnet build/dotnet runwill receive MSBuild properties like-p:SqlClientPackageVersion=$(mdsPackageVersion), which MSBuild will treat as an (undefined) MSBuild property expression and resolve to empty. Passing the pipeline variables directly in the DotNetCoreCLIargumentsavoids this nested-expansion ambiguity.
Replace the two explicit sqlclient-ci-package pipeline resources with a single resource that omits 'project' (resolving to the current project) and references the pipeline by its bare 'source' name. This scopes the completion trigger per project automatically, so the Public registration is triggered only by Public's sqlclient-ci-package and the ADO.Net registration only by ADO.Net's, without using variables in the resources block (which the compiler rejects). Collapse the job back to the single 'sqlclient-ci-package' resource alias for the artifact download and packageArtifactDir. Note: this requires the sqlclient-ci-package name to be unique within both projects so the folder path can be omitted from 'source'.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (2)
eng/pipelines/ci/stress/sqlclient-ci-stress-job.yml:105
- The pipeline resource download is wired to an artifact named
SqlClient-Driver-Packages, but thesqlclient-ci-packagepipeline currently publishes its .nupkg/.snupkg output under the artifact namePackages. As written,packageArtifactDirwill point at a non-existent folder and the staging step will fail to copy packages.
eng/pipelines/ci/stress/sqlclient-ci-stress-job.yml:211 - This job downloads artifact
SqlClient-Driver-Packages, butsqlclient-ci-packagepublishes its NuGet output as artifactPackages. The download step will fail (or download nothing) and the later staging/restore will break.
|
|
||
| # Download the SqlClient driver packages published by the triggering sqlclient-ci-package | ||
| # pipeline into the pipeline workspace. | ||
| - download: sqlclient-ci-package |
There was a problem hiding this comment.
I suspect these 2 steps will end up being common, but I'll wait to see how the flaky pipeline needs to do things before making that call.
| <!-- packages, so the stress tests build against a fully-packaged driver. Package mode is --> | ||
| <!-- selected by setting the build parameter ReferenceType to "Package". Otherwise the build --> | ||
| <!-- defaults to referencing the projects directly. --> | ||
| <ProjectReference Include="$(RepoRoot)/src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj" |
There was a problem hiding this comment.
The pipeline will only support Package mode, but devs can run locally using Project refs.
Summary
Relocates and reworks the stress test pipeline so it validates the packaged driver produced by the
sqlclient-ci-packagepipeline, and converts the stress projects to the standardReferenceTypePackage/Project pattern used by the other SqlClient test projects.Pipeline
eng/pipelines/stress/*→eng/pipelines/ci/stress/and rename the pipeline/stage/job tosqlclient-ci-stress-*.yml.sqlclient-ci-package, scoped to the current project. A single pipeline resource omitsproject(so it resolves to the current ADO project) and references the pipeline by its baresourcename, so the Public registration is triggered only by Public'ssqlclient-ci-packageand the ADO.Net registration only by ADO.Net's — no cross-project triggering. (This requires thesqlclient-ci-packagename to be unique within each project so the folder can be omitted fromsource;variables/System.TeamProjectcan't be used in theresourcesblock.)SqlClient-Driver-Packagesartifact into the local NuGet feed (packages/) and resolve the exact MDS/Azure versions from the.nupkgfilenames.ReferenceType=Package) against those versions.isInternalBuildvariable and the requested image: macOS images run on the Microsoft-hostedAzure Pipelinespool; all other images run on the 1ES pool for the current project (ADO-1ES-Pool/ADO-CI-1ES-Pool) matched viaimageOverride. The old threadedpoolNameparameter is removed.ADO-UB22-SQL22), Windows (ADO-MMS22-SQL22), and macOS (macos-latest).Projects
ReferenceTypePackage/Project toggle to the three stress projects that reference MDS (SqlClient.Stress.Frameworkalso toggles the Azure extension), defaulting toProjectfor local/IDE builds.Microsoft.Data.SqlClientandMicrosoft.Data.SqlClient.Extensions.AzurePackageVersionentries (Package mode) in the stressDirectory.Packages.props.Docs
eng/pipelines/stress/*exclusion from the PR pipelines (covered byeng/pipelines/ci/*).Tests
Notes for Reviewers
sqlclient-ci-packageandsqlclient-pr. I want to wait for a few of the new pipelines to exist before identifying emergent commonalities to factor out.