Skip to content

Stress | Move to ci/stress and build against sqlclient-ci-package output#4456

Open
paulmedynski wants to merge 2 commits into
mainfrom
dev/paul/sqlcliet-ci-stress
Open

Stress | Move to ci/stress and build against sqlclient-ci-package output#4456
paulmedynski wants to merge 2 commits into
mainfrom
dev/paul/sqlcliet-ci-stress

Conversation

@paulmedynski

@paulmedynski paulmedynski commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Relocates and reworks the stress test pipeline so it validates the packaged driver produced by the sqlclient-ci-package pipeline, and converts the stress projects to the standard ReferenceType Package/Project pattern used by the other SqlClient test projects.

Pipeline

  • Move eng/pipelines/stress/*eng/pipelines/ci/stress/ and rename the pipeline/stage/job to sqlclient-ci-stress-*.yml.
  • Trigger on completion of sqlclient-ci-package, scoped to the current project. A single pipeline resource omits project (so it resolves to the current ADO project) and references the pipeline by its bare source name, so the Public registration is triggered only by Public's sqlclient-ci-package and the ADO.Net registration only by ADO.Net's — no cross-project triggering. (This requires the sqlclient-ci-package name to be unique within each project so the folder can be omitted from source; variables/System.TeamProject can't be used in the resources block.)
  • Download the SqlClient-Driver-Packages artifact into the local NuGet feed (packages/) 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.
  • Pool selection is driven by a single isInternalBuild variable and the requested image: macOS images run on the Microsoft-hosted Azure Pipelines pool; all other images run on the 1ES pool for the current project (ADO-1ES-Pool/ADO-CI-1ES-Pool) matched via imageOverride. The old threaded poolName parameter is removed.
  • Jobs: Linux (ADO-UB22-SQL22), Windows (ADO-MMS22-SQL22), and macOS (macos-latest).

Projects

  • Add the standard ReferenceType Package/Project toggle to the three stress projects that reference MDS (SqlClient.Stress.Framework also toggles the Azure extension), defaulting to Project for local/IDE builds.
  • Declare Microsoft.Data.SqlClient and Microsoft.Data.SqlClient.Extensions.Azure PackageVersion entries (Package mode) in the stress Directory.Packages.props.

Docs

  • Update pipeline path references in the instructions/prompt files and drop the now-redundant eng/pipelines/stress/* exclusion from the PR pipelines (covered by eng/pipelines/ci/*).

Tests

  • Public project pipeline run: 19802
  • ADO.Net project pipeline run: 19802

Notes for Reviewers

  • No effort was made to identify common/shared stages, jobs, or steps between this pipeline and sqlclient-ci-package and sqlclient-pr. I want to wait for a few of the new pipelines to exist before identifying emergent commonalities to factor out.
  • The stress tests themselves are still failing. That is a separate concern.

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.
Copilot AI review requested due to automatic review settings July 17, 2026 19:27
@github-project-automation github-project-automation Bot moved this to To triage in SqlClient Board Jul 17, 2026
@paulmedynski paulmedynski added the Area\Engineering Use this for issues that are targeted for changes in the 'eng' folder or build systems. label Jul 17, 2026
@paulmedynski paulmedynski moved this from To triage to In progress in SqlClient Board Jul 17, 2026
@paulmedynski paulmedynski added this to the 7.1.0-preview3 milestone Jul 17, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-package and run stress tests in ReferenceType=Package mode.
  • Added ReferenceType-based conditional ProjectReference vs PackageReference wiring 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 the sqlclient-ci-package pipeline publishes its NuGet packages artifact as Packages (see eng/pipelines/ci/package/sqlclient-package.yml, PublishPipelineArtifact artifactName: 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 named SqlClient-Driver-Packages, but the sqlclient-ci-package pipeline publishes the packages artifact as Packages (see eng/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
  • referenceArgs embeds $(mdsPackageVersion) / $(azurePackageVersion) inside another variable. If Azure Pipelines does not recursively expand nested macros, dotnet build/dotnet run will 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 DotNetCoreCLI arguments avoids this nested-expansion ambiguity.

Copilot AI review requested due to automatic review settings July 17, 2026 19:53
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'.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 the sqlclient-ci-package pipeline currently publishes its .nupkg/.snupkg output under the artifact name Packages. As written, packageArtifactDir will 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, but sqlclient-ci-package publishes its NuGet output as artifact Packages. The download step will fail (or download nothing) and the later staging/restore will break.

@paulmedynski
paulmedynski marked this pull request as ready for review July 17, 2026 22:07
@paulmedynski
paulmedynski requested a review from a team July 17, 2026 22:07
@paulmedynski paulmedynski moved this from In progress to In review in SqlClient Board Jul 17, 2026

# Download the SqlClient driver packages published by the triggering sqlclient-ci-package
# pipeline into the pipeline workspace.
- download: sqlclient-ci-package

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pipeline will only support Package mode, but devs can run locally using Project refs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area\Engineering Use this for issues that are targeted for changes in the 'eng' folder or build systems.

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

4 participants