Skip to content

Commit 5ebe2b2

Browse files
committed
Merge branch 'main' into public
2 parents ee6c4cf + 58985ca commit 5ebe2b2

File tree

410 files changed

+44247
-47740
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

410 files changed

+44247
-47740
lines changed

.editorconfig

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ indent_size = 4
1414
[*.{json,jsonc}]
1515
indent_size = 2
1616

17+
[*.{yml,yaml}]
18+
indent_size = 2
19+
1720
# C# files
1821
[*.cs]
1922
# New line preferences
@@ -32,6 +35,9 @@ csharp_indent_case_contents = true
3235
csharp_indent_switch_labels = true
3336
csharp_indent_labels = one_less_than_current
3437

38+
# Require braces around if/for/while/etc
39+
csharp_prefer_braces = true:warning
40+
3541
# avoid this. unless absolutely necessary
3642
dotnet_style_qualification_for_field = false:suggestion
3743
dotnet_style_qualification_for_property = false:suggestion
@@ -43,6 +49,9 @@ csharp_style_var_for_built_in_types = false:none
4349
csharp_style_var_when_type_is_apparent = false:none
4450
csharp_style_var_elsewhere = false:suggestion
4551

52+
# don't prefer the range operator, netfx doesn't have these types
53+
csharp_style_prefer_range_operator = false
54+
4655
# use language keywords instead of BCL types
4756
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
4857
dotnet_style_predefined_type_for_member_access = true:suggestion
@@ -152,23 +161,13 @@ dotnet_code_quality.CA2100.excluded_type_names_with_derived_types = Microsoft.Da
152161
dotnet_diagnostic.xUnit1031.severity=none
153162
dotnet_diagnostic.xUnit1030.severity=none
154163

155-
[*.{csproj,vcxproj,vcxproj.filters,proj,nativeproj,locproj}]
156-
indent_size = 2
157-
158-
# Xml build files
159-
[*.builds]
160-
indent_size = 2
161-
162164
# Xml files
163-
[*.{xml,stylecop,resx,ruleset}]
164-
indent_size = 2
165-
166-
# Xml config files
167-
[*.{props,targets,config,nuspec}]
165+
[*.{xml,csproj,stylecop,resx,ruleset,props,targets,config,nuspec}]
168166
indent_size = 2
169167

170168
# Shell scripts
171169
[*.sh]
172170
end_of_line = lf
171+
173172
[*.{cmd, bat}]
174173
end_of_line = crlf

CHANGELOG.md

Lines changed: 167 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,176 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
66

7-
# Release Notes
7+
## [Stable Release 6.1.2] - 2025-10-07
8+
9+
This update brings the below changes over the previous stable release:
10+
11+
### Fixed
12+
13+
- Fixed an issue where initializing PerformanceCounters would throw `System.InvalidOperationException` [#3629](https://github.com/dotnet/sqlclient/pull/3629)
14+
- Fixed an issue where a Custom SqlClientAuthenticationProvider was being overwritten by default implementation. [#3651](https://github.com/dotnet/SqlClient/pull/3651)
15+
- Fixed a concurrency issue in connection pooling where the number of active connections could be lower than the configured maximum pool size. [#3653](https://github.com/dotnet/SqlClient/pull/3653)
16+
17+
## [Stable release 6.0.3] - 2025-10-07
18+
19+
This update brings the below changes over the previous stable release:
20+
21+
### Fixed
22+
23+
- Fixed an issue where a Custom SqlClientAuthenticationProvider was being overwritten by default implementation. [#3652](https://github.com/dotnet/SqlClient/pull/3652)
24+
- Fixed a concurrency issue in connection pooling where the number of active connections could be lower than the configured maximum pool size. [#3654](https://github.com/dotnet/SqlClient/pull/3654)
25+
26+
### Changed
27+
28+
- Updated MSAL usage as per code compliance requirements [#3360](https://github.com/dotnet/SqlClient/pull/3360)
29+
- Updated `SqlDecimal` implementation to improve code compliance [#3466](https://github.com/dotnet/SqlClient/pull/3466)
30+
- Updated Azure.Identity and related dependencies [#3553](https://github.com/dotnet/SqlClient/pull/3553)
31+
32+
## [Preview Release 7.0.0-preview1.25257.1] - 2025-09-12
33+
34+
This update brings the following changes since the [6.1.0](release-notes/6.1/6.1.0.md)
35+
release:
36+
37+
### Breaking Changes
38+
39+
- Removed `Constrained Execution Region` error handling blocks and associated
40+
`SqlConnection` cleanup which may affect how potentially-broken connections
41+
are expunged from the pool.
42+
([#3535](https://github.com/dotnet/SqlClient/pull/3535))
43+
44+
### Bug Fixes
45+
46+
- Packet multiplexing disabled by default, and several bug fixes.
47+
([#3534](https://github.com/dotnet/SqlClient/pull/3534),
48+
[#3537](https://github.com/dotnet/SqlClient/pull/3537))
49+
50+
### Added
51+
52+
- `SqlColumnEncryptionCertificateStoreProvider` now works on Windows, Linux,
53+
and macOS.
54+
([#3014](https://github.com/dotnet/SqlClient/pull/3014))
55+
56+
### Changed
57+
58+
- Updated `SqlVector.Null` to return a nullable `SqlVector` instance in the
59+
reference API to match the implementation.
60+
([#3521](https://github.com/dotnet/SqlClient/pull/3521))
61+
62+
- Performance improvements for all built-in
63+
`SqlColumnEncryptionKeyStoreProvider` implementations.
64+
([#3554](https://github.com/dotnet/SqlClient/pull/3554))
65+
66+
- Various test improvements.
67+
([#3456](https://github.com/dotnet/SqlClient/pull/3456),
68+
[#2968](https://github.com/dotnet/SqlClient/pull/2968),
69+
[#3458](https://github.com/dotnet/SqlClient/pull/3458),
70+
[#3494](https://github.com/dotnet/SqlClient/pull/3494),
71+
[#3559](https://github.com/dotnet/SqlClient/pull/3559),
72+
[#3575](https://github.com/dotnet/SqlClient/pull/3575))
73+
74+
- Codebase merge project and related cleanup.
75+
([#3436](https://github.com/dotnet/SqlClient/pull/3436),
76+
[#3434](https://github.com/dotnet/SqlClient/pull/3434),
77+
[#3448](https://github.com/dotnet/SqlClient/pull/3448),
78+
[#3454](https://github.com/dotnet/SqlClient/pull/3454),
79+
[#3462](https://github.com/dotnet/SqlClient/pull/3462),
80+
[#3435](https://github.com/dotnet/SqlClient/pull/3435),
81+
[#3492](https://github.com/dotnet/SqlClient/pull/3492),
82+
[#3473](https://github.com/dotnet/SqlClient/pull/3473),
83+
[#3469](https://github.com/dotnet/SqlClient/pull/3469),
84+
[#3394](https://github.com/dotnet/SqlClient/pull/3394),
85+
[#3493](https://github.com/dotnet/SqlClient/pull/3493),
86+
[#3593](https://github.com/dotnet/SqlClient/pull/3593))
87+
88+
- Documentation improvements.
89+
([#3490](https://github.com/dotnet/SqlClient/pull/3490))
90+
91+
- Updated `Azure.Identity` dependency to v1.14.2.
92+
([#3538](https://github.com/dotnet/SqlClient/pull/3538))
93+
94+
## [Stable Release 6.1.1] - 2025-08-14
95+
96+
This update includes the following changes since the [6.1.0](6.1.0.md) release:
97+
98+
### Fixed
99+
100+
- Reverted changes related to improving partial packet detection, fixup, and replay functionality. This revert addresses regressions introduced in 6.1.0. ([#3556](https://github.com/dotnet/SqlClient/pull/3556))
101+
- Applied reference assembly corrections supporting vector, fixed JSON tests, and ensured related tests are enabled. [#3562](https://github.com/dotnet/SqlClient/pull/3562)
102+
- Fixed `SqlVector<T>.Null` API signature in Reference assembly. [#3521](https://github.com/dotnet/SqlClient/pull/3521)
103+
104+
### Changed
105+
106+
- Upgraded `Azure.Identity` and other dependencies to newer versions. ([#3538](https://github.com/dotnet/SqlClient/pull/3538)) ([#3552](https://github.com/dotnet/SqlClient/pull/3552))
107+
108+
## [Stable Release 6.1.0] - 2025-07-25
109+
110+
This update brings the following changes since the
111+
[6.1.0-preview2](release-notes/6.1/6.1.0-preview2.md) release:
112+
113+
### Added
114+
115+
No new features were added.
116+
117+
### Fixed
118+
119+
- Fixed missing socket error codes on non-Windows platforms.
120+
([#3475](https://github.com/dotnet/SqlClient/pull/3475))
121+
- Fixed primary/secondary server SPN handling during SSPI negotiation.
122+
([#3478](https://github.com/dotnet/SqlClient/pull/3478))
123+
- Fixed AzureKeyVaultProvider package key caching to serialize Azure key fetch
124+
operations.
125+
([#3477](https://github.com/dotnet/SqlClient/pull/3477))
126+
- Fixed a rare error related to multi-packet async text reads.
127+
([#3474](https://github.com/dotnet/SqlClient/pull/3474))
128+
- Fixed some spelling errors in the API docs.
129+
([#3500](https://github.com/dotnet/SqlClient/pull/3500))
130+
- Fixed a rare multi-packet string corruption bug.
131+
([#3513](https://github.com/dotnet/SqlClient/pull/3513))
132+
133+
### Changed
134+
135+
#### SqlDecimal type workarounds conversions
136+
137+
*What Changed:*
138+
139+
- Changed how SqlDecimal type workarounds perform conversions to meet
140+
compliance policies.
141+
([#3467](https://github.com/dotnet/SqlClient/pull/3467))
142+
143+
*Who Benefits:*
144+
145+
- Microsoft products must not use undocumented APIs on other Microsoft products.
146+
This change removes calls to undocumented APIs and replaces them with
147+
compliant API use.
148+
149+
*Impact:*
150+
151+
- These changes impose an observed 5% decrease in performance on .NET Framework.
152+
153+
#### SqlVector API improvements
154+
155+
*What Changed:*
156+
157+
- Several changes were made to the SqlVector API published in the
158+
[6.1.0-preview2](release-notes/6.1/6.1.0-preview2.md) release
159+
([#3472](https://github.com/dotnet/SqlClient/pull/3472)):
160+
- The SqlVector class was changed to a readonly struct.
161+
- The null value constructor was changed to a static `CreateNull()` method.
162+
- The `Size` property was removed.
163+
164+
*Who Benefits:*
165+
166+
- SqlVector instances gain the efficiencies of struct handling.
167+
168+
*Impact:*
169+
170+
- Early-adopter applications may require updates if they rely on the old APIs
171+
and any class-specific behaviour.
8172

9173
## [Preview Release 6.1.0-preview2.25178.5] - 2025-06-27
10174

11-
This update brings the following changes since the [6.1.0-preview1](release-notes/6.1/6.1.0-preview1.md) release:
175+
This update brings the following changes since the
176+
[6.1.0-preview1](release-notes/6.1/6.1.0-preview1.md) release:
12177

13178
### Added
14179

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
General contribution guidance is included in this document. Additional guidance is defined in the documents linked below.
44

5-
- [Copyright](copyright.md) describes the licensing practices for the project.
5+
- [Copyright](COPYRIGHT.md) describes the licensing practices for the project.
66
- [Contribution Workflow](contributing-workflow.md) describes the workflow that the team uses for considering and accepting changes.
77

88
## Up for Grabs

build.proj

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,14 @@
5858
<NetStandardDriver Include="**/netcore/ref/Microsoft.Data.SqlClient*.csproj" />
5959
<AKVProvider Include="**/add-ons/**/AzureKeyVaultProvider/*.csproj" />
6060

61+
<UnitTests Include="**/Common/Common.csproj" />
62+
<UnitTests Include="**/tools/TDS/TDS/TDS.csproj" />
63+
<UnitTests Include="**/tools/TDS/TDS.EndPoint/TDS.EndPoint.csproj" />
64+
<UnitTests Include="**/tools/TDS/TDS.Servers/TDS.Servers.csproj" />
6165
<UnitTests Include="**/UnitTests/Microsoft.Data.SqlClient.UnitTests.csproj" />
6266
<UnitTestsProj Include="**/UnitTests/Microsoft.Data.SqlClient.UnitTests.csproj" />
63-
67+
68+
6469
<FunctionalTests Include="**/Common/Common.csproj" />
6570
<FunctionalTests Include="**/tools/TDS/TDS/TDS.csproj" />
6671
<FunctionalTests Include="**/tools/TDS/TDS.EndPoint/TDS.EndPoint.csproj" />
@@ -220,6 +225,7 @@
220225
-p:TestTargetOS=Windows$(TargetGroup)
221226
--collect "Code coverage"
222227
--results-directory $(ResultsDirectory)
228+
--filter "category!=failing%26category!=flaky"
223229
--logger:"trx;LogFilePrefix=Unit-Windows$(TargetGroup)-$(TestSet)"
224230
</TestCommand>
225231
<TestCommand>$(TestCommand.Replace($([System.Environment]::NewLine), " "))</TestCommand>
@@ -240,8 +246,9 @@
240246
-p:TestTargetOS=Unixnetcoreapp
241247
--collect "Code coverage"
242248
--results-directory $(ResultsDirectory)
249+
--filter "category!=failing%26category!=flaky"
243250
--logger:"trx;LogFilePrefix=Unit-Unixnetcoreapp-$(TestSet)"
244-
</TestCommand>
251+
</TestCommand>
245252
<TestCommand>$(TestCommand.Replace($([System.Environment]::NewLine), " "))</TestCommand>
246253
</PropertyGroup>
247254
<Message Text=">>> Running unit tests for Unix via command: $(TestCommand)"/>

eng/pipelines/common/templates/jobs/ci-run-tests-job.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,18 @@ parameters:
7373
- Project
7474
- Package
7575

76+
# The timeout, in minutes, for this job.
77+
- name: timeout
78+
type: string
79+
default: 90
80+
7681
jobs:
7782
- job: ${{ format('{0}', coalesce(parameters.jobDisplayName, parameters.image, 'unknown_image')) }}
7883

84+
# Some of our tests take longer than the default 60 minutes to run on some
85+
# OSes and configurations.
86+
timeoutInMinutes: ${{ parameters.timeout }}
87+
7988
pool:
8089
name: '${{ parameters.poolName }}'
8190
${{ if eq(parameters.hostedPool, true) }}:

eng/pipelines/common/templates/jobs/run-tests-package-reference-job.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,21 @@ parameters:
2020
- name: isPreview
2121
type: boolean
2222

23+
# The timeout, in minutes, for this job.
24+
- name: timeout
25+
type: string
26+
default: 90
27+
2328
jobs:
2429
- job: run_tests_package_reference
2530
displayName: 'Run tests with package reference'
2631
${{ if ne(parameters.dependsOn, 'empty')}}:
2732
dependsOn: '${{parameters.dependsOn }}'
33+
34+
# Some of our tests take longer than the default 60 minutes to run on some
35+
# OSes and configurations.
36+
timeoutInMinutes: ${{ parameters.timeout }}
37+
2838
pool:
2939
type: windows # read more about custom job pool types at https://aka.ms/obpipelines/yaml/jobs
3040
isCustom: true

eng/pipelines/common/templates/stages/ci-run-tests-stage.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ parameters:
3030
type: jobList
3131
default: []
3232

33+
# The timeout, in minutes, for each test job.
34+
- name: testsTimeout
35+
type: string
36+
default: 90
37+
3338
stages:
3439
- ${{ each config in parameters.testConfigurations }}:
3540
- ${{ each image in config.value.images }}:
@@ -47,6 +52,7 @@ stages:
4752
parameters:
4853
debug: ${{ parameters.debug }}
4954
buildType: ${{ parameters.buildType }}
55+
timeout: ${{ parameters.testsTimeout }}
5056
poolName: ${{ config.value.pool }}
5157
hostedPool: ${{ eq(config.value.hostedPool, true) }}
5258
image: ${{ image.value }}
@@ -72,6 +78,7 @@ stages:
7278
parameters:
7379
debug: ${{ parameters.debug }}
7480
buildType: ${{ parameters.buildType }}
81+
timeout: ${{ parameters.testsTimeout }}
7582
poolName: ${{ config.value.pool }}
7683
hostedPool: ${{ eq(config.value.hostedPool, true) }}
7784
image: ${{ image.value }}

eng/pipelines/common/templates/steps/configure-sql-server-linux-step.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
# The .NET Foundation licenses this file to you under the MIT license. #
44
# See the LICENSE file in the project root for more information. #
55
#################################################################################
6+
7+
# This step configures an existing SQL Server running on the local Linux host.
8+
# For example, our 1ES Hosted Pool has images like ADO-UB20-SQL22 that come with
9+
# SQL Server 2022 pre-installed and running.
10+
611
parameters:
712
- name: password
813
type: string

0 commit comments

Comments
 (0)