Skip to content

Quarantine intermittent pool instrumentation checkout theory - #5020

Merged
paulmedynski merged 1 commit into
mainfrom
dev/mdaigle/sqlclient-flaky-quarantine-20261107
Nov 9, 2026
Merged

paulmedynski merged 1 commit into
mainfrom
dev/mdaigle/sqlclient-flaky-quarantine-20261107

Conversation

@mdaigle

@mdaigle mdaigle commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

🤖 This pull request was created by a fully automated workflow.

Description

Add one [Trait("category", "flaky")] to the existing pool instrumentation theory. Test bodies, assertions, data and other categories are unchanged; no product, API, documentation, dependency or pipeline changes.

Affected identities:

Microsoft.Data.SqlClient.UnitTests.ConnectionPool.DbConnectionPoolInstrumentationTest.ConcurrentCheckoutAndReturn_SettlesAllGaugesToZero(implementation: WaitHandle)
Microsoft.Data.SqlClient.UnitTests.ConnectionPool.DbConnectionPoolInstrumentationTest.ConcurrentCheckoutAndReturn_SettlesAllGaugesToZero(implementation: Channel)

WaitHandle is confirmed intermittent on main revision 5aaa9ef090135a9a462f31d2e7945d97baa9e65b, CI-SqlClient / Windows Server 2022 / net462 x64 native SNI / Release / Project:

Outcome Build Exact result Observed UTC
Passed 190082 3682470 / 104475 2026-11-06T23:43:16.983Z–23:43:19.693Z
Failed 190106 3682592 / 102426 2026-11-07T01:18:17.760Z–01:18:17.827Z

The same case passed and failed on the same source and image/configuration, on different agent allocations. Failure is Assert.NotNull in a concurrent checkout worker; fake connections rule out a SQL outage. This is quarantine, not repair or a stability claim. The method trait routes both cases on net462/net10.0; Channel is not individually claimed intermittent and the rest of the class stays ordinary.

Issues

No issue is closed. #4980 and #5016 are unrelated pending quarantines; #4996 and #5006 are merged quarantines. #5000 is the separate simulator fix/probation proposal. Fixes and probation are outside this automation's scope.

Testing

Local Windows x64 / Release / Project; not the CI image. After restoring missing assets, quarantine discovery selected 2 cases per framework, ordinary discovery retained 26 other cases per framework, and actual execution had 2 passed, 0 failed, 0 skipped per framework.

# Passed: selects WaitHandle and Channel on net462 and net10.0.
dotnet test src\Microsoft.Data.SqlClient\tests\UnitTests\Microsoft.Data.SqlClient.UnitTests.csproj --no-restore -c Release --list-tests --filter "FullyQualifiedName~DbConnectionPoolInstrumentationTest&category=flaky" -v:q

# Passed: both excluded; 26 neighboring cases retained per framework.
dotnet test src\Microsoft.Data.SqlClient\tests\UnitTests\Microsoft.Data.SqlClient.UnitTests.csproj --no-build --no-restore -c Release --list-tests --filter "FullyQualifiedName~DbConnectionPoolInstrumentationTest&category!=failing&category!=flaky&category!=interactive" -v:q

# Passed: 2 executed, 0 failed/skipped per framework.
dotnet test src\Microsoft.Data.SqlClient\tests\UnitTests\Microsoft.Data.SqlClient.UnitTests.csproj --no-build --no-restore -c Release --filter "FullyQualifiedName~DbConnectionPoolInstrumentationTest.ConcurrentCheckoutAndReturn_SettlesAllGaugesToZero&category=flaky" -v:q --logger "trx;LogFilePrefix=pool-instrumentation-quarantine" --results-directory 'C:\Users\mdaigle\.copilot\session-state\845e3c16-70ca-4291-9f3b-9f6f453c8476\files\validation' --blame-hang-timeout 2m

git diff --check passed. Complete collapsed evidence record. The 604-build inventory is complete for 2026-10-24T14:03:04.032Z–2026-11-07T14:03:04.032Z, but broader per-test processing is incomplete; checkpoint not advanced. No validation build was manually queued.

Main still targets 8.0.0-preview1; under the explicit one-time exception this PR is unassigned, not moved to another milestone. Any required milestone-check failure needs maintainer action.

  • Tests added or updated (category only)
  • Public API changes documented (none)
  • Verified against customer repro (not applicable; CI evidence)
  • Ensure no breaking changes introduced (no product changes)

Guidelines

Please review the contribution guidelines before submitting a pull request:

@mdaigle
mdaigle requested a review from a team as a code owner November 7, 2026 14:15
Copilot AI balanced review requested due to automatic review settings November 7, 2026 14:15
@github-project-automation github-project-automation Bot moved this to To triage in SqlClient Board Nov 7, 2026
@mdaigle mdaigle added the Area\Tests Issues that are targeted to tests or test projects label Nov 7, 2026
@mdaigle

mdaigle commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor Author
Quarantine evidence, category validation and incomplete discovery checkpoint - 2026-11-07

Exact identities and category-only scope

Confirmed intermittent case:

Microsoft.Data.SqlClient.UnitTests.ConnectionPool.DbConnectionPoolInstrumentationTest.ConcurrentCheckoutAndReturn_SettlesAllGaugesToZero(implementation: WaitHandle)

The one method-level [Trait("category", "flaky")] also quarantines:

Microsoft.Data.SqlClient.UnitTests.ConnectionPool.DbConnectionPoolInstrumentationTest.ConcurrentCheckoutAndReturn_SettlesAllGaugesToZero(implementation: Channel)

The Channel case passed in both relevant CI runs; it is not individually claimed
intermittent. The existing method-category mechanism moves both InlineData cases,
on net462 and net10.0, without moving the rest of the class. All test bodies,
assertions, data, documentation and existing categories are unchanged. No product,
pipeline, dependency, root-cause repair or probation changes are included.

Actual failure and passing control

Both builds use main SHA 5aaa9ef090135a9a462f31d2e7945d97baa9e65b.

Outcome Pipeline / build Exact run / result Observed UTC
Passed CI-SqlClient 190082 / 31068 3682470 / 104475 2026-11-06T23:43:16.983Z to 23:43:19.693Z
Failed CI-SqlClient 190106 / 31134 3682592 / 102426 2026-11-07T01:18:17.760Z to 01:18:17.827Z

Both observations have exactly the same full test/case identity, an ungrouped
result and no subresults. Single-result responses verify result ID, testRun ID,
build ID, exact name and outcome; no conclusion relies on grouped parent outcomes,
job success, skipped results or a later repaired revision.

Reason for quarantine: the test's concurrent checkout worker received a null
connection after its successful TryGetConnection assertion. The worker's
Assert.NotNull failed and surfaced through Task.WaitAll as an AggregateException.
The preceding same-revision/configuration run actually passed this exact case.
The test uses SuccessfulSqlConnectionFactory, which returns
StubDbConnectionInternal; it does not connect to SQL Server. This rules out a
shared SQL outage as the cause of this assertion. The unit task completed all
2,205 cases with only this one failure (2,195 passed / 9 skipped).
No agent crash, missing-result substitute or infrastructure-wide unit failure was
used as evidence. The scheduling/pool root cause remains unconfirmed and is not
repaired by this PR.

Configuration and unique task mapping

For both runs, server run metadata identifies:

  • Definition 1879 / CI-SqlClient.
  • Stage Win22_Sql17, phase net462_AnyCPU_3, job __default.
  • Stage, phase and job attempt 1.
  • Windows Server 2022 10.0.20348, runner image 20260105.167.1,
    hosted image ADO-MMS22-SQL17 version 115.0.0, VM SKU Standard_D2a_v4.
  • net462 / x64 native SNI / Release / Project reference mode.
    This test's fake connections do not exercise network SNI or enclaves.
  • Ordinary Run Unit Tests x64, not Run Flaky Unit Tests x64.

Public timeline records uniquely match those stage-qualified identifiers:
stage a98f0116-fb98-5128-b8f3-1bc78b841305,
phase d4d5e627-4ab7-56ab-0c27-6864feabc340,
job 62505932-6c8c-5976-6c2a-b648a2176f68,
ordinary unit task 8d1e830c-8650-58ca-2142-cd07fde50b3b.
Parent links and attempt numbers agree with run metadata.

Build Mapped evidence logs
190082 Ordinary unit task / log 2582, lines 1-80; Publish results / log 4027, lines 1-150; initialization log 235, lines 1-65
190106 Ordinary unit task / log 2550, lines 1-100; initialization log 214, lines 1-65

Meaningful comparison: distinct agent allocations, but identical image/SKU,
framework, architecture, reference mode, configuration and source revision.
CI version stamps differ (8.0.0-preview1-ci.31068 versus
8.0.0-preview1-ci.31134); both compile Project references from the same source
SHA, so the differing stamp is not a code repair or a package-content comparison.
There is no job/task retry in this pair. The passing observation precedes failure.

Reconciled relevant-run coverage

Authenticated MCP enumerated all results in five bounded pages per relevant run
(skip=0,1000,2000,3000,4000, top=1000, detailsToInclude=SubResults).
Deduplication uses (buildId, runId, resultId), not title.

Run Unique results Passed Failed NotExecuted Server total
3682470 4,577 4,448 0 129 4,577
3682592 4,578 4,448 1 129 4,578

Counts match server run statistics. For each run the duplicate Passed statistic
entries were summed, retaining 4,446 ordinary Passed and 2 Passed with
resultMetadata=flaky. Those two are metadata counts, not evidence that the newly
selected case was already quarantined. Both theory cases' actual outcomes were
located in the enumerated results; the WaitHandle passing/failing controls were
individually enriched and verified. The other result names can have truncated
arguments and missing grouping information, so these count reconciliations do
not claim every other case is fully identity-enriched.

Failure discovery used authenticated build-result MCP for builds
190000, 190029, 190082, 190106, 190122.
Build 190099 returned no results for the requested failure/passing outcomes;
that empty response is not counted as a test pass.
The passing-results helper for 190082 failed twice with
MCP server 'azure-devops': MCP request failed: Transport closed.
Its mapped authenticated Publish Test Results log supplied actual run ID
3682470; authenticated per-run pagination then succeeded.
Public REST was limited to the permitted single-run, single-result and
build-timeline forms. All consumed responses were HTTP 200 / JSON with matching
identities; no anonymous bulk enumeration, credentials or account bypass was used.

Inspected interval, inventory and unfinished evidence

Completed-build finish-time interval:
2026-10-24T14:03:04.032Z through 2026-11-07T14:03:04.032Z.
No reliable fully processed tagging checkpoint was found, so this run rescanned
14 days and deduplicated prior tagging and human proposals.

Six bounded continued MCP pages enumerated 604 distinct completed builds:

Definition Verified enabled name Builds
2281 sqlclient-pr 177
2300 sqlclient-ci-package 28
2309 sqlclient-ci-unit 0
1879 CI-SqlClient 131
1917 CI-SqlClient-Package 75
2197 PR-SqlClient-Project 182
2198 PR-SqlClient-Package 11

Results: 141 Succeeded, 229 Failed, 222 PartiallySucceeded and 12 Canceled.
All seven definition identities and Enabled states were rechecked.
2250 / sqlclient-ci-stress was rechecked Disabled and excluded.

Broader per-test coverage is incomplete. Result discovery covered six builds
above, not the remaining 598 builds. Only the two relevant runs above were
fully paged/reconciled; the other runs within those six builds were not completely
processed. Build enumeration alone is not per-test coverage. Missing, expired,
aborted, inaccessible and skipped outcomes are never counted as passes.

Unconfirmed observations retained without category changes:

  • Microsoft.Data.SqlClient.Tests.AADAuthenticationTests.IsDummySqlAuthenticationProviderSetByDefault:
    190106 / 3682585 / 100238
    failed at 2026-11-07T01:21:09.673Z to 01:21:09.677Z. Single-result/run identities
    were verified. The passing observation in run 3682592 is a different stage
    (Win22_Sql17, versus failure Win25_Azure_Sql, phase net462_AnyCPU_2).
    Equivalent host/configuration and registry state were not established;
    no quarantine decision follows from this cross-configuration comparison.
  • Microsoft.Data.SqlClient.ManualTesting.Tests.SplitPacketTest.MARSSplitTest:
    190106 / 3682670 / 101954,
    3682676 / 101658 and 190122 / 3683122 / 101501
    are pre-login timeouts. Shared infrastructure/endpoint problems are not
    excluded and no same-configuration passing pair was verified.
  • Microsoft.Data.SqlClient.ManualTesting.Tests.SQL.VectorTest.VectorColumnMetadataTests.SchemaCollectionIncludesVectorType,
    SchemaCollectionOmitsVectorTypeWhenItIsNotNegotiated, and
    V2CreationFormatIncludesBaseType(baseType: "float16") had schema deadlocks
    in discovered runs, including 190082 / 3682547 / 101385 and 101665.
    Concurrent server DDL/infrastructure contention has not been excluded.
  • Microsoft.Data.SqlClient.ManualTesting.Tests.AlwaysEncrypted.ApiShould.TestSqlCommandCancel
    had grouped/insufficiently detailed failures for ExecuteReader/ExecuteNonQuery.
    Connection arguments are truncated in discovery. No parent-outcome-only
    decision or same-case passing claim is made.
  • Microsoft.Data.SqlClient.ManualTesting.Tests.ConnectionPoolTest.MaxPoolWaitForConnectionTest
    had truncated Azure connection arguments with usePoolV2: False and True
    in 190000 / 3679789 / 102372 and 102370. Exact comparable controls were not
    established.

The reclaimed-connection metrics candidate is already covered by open #5016.
The StreamInputParameterTest observation is already marked flaky in main.
These are not duplicated.

Local category validation and exact commands

All commands ran only in this automation's isolated worktree.
Local platform: Windows x64, SDK 10.0.403, Release / Project.
The host is not claimed identical to the CI Windows Server 2022 image.

dotnet test src\Microsoft.Data.SqlClient\tests\UnitTests\Microsoft.Data.SqlClient.UnitTests.csproj --no-restore -c Release --list-tests --filter "FullyQualifiedName~DbConnectionPoolInstrumentationTest&category=flaky" -v:q

Initial attempt failed with NETSDK1004: this worktree lacked project.assets.json
for both frameworks. Corrective restore:

dotnet restore src\Microsoft.Data.SqlClient\tests\UnitTests\Microsoft.Data.SqlClient.UnitTests.csproj -v:q

Passed. Repeating the discovery command then passed, selecting exactly
WaitHandle and Channel on net462 and net10.0 (two cases per framework).

dotnet test src\Microsoft.Data.SqlClient\tests\UnitTests\Microsoft.Data.SqlClient.UnitTests.csproj --no-build --no-restore -c Release --list-tests --filter "FullyQualifiedName~DbConnectionPoolInstrumentationTest&category!=failing&category!=flaky&category!=interactive" -v:q

Passed: 26 other class cases per framework remain in ordinary discovery;
both quarantined cases are absent. This is category-routing validation, not
execution coverage inferred from zero matches.

dotnet test src\Microsoft.Data.SqlClient\tests\UnitTests\Microsoft.Data.SqlClient.UnitTests.csproj --no-build --no-restore -c Release --filter "FullyQualifiedName~DbConnectionPoolInstrumentationTest.ConcurrentCheckoutAndReturn_SettlesAllGaugesToZero&category=flaky" -v:q --logger "trx;LogFilePrefix=pool-instrumentation-quarantine" --results-directory 'C:\Users\mdaigle\.copilot\session-state\845e3c16-70ca-4291-9f3b-9f6f453c8476\files\validation' --blame-hang-timeout 2m

Passed: net462 2 passed / 0 failed / 0 skipped; net10.0 2 passed / 0 failed /
0 skipped.
Both existing test bodies actually executed. This does not claim
repair or long-term stability.

git diff --check passed. The commit contains exactly one inserted category
attribute in one source file; all other source is unchanged.
No Azure DevOps validation build was manually queued.

Related records, release assignment and checkpoint

Latest inspected main's SqlClientNextVersion is 8.0.0-preview1, matching
existing open milestone #101. The user-directed one-time preview exception
applies: tagging PRs remain unassigned, not reassigned to 8.0.0 or 8.1.0.
Published #5020, proposal SHA
46dd78673ec906935ca0c362797f32123024adec, from
dotnet/SqlClient:dev/mdaigle/sqlclient-flaky-quarantine-20261107 to
dotnet/SqlClient:main. Live metadata verified the one-file/one-attribute diff,
Area\Tests, exact visible disclosure first line, no milestone, and the link to
this single collapsed evidence record. #4980 and #5016 also have their required
label/disclosure and no milestone.

Maintainer-action blocker: the required
Validate milestone check
failed at 2026-11-07T14:16:56.1462148Z with:
This PR does not have a milestone set. Please assign a milestone before merging.
The earlier validation run failed for the same condition. This is the expected
conflict with the explicit preview exception, not grounds to assign a different
release, merge, bypass or manufacture a replacement milestone.

Checkpoint: NOT ADVANCED. The 604-build inventory is complete, but the
remaining per-test evidence is unfinished. A subsequent tagging run must rescan
14 days unless a later tagging record establishes a genuinely fully processed
checkpoint. Fix/probation records do not advance discovery state.
Fixes, probation, promotion and flaky-category removal remain outside this
automation's scope.

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.

🔵 Needs a closer look

Required review policies lack an established trusted source, and the missing PR identifier prevents checking current reviewer feedback.

No open issues 🎉

What changed in this PR

Quarantines the existing concurrent pool checkout-and-return instrumentation theory using the flaky category. This changes test selection only; it does not repair the intermittent failure.

Changes:

  • Applies the method-level trait to both WaitHandle and Channel cases; only WaitHandle is confirmed intermittent.
  • Leaves test logic, assertions, data, neighboring tests, and product code unchanged.
File Description
src/​Microsoft.Data.SqlClient/​tests/​UnitTests/​ConnectionPool/​DbConnectionPoolInstrumentationTest.cs Adds [Trait("category", "flaky")] to ConcurrentCheckoutAndReturn_SettlesAllGaugesToZero.

Review effort: Balanced

@paulmedynski
paulmedynski enabled auto-merge (squash) November 9, 2026 14:29
@paulmedynski paulmedynski self-assigned this Nov 9, 2026
@paulmedynski paulmedynski moved this from To triage to In review in SqlClient Board Nov 9, 2026
@paulmedynski paulmedynski added this to the 8.0.0 milestone Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area\Tests Issues that are targeted to tests or test projects

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants