Skip to content

Conversation

@priyankatiwari08
Copy link
Contributor

Ports #3749 to release/6.1 branch

Closes #3716

benrr101 and others added 30 commits July 10, 2025 12:12
* Replace non-compliant code with compliant code

* Add unit tests for netfx SqlTypeWorkarounds
This commit ports #3468 from main to release/6.1
* add clearing of data sizes when a multi-part result is returned

* remove asserts detecting overwrite of snapshot storage which are now no longer accurate

* remove empty statement block

---------

Co-authored-by: Wraith <wraith2@gmail.com>
Co-authored-by: Wraith2 <Wraith2@gmaill.com>
* Fix AzureSqlKeyCryptographer to be pure sync

* Fix Symmetric key cache design + Key vault cache

* Fix tests

* Add back multi-user cache scenario

* Add cache lock in global CEK cache to prevent concurrency issues.

* Touch-ups

* More changes to streamline getKey calls

* More updates

* - Addressed review comments.

* - Fixing tests that expect certain localized strings that have changed.

---------

Co-authored-by: Cheena Malhotra <13396919+cheenamalhotra@users.noreply.github.com>
Co-authored-by: Paul Medynski <31868385+paulmedynski@users.noreply.github.com>
* Reset negotiateAuth if SNI doesn't work

This change also adds some book keeping to ensure we're only using the spn that has previously generated a context once one has been created.

* initialization only after success

* move serverSpn to be local

Co-authored-by: Taylor Southwick <tasou@microsoft.com>
* Reduce automated test crashes (#2968)

* Converted Threads to long-running Tasks

The key advantage is that exceptions propagate properly.
If a thread throws an exception (as a result of a failed test assertion, or otherwise) then the test host crashes and must be restarted.

* Corrected the instantiation of the cancellation task - missing state parameter.

* Changes to TestSqlCommandCancel, eliminating timing-specific cancellation behaviour testing.
This should also allow the test to run on both netcore and netfx.

* Responding to code review.
* Removed two unnecessary iterations from DatabaseHelper.
* Added explanatory comments to ApiShould.
* Switched to using Task.WaitAll rather than waiting for each Task in sequence.

* Improve cancellation detection

Cancellation can trigger one of several different errors, resulting in a flakier test.
Also ensure that the query always takes more than 150ms, ensuring that a quick query execution doesn't cause the test to fail.
Finally, make sure that we try to read everything from the SqlDataReader.

* Correcting previous merge

* Align SqlException Numbers across platforms (#3461)

* - Align SqlException Numbers across platforms
- Better capture error scenarios in TCP managed SNI.
- Fix logging bug in SqlClientEventSource.
- Change nativeError from uint to int

* - Removed duplicate SniErrorDetails object and aligned field names.

* - Added localized string for the new connection timed out exception.

* - Fixed tests sensitive to OS newlines.

---------

Co-authored-by: Paul Medynski <31868385+paulmedynski@users.noreply.github.com>

* Align SqlException Numbers across platforms

- Manually fixing some error reporting that wasn't cherr-picked because it was part of larger changes.

* Updated TdsParser.Windows.cs to use the SniErrorDetails struct from TdsParserStateObject.

---------

Co-authored-by: Edward Neal <55035479+edwardneal@users.noreply.github.com>
Co-authored-by: David Engel <davidengel@microsoft.com>
- Preparing 6.1 branch with appropriate version numbers.
* Add new trusted AKV URLs for FR and DE (#3482)

- Added 4 new trusted AKV URLs.
- Fixed existing manual tests and added unit tests.

* - Removed unnecessary strings and console output from TrustedUrlsTest.

* - Removed sensitive vault domains.
* [Scheduled Run] Localized resource files from OneLocBuild

* [Scheduled Run] Localized resource files from OneLocBuild

* [Scheduled Run] Localized resource files from OneLocBuild

---------

Co-authored-by: SqlClient DevOps <sqlclient@microsoft.com>
* add test and simplify code to fix problems

* review feedback

* review feedback

* review feedback

Co-authored-by: Wraith <wraith2@gmail.com>
- Changed AKV to depend on at least MDS 6.1.0.
…3542) (#3550)

* Task 37261: [S360] [SM05137] DefaultAzureCredential use in Production

- Adjusted CodeQL suppression to meet the strict requirements of where it may appear relative to the flagged code.

* Task 37261: [S360] [SM05137] DefaultAzureCredential use in Production

- Adding catch for macOS socket error to log and ignore.
* Revert 1af7327

* Revert "Fix TryReadPlpBytes throws ArgumentException (#3470) (#3474)"

This reverts commit 0a55896.

* Revert 44762d9

* Revert "Improve async string perf and fix reading chars with initial offset. (#3377)"

This reverts commit 05df554.

* Revert "Refine handling of moving between replay and continue states (#3337)"

This reverts commit 265f522.

* Revert "Fix SqlCached buffer async read with continue edge case. (#3329)"

This reverts commit c3857b1.

* Revert "Add `async` snapshot continue capability for multipacket fields (#3161)"

This reverts commit 33364e7.

* Revert "Add partial packet detection and fixup (#2714)"

This reverts commit 8d5e4f2.

* Remove methods previously moved to common file.

* Supply byte buffer to vector read.

* Minor compilation fixes that were missed in the reverts.

* Remove partial packet context switch helpers.

* Remove accidental duplication of SqlDataReader

* Revert len change

* Undo buff rental in netfx to simplify 6.0 diff.

* Fix missed rented buff code.

---------

Co-authored-by: Cheena Malhotra <cmalhotra@microsoft.com>
Updated AKV nuspec to note compatibility with MDS 6.1.1.
* * Add signing key path to roslyn analyzers
* Make signing key path an argument to build and roslyn analyzers steps
* Enable strong name signing on buddy (unofficial) builds
* Add akv official job to solution file

* Remove diagnostic step
... thought I removed that already 🤦‍♂️

* Add string type to roslyn analyzer step argument

* vbump

(bypassing rules because AKV build isn't tested via CI)
* Moved existing stress test projects from ADO into GitHub. (#3546)

(This code is effectively dead since it is not being referenced anywhere, and there are no other changes to the code. As such, we can bypass the one flaky test failure.)

* Minimal modifications to stress tests for Linux (#3548)

* Minimal modifications to get the stress tests building and running on Linux.

* Updated sample config to avoid a dummy password.

* User Story 38131: Stress Tests CI

- Added config file path configuration via STRESS_CONFIG_FILE environment variable.
- Added support for JSON config file.
- Fixed process exit code to reflect success vs failure.
- Added emission to console.
- Added emission of data source.
- Added EntraId password-based auth.
- Added CI stage.
- Added NuGet package version to MDS assembly.
- Added dotnet build configuration pararmeter to CI entry points.
- Added MDS package version configurability to stress tests.
- Added all target frameworks that MDS supports.
- Each test run now creates and drops its own database to avoid collisions.
- Moved to 1ES images where possible.
- Using a local SQL Server that we setup as part of CI.

* User Story 38131: Stress Tests CI

- Added top-level pipeline flag to enable stress tests, deafult is false until tests are reliably passing.
- Backported part of #3494 and all of #3591:
  - Added configurable test jobs timeout, defaulting to 90 minutes.
  - Reduced generated database names to 96 chars to try to fix macOS test failures.
Co-authored-by: Edward Neal <55035479+edwardneal@users.noreply.github.com>
cheenamalhotra and others added 13 commits October 6, 2025 09:22
* Enable scheduled builds for release/6.1

* Fix comment

* Clean up schedules
* Refactor Test TDS Servers. Expand functional testing of connection pooling and transient failures. (#3488)

* Fix capitalization.

* Fix nullable.

* Reduce layered static readonly fields. Fixes test using app context switch helper.
…ner. (#3702)

* Fix #3400, ignore server-provided failover partner (#3625)

* Add IgnoreServerProvidedFailoverPartner app context switch.

* Add behavior skip to netfx.

* Consolidate to single property for failover partner value.

* Rework checks to preserve server provided value, but ignore it.

* Fix import.

* Skip server failover partner override in �LoginNoFailover method. Add simulated server test coverage.

* Adjust category level so test runs in ci.

* Review changes.

* Clear pool to make test more reliable.

* Serialize unit tests that touch app context switches

* Are connections getting carried over in the pool somehow?

* Skip test in pipeline.
* Fix xevent test failures, avoid orphaned sessions (#3775)

* Fix xevent test failures, avoid orphaned sessions (#3775)

- Added IsNotManagedInstance() for XEvents tests.

* Disable scanning of Actions in CodeQL workflow (#3819)

* - Updated CodeQL workflow config to be specific to the release/6.1 branch.
…iming (#3609) (#3830)

Co-authored-by: Yusuf Mohammed <67040622+SAY14489@users.noreply.github.com>
Co-authored-by: Malcolm Daigle <mdaigle@microsoft.com>
Copilot AI review requested due to automatic review settings December 15, 2025 14:20
@priyankatiwari08 priyankatiwari08 requested a review from a team as a code owner December 15, 2025 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NullReferenceException when using SqlDataAdapter with Always Encrypted and UpdateBatchSize > 1

8 participants