Stress | Move to ci/stress and build against sqlclient-ci-package output - #4456
Conversation
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.
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.
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.
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'.
5cc0897 to
5255a4f
Compare
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-pipeline.yml:8
- The header comment still says the stress pipeline builds the SqlClient projects transitively, but the pipeline now downloads and tests the packaged driver from
sqlclient-ci-package. Updating this avoids confusion for future maintainers.
eng/pipelines/ci/stress/sqlclient-ci-stress-job.yml:234 - The version-resolution step searches the local feed directory and picks the first matching .nupkg. On self-hosted agents,
packages/can contain stale files from earlier runs, which can make the resolved version non-deterministic (or wrong) when multiple matches exist. Resolve from the downloaded artifact directory and fail if the match is not exactly one package.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4456 +/- ##
==========================================
- Coverage 65.83% 65.26% -0.58%
==========================================
Files 287 285 -2
Lines 43763 66887 +23124
==========================================
+ Hits 28812 43651 +14839
- Misses 14951 23236 +8285
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.