Skip to content

Quarantine intermittent pooled-reset budget theory - #5127

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

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

Conversation

@mdaigle

@mdaigle mdaigle commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

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

Description

Quarantine Microsoft.Data.SqlClient.UnitTests.SimulatedServerTests.IsolationLevelResetTests.PooledReset_UsesRemainingOpenBudget with a method-level [Trait("category", "flaky")] and the required observed-error comment. All 12 InlineData cases move to quarantine on net462/net10.0; test bodies, other categories and neighboring tests are unchanged. No product, API, documentation/localization or pipeline changes.

Eligibility: the simulator callback calls a mutating timeout accessor on the client's live state without synchronization. That invasive sample can race the driver's timeout consumption. CI observed 0 ms where the assertion expected 1–1250 ms, after a successful checkout/reset batch; the exact case passed in another same-revision/configuration job. This is a concrete test-harness weakness, not generic Azure SQL connectivity or a repair claim.

Confirmed arguments: (poolV2: True, async: False, overallTimeout: True, waitForConnection: False).

Outcome Linked build / run / result Observed UTC Revision/configuration
FAIL: timeout sample 0, expected 1–1250 190220 / 3683990 / 101773 2026-11-07 14:35:00.770–.773Z a3454b678be1ee645972ba576a1649fa980174f7; Windows/x86/net10.0/native SNI/Debug/Project
PASS: exact same case 190220 / 3683972 / 102650 2026-11-07 14:34:48.930–.933Z Same revision/configuration; separate job, attempt 1, not a retry

These are main-derived PR jobs; the affected source is unchanged on current main. Complete collapsed evidence record, including exact case matrix, source-backed eligibility, configurations and coverage gaps. Full-window per-test discovery remains incomplete; checkpoint not advanced. Release/6.1, /7.0, /7.1 and /8.0 were included in discovery, but no qualifying release pair supports hotfix routing.

Issues

Related: #4330 introduced the isolation-reset coverage. Pending #5125, #5118 and #5095 quarantine unrelated tests; #5119 and #5117 are separate repair context. No issue is closed. Fixes and probation are outside this automation's scope.

Testing

dotnet test src\Microsoft.Data.SqlClient\tests\UnitTests\Microsoft.Data.SqlClient.UnitTests.csproj --no-restore --list-tests --filter 'FullyQualifiedName~IsolationLevelResetTests.PooledReset_UsesRemainingOpenBudget&category=flaky' -v:q
dotnet test src\Microsoft.Data.SqlClient\tests\UnitTests\Microsoft.Data.SqlClient.UnitTests.csproj --no-build --no-restore --filter 'FullyQualifiedName~IsolationLevelResetTests.PooledReset_UsesRemainingOpenBudget&category=flaky' -v:q --blame-hang-timeout 2m
dotnet test src\Microsoft.Data.SqlClient\tests\UnitTests\Microsoft.Data.SqlClient.UnitTests.csproj --no-build --no-restore --list-tests --filter 'FullyQualifiedName~IsolationLevelResetTests&category!=failing&category!=flaky&category!=interactive' -v:q
git diff --check

Passed: quarantine discovery selects 12 cases per framework; execution passes 12 net462 + 12 net10.0, zero skipped. Ordinary discovery excludes the affected method while retaining neighboring tests. Diff check passed. No manual SQL Server test, local x86/Linux run or stability soak is claimed; category validation is not a fix or stability claim. Passing build-helper retrieval was interrupted; the linked record distinguishes recovered controls from incomplete full-window coverage.

Guidelines

Please review the contribution guidelines before submitting a pull request:

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

mdaigle commented Nov 21, 2026

Copy link
Copy Markdown
Contributor Author
Verified isolation-budget quarantine evidence and incomplete discovery checkpoint - 2026-11-21

Confirmed identity, executions and configuration

The confirmed case is:

Microsoft.Data.SqlClient.UnitTests.SimulatedServerTests.IsolationLevelResetTests.PooledReset_UsesRemainingOpenBudget(poolV2: True, async: False, overallTimeout: True, waitForConnection: False)

All three CI executions below used revision
a3454b678be1ee645972ba576a1649fa980174f7, source branch
refs/pull/5020/merge, targeting main. These are main-derived PR controls,
not release-branch controls. The affected test source is unchanged between that
revision and upstream main ce73774d14b2d192391f00ad4859b085f4b802f1.
No direct main-branch failure of this case was verified in the additional
builds inspected; the same-revision PR-job comparison is the intermittency evidence.

Outcome Pipeline/build/run/result Observed UTC start - completion Configuration
Failed: Assert.InRange, expected 1-1250 ms, actual 0 PR-SqlClient-Project / 190220 / 3683990 / 101773 2026-11-07T14:35:00.770Z - 14:35:00.773Z Windows Server 2022, x86, net10.0, native SNI, Debug, Project; phase net10_0_AnyCPU_NativeSNI_1
Passed, exact same arguments PR-SqlClient-Project / 190220 / 3683972 / 102650 2026-11-07T14:34:48.930Z - 14:34:48.933Z Same build/revision, OS, x86, framework, SNI, configuration and reference mode; phase net10_0_AnyCPU_NativeSNI_2
Passed, exact same arguments; supplemental control sqlclient-pr / 190221 / 3683933 / 100146 2026-11-07T14:33:04.523Z - 14:33:04.523Z Windows, net10.0, Debug, default Project; different pipeline/architecture, not needed for the same-x86 comparison

The _1/_2 phase suffixes select different manual-test sets. Their unit-test
tasks run the affected theory in both jobs. This is not a retry: all stage,
phase, job and task attempts are 1. External SQL Server matrix settings are
not the endpoint of this unit test: it starts a real in-process TDS simulator
listener and connects directly to 127.0.0.1,<its port>, without a forwarding proxy.
Its reset callback is on that simulator. It does not depend on Azure SQL, DNS,
or an upstream SQL Server being local.

Unique mapped jobs/tasks, verified by run pipelineReference and timeline parent IDs:

Execution Stage / phase / job Timeline job Ordinary test task and mapped log
Failure Win22_Sql19_x86 / net10_0_AnyCPU_NativeSNI_1 / __default e8ff4d26-9b9c-56a1-a17e-60b1580af29a Run Unit Tests x86, log 1560, lines 1-90
Same-x86 pass Win22_Sql19_x86 / net10_0_AnyCPU_NativeSNI_2 / __default 23084a00-a13e-59e8-41ac-a89b9dd86842 Run Unit Tests x86, log 1542, lines 1-20
Supplemental pass test_windows_net10 / test_windows_net10_sqlclient_unit / __default 8a0c2b6d-c6da-58da-6d51-2cd9e38b4601 Test: SqlClientUnit, log 393, lines 1-65

The same-x86 control run was discovered from the uniquely mapped
Publish Test Results task,
MCP log 2298, lines 1-100. That log explicitly names run 3683972.
Run and individual result detail reads returned HTTP 200 JSON with matching
run/build/result IDs and outcomes. All listed exact cases have no subResults.
Individual passing records, not successful jobs or retries, establish passes.

Concrete test-specific eligibility

The test
calls inner.Parser._physicalStateObj.GetTimeoutRemaining() from the
simulator's OnSQLBatchCompleted callback.
The callback
runs before returning the response to the simulator transport.
The accessor
is not a passive read: it reads and then clears _timeoutMilliseconds and
writes _timeoutTime without synchronization. The driver's active send/read
path also consumes these fields. The simulator-thread callback introduces an
additional unsynchronized caller on client-owned live state; it can observe
or interfere with a partially consumed timeout. The assertion then requires
that invasive sample to be strictly positive.

This is a source-backed test-harness synchronization weakness, not just
"failed then passed." The failed case completed in 3 ms, had already acquired
the expected connection and observed one reset batch before reaching the
timeout-value assertion. A generic connection outage or exhausted 1.25-second
real-time budget is not the better explanation for that specific symptom.
The identical x86 revision/configuration passed in a separate job. The evidence
supports quarantine, not a complete causal diagnosis or a product repair.
No timing, accessor, synchronization, retry or assertion changes are proposed.

Category-only effect and exact case matrix

Add only the observed-error // comment and method-level
[Trait("category", "flaky")]. Preserve the body, theory inputs, XML docs,
other attributes/categories, and every neighboring method.

All entries below share the fully qualified method name above; columns are
poolV2, async, overallTimeout, waitForConnection. The method-level trait
routes all 12 cases on both net462 and net10.0. Only (True, False, True, False)
has the newly verified CI failure; other cases share the invasive callback,
but are not claimed individually to have failed.

Arguments Same-x86 passing result in run 3683972
False, False, False, False 103094
False, True, False, False 102208
False, False, True, False 103696
False, True, True, False 103730
True, False, False, False 104004
True, True, False, False 102953
True, False, True, False 102650
True, True, True, False 103051
False, True, False, True 103614
False, True, True, True 104188
True, True, False, True 103224
True, True, True, True 103406

These are actual Passed parent records, with constant InlineData identities;
there are no truncated connection-string arguments in this theory.

Validation commands and results

Baseline at upstream main, before adding the category:

dotnet test src\Microsoft.Data.SqlClient\tests\UnitTests\Microsoft.Data.SqlClient.UnitTests.csproj --no-build --no-restore -f net10.0 --filter 'FullyQualifiedName~IsolationLevelResetTests.PooledReset_UsesRemainingOpenBudget' -v:q --blame-hang-timeout 2m

Passed: 12, failed: 0, skipped: 0. This is a current-source control, not
a stability/repair claim.

After the category change:

dotnet test src\Microsoft.Data.SqlClient\tests\UnitTests\Microsoft.Data.SqlClient.UnitTests.csproj --no-restore --list-tests --filter 'FullyQualifiedName~IsolationLevelResetTests.PooledReset_UsesRemainingOpenBudget&category=flaky' -v:q
dotnet test src\Microsoft.Data.SqlClient\tests\UnitTests\Microsoft.Data.SqlClient.UnitTests.csproj --no-build --no-restore --filter 'FullyQualifiedName~IsolationLevelResetTests.PooledReset_UsesRemainingOpenBudget&category=flaky' -v:q --blame-hang-timeout 2m
dotnet test src\Microsoft.Data.SqlClient\tests\UnitTests\Microsoft.Data.SqlClient.UnitTests.csproj --no-build --no-restore --list-tests --filter 'FullyQualifiedName~IsolationLevelResetTests&category!=failing&category!=flaky&category!=interactive' -v:q
git diff --check

Results: quarantine discovery lists all 12 exact cases per framework;
quarantine execution passes 12 net462 and 12 net10.0, zero failures/skips.
Ordinary discovery excludes the entire affected method on each framework and
still lists neighboring isolation-reset tests. Zero matches are used only
to establish intended exclusion, never as executed coverage. Diff check passed.
No manual database test is needed for a source-category-only change to an
in-process simulator unit theory. No Linux/x86 local execution or stability
soak is claimed. Existing ordinary/quarantine filters were inspected in
build.proj and common pipeline steps and were not changed.

Deduplication, release branches and milestone

Live open tagging proposals #5125,
#5118 and
#5095 affect different methods/files.
The EventSource failure in this run is already covered by #5118; it is not
added to this batch. Open repairs #5119
and #5117, and merged
#5072, are context only.
No open PR file overlaps IsolationLevelResetTests; an exact-method PR search
returned no proposal. Historical #4980
and #4996 were rechecked live as
merged, affecting pool blocking and simulator lifecycle respectively.
Existing schema, metrics and certificate quarantine history was also inspected.
#5047 was not edited.

Release branches discovered from scoped metadata and upstream refs:
release/6.1, release/7.0, release/7.1, release/8.0.
For definition 1879 their inventory counts are respectively 7, 6, 22, 21.
All scoped definitions together have respectively 14, 12, 50, 40 builds on
these branches. Release/8.0 source still contains the affected theory and
callback without a flaky category. No release-branch failing/passing pair
for this exact case was verified, so no release quarantine eligibility or
hotfix routing is established
. No main pass substitutes for a release pass.
No hotfix label or manual backport PR is requested. Current patch-label
selection is not attempted without qualifying branch evidence. Branch-wide
per-test review remains unfinished for all four releases.

Fresh upstream main declares SqlClientNextVersion=8.1.0-preview1; existing
milestone #108 is open and matches exactly. The one-time 8.0.0-preview1
exclusion is no longer applicable. Publication must verify milestone #108,
the exact existing one-backslash Area\Tests label, and the required
automated-disclosure first line. No human milestone override was encountered
on this new proposal.

Inventory, reconciliation, unfinished evidence and checkpoint

No reliable fully processed tagging checkpoint was found in prior tagging
records #5125, #5118 or #5095. Their checkpoints are explicitly not advanced.
Fix/probation records do not supply a discovery checkpoint. This run queried
the full completed-build finish-time interval
2026-11-07T14:02:30.838Z through 2026-11-21T14:02:30.838Z.

All seven requested definition identities were rechecked with enabled status:
2281 sqlclient-pr; 2300 sqlclient-ci-package; 2309 sqlclient-ci-unit;
1879 CI-SqlClient; 1917 CI-SqlClient-Package; 2197 PR-SqlClient-Project;
2198 PR-SqlClient-Package. Definition 2250 sqlclient-ci-stress was verified
disabled and excluded.

Authenticated build discovery paginated to exhaustion, without an outcome
or main-only filter: 480 builds, including 195 succeeded, 190 failed,
79 partially succeeded and 16 canceled. Counts by definition:
2281=202, 2300=28, 2309=0, 1879=116, 1917=70, 2197=47, 2198=17.
71 builds are main, 116 are on the four observed release branches, and the
remainder are scoped PR/development-branch builds. This complete build
inventory is not complete per-test coverage.

Three relevant runs were authenticated-paginated and reconciled against
server run statistics by result ID:

Build / run Reconciled ordinary result enumeration
190220 / 3683990 3,807 unique: 3,779 Passed, 1 Failed, 27 NotExecuted
190220 / 3683972 4,403 unique: 4,346 Passed, 57 NotExecuted
190221 / 3683933 2,293 unique: 2,284 Passed, 9 NotExecuted

Failure-run pages used skip/top 0/500, 500/500, 1000/1000, 2000/1000,
3000/1000 plus a NotExecuted page. Overlapping filtered/unfiltered pages
were deduplicated by build/run/result IDs; 23 additional NotExecuted IDs
complete the 3,807 total. Comparable-control pages used skips 0, 1000,
2000, 3000, 4000; supplemental-control pages used 0, 1000, 2000 with an
empty terminal page at 2293. All outcome counts reconcile; no duplicate
outcome statistic was overwritten. The three directly enriched case
details have no resultMetadata or grouped children. Existing missing or
skipped records are not passes. Counts describe parent records, not
independently enriched grouped-child coverage for unrelated tests.

Additional failure discovery used builds 190251, 190265, 190269, 190277,
190342, 190367, 192092, 194000, 194019, 194072 and 194158.
They do not have complete per-run/per-case enrichment and controls.
Other runs in 190220/190221 and all other discovered builds remain
unprocessed or only partially processed at the test-result level.

Unconfirmed/excluded follow-ups, not tagged:

  • Microsoft.Data.SqlClient.ManualTesting.Tests.DiagnosticTest.ConnectionOpenAsyncTest:
    missing WriteConnectionOpenAfter in 190265/3685731/102427; later similar
    discovery in 194019/3749204/102303. Exact detail/configuration/pass controls
    and distinction between product and listener weakness remain unfinished.
  • Microsoft.Data.SqlClient.ManualTesting.Tests.AlwaysEncrypted.ApiShould.TestEnclaveExecutionApis:
    grouped/truncated connection arguments across main builds, including
    194072/3749703/101443 reporting invalid XML-reader result. Pending Return retry task from async XML enclave execution #5117
    is relevant repair context. Parent outcomes and collapsed connection
    names are insufficient; no new category added.
  • Microsoft.Data.SqlClient.ManualTesting.Tests.AlwaysEncrypted.ApiShould.TestSqlCommandCancel:
    ExecuteNonQuery/ExecuteReader failures with truncated connection
    identities, including 190367/3688581/101648 and 101647. Child identities
    and product-versus-test eligibility unresolved; no quarantine claim.
  • Microsoft.Data.SqlClient.ManualTesting.Tests.SqlCommandCancelTest.TimeOutDuringRead_Tcp:
    194072/3749644/101938 failed in pre-login with a remote-host reset,
    before the intended read-timeout phase. General connectivity remains a
    plausible explanation. For the separate repairs automation, consider
    bounded retries only around transient setup/connectivity if exact detail
    and controls support them; never retry/hide the read-timeout assertion.
  • Release/6.1 XEvents setup/execution timeouts and release/7.0 assembly-loading
    failures were discovered, but not paired/enriched or declared intermittent
    defective tests. They do not qualify main or release tagging.
  • Schema/metrics/certificate failures already have merged quarantine
    proposals; current traits and prior histories prevent duplicate tagging.
    Split-packet proposals and backports were read only for deduplication.

Explicit errors/limitations: Azure DevOps MCP passing build-helper
requests for 190220 and 190251 both returned
MCP request failed: Transport closed. A bounded per-run retry succeeded;
the same-x86 control was recovered through mapped MCP publication logs,
not anonymous bulk REST. Large build-helper passing discovery is still
incomplete. The helper enriches only its first 1,000 results per run.
Initial local listing failed NETSDK1004 (missing assets); configured tool
and package restores succeeded, then all reported validation ran successfully.
An initial passing-run verification used an incorrectly flattened PowerShell
tuple and failed identity validation; explicit literal-ID verification
corrected it, and only the corrected responses are counted. An attempted
control phase lookup found no match; actual timeline identifiers were then
used. An initial Git comparison lacked the CI commit; fetching that exact
origin commit established the unchanged affected source. One summary
PowerShell query had an unquoted branch-pattern parse error and was corrected.
Absent optional Git signing configuration returned a nonzero probe, not
evidence of a signing requirement or an attempted bypass.

Checkpoint NOT ADVANCED. No continuously complete per-test interval is
claimed, even for main; all release branches have unfinished evidence.
The next tagging run must rescan its full 14-day window and deduplicate
against this PR/merged history unless a later reliable complete tagging
checkpoint is established. The confirmed category proposal is supported
independently of those discovery gaps.

Fixes, retries, probation changes/promotion, pipeline changes, queued
validation builds, merging and approval are 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

Missing target PR identification and a trusted immutable source for required supplemental review policies prevent verification of existing feedback and completion of the repository review protocol.

No open issues 🎉

What changed in this PR

This PR quarantines the intermittent pooled isolation-reset timeout-budget theory introduced in #4330, without changing driver behavior or test logic.

Changes:

  • Adds a method-level flaky trait to route all 12 theory cases to quarantine.
  • Adds a comment documenting the observed timeout assertion failure.
  • Leaves neighboring tests, other categories, and pipelines unchanged.
File Description
src/​Microsoft.Data.SqlClient/​tests/​UnitTests/​SimulatedServerTests/​IsolationLevelResetTests.cs Quarantines PooledReset_UsesRemainingOpenBudget and records the observed failure.

Review effort: Balanced

@codecov

codecov Bot commented Nov 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.51%. Comparing base (17bef7b) to head (15b1b94).
⚠️ Report is 27 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5127      +/-   ##
==========================================
+ Coverage   68.99%   70.51%   +1.52%     
==========================================
  Files         314      315       +1     
  Lines       45857    70150   +24293     
==========================================
+ Hits        31638    49467   +17829     
- Misses      14219    20683    +6464     
Flag Coverage Δ
CI-SqlClient ?
sqlclient-pr 70.51% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@paulmedynski
paulmedynski merged commit 8920e86 into main Nov 23, 2026
50 of 51 checks passed
@paulmedynski
paulmedynski deleted the dev/mdaigle/sqlclient-flaky-quarantine-18 branch November 23, 2026 14:20
@github-project-automation github-project-automation Bot moved this from To triage to Done in SqlClient Board Nov 23, 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