Skip to content

Commit cb03625

Browse files
committed
Merge branch 'main' of github.com:dotnet/SqlClient into dev/mdaigle/active-connection-count
2 parents 8bf5ed8 + 7be3371 commit cb03625

File tree

44 files changed

+853
-466
lines changed

Some content is hidden

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

44 files changed

+853
-466
lines changed

CHANGELOG.md

Lines changed: 60 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -88,31 +88,6 @@ This update brings the following changes since [7.0.0-preview1.25257.1]
8888
- Updated `System.Security.Cryptography.Pkcs` to v9.0.9 (net9)
8989
- Updated `System.Text.Json` to v8.0.6 (net8), v9.0.9 (net9)
9090

91-
## [Stable Release 6.1.2] - 2025-10-07
92-
93-
This update brings the below changes over the previous stable release:
94-
95-
### Fixed
96-
97-
- Fixed an issue where initializing PerformanceCounters would throw `System.InvalidOperationException` [#3629](https://github.com/dotnet/sqlclient/pull/3629)
98-
- Fixed an issue where a Custom SqlClientAuthenticationProvider was being overwritten by default implementation. [#3651](https://github.com/dotnet/SqlClient/pull/3651)
99-
- 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)
100-
101-
## [Stable release 6.0.3] - 2025-10-07
102-
103-
This update brings the below changes over the previous stable release:
104-
105-
### Fixed
106-
107-
- Fixed an issue where a Custom SqlClientAuthenticationProvider was being overwritten by default implementation. [#3652](https://github.com/dotnet/SqlClient/pull/3652)
108-
- 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)
109-
110-
### Changed
111-
112-
- Updated MSAL usage as per code compliance requirements [#3360](https://github.com/dotnet/SqlClient/pull/3360)
113-
- Updated `SqlDecimal` implementation to improve code compliance [#3466](https://github.com/dotnet/SqlClient/pull/3466)
114-
- Updated Azure.Identity and related dependencies [#3553](https://github.com/dotnet/SqlClient/pull/3553)
115-
11691
## [Preview Release 7.0.0-preview1.25257.1] - 2025-09-12
11792

11893
This update brings the following changes since the [6.1.0](release-notes/6.1/6.1.0.md)
@@ -175,9 +150,53 @@ release:
175150
- Updated `Azure.Identity` dependency to v1.14.2.
176151
([#3538](https://github.com/dotnet/SqlClient/pull/3538))
177152

153+
## [Stable Release 6.1.3] - 2025-11-12
154+
155+
This update includes the following changes since the [6.1.2](release-notes/6.1/6.1.2.md) release:
156+
157+
### Added
158+
159+
#### App Context Switch for Ignoring Server-Provided Failover Partner
160+
161+
*What Changed:*
162+
163+
- A new app context switch `Switch.Microsoft.Data.SqlClient.IgnoreServerProvidedFailoverPartner` was introduced to let the client ignore server-provided failover partner info in Basic Availability Groups (BAGs). When the switch is enabled, only the failover partner specified in the connection string is used; server-supplied partner values are skipped. This context switch was introduced in PR [#3702](https://github.com/dotnet/SqlClient/pull/3702).
164+
165+
*Who Benefits:*
166+
167+
- Applications connecting to SQL Server BAGs using TCP and custom ports, especially where the server's provided partner name lacks the protocol, host, or port. This avoids connection failures when the server-provided partner is incompatible or incomplete.
168+
- Teams who manage availability groups and rely on client-side control of failover behavior in heterogeneous networking environments.
169+
170+
*Impact:*
171+
172+
- If your environment might be affected (i.e., you operate a BAG with custom ports, or have experienced failures after failover), you can enable the new switch in your application:
173+
174+
```c#
175+
AppContext.SetSwitch("Switch.Microsoft.Data.SqlClient.IgnoreServerProvidedFailoverPartner", true);
176+
```
177+
178+
- Then, ensure your connection string includes your preferred failover partner (with correct `tcp:host,port`) so that the client uses that instead of the server's suggestion.
179+
- Without enabling this, by default, the client continues to prefer the server-provided partner, maintaining backwards compatibility.
180+
181+
### Fixed
182+
183+
- Fixed an issue to ensure reliable metrics initialization during startup,
184+
preventing missed telemetry when EventSource is enabled early.
185+
([#3718](https://github.com/dotnet/SqlClient/pull/3718))
186+
187+
## [Stable Release 6.1.2] - 2025-10-07
188+
189+
This update includes the following changes since the [6.1.1](release-notes/6.1/6.1.1.md) release:
190+
191+
### Fixed
192+
193+
- Fixed an issue where initializing PerformanceCounters would throw `System.InvalidOperationException` [#3629](https://github.com/dotnet/sqlclient/pull/3629)
194+
- Fixed an issue where a Custom SqlClientAuthenticationProvider was being overwritten by default implementation. [#3651](https://github.com/dotnet/SqlClient/pull/3651)
195+
- 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)
196+
178197
## [Stable Release 6.1.1] - 2025-08-14
179198

180-
This update includes the following changes since the [6.1.0](6.1.0.md) release:
199+
This update includes the following changes since the [6.1.0](release-notes/6.1/6.1.0.md) release:
181200

182201
### Fixed
183202

@@ -440,6 +459,21 @@ This update brings the following changes over the previous release:
440459
- Code merge towards a unified SqlClient project, aligning .NET Framework and .NET Core implementations. ([#2957](https://github.com/dotnet/sqlclient/pull/2957), [#2963](https://github.com/dotnet/sqlclient/pull/2963), [#2984](https://github.com/dotnet/sqlclient/pull/2984), [#2982](https://github.com/dotnet/sqlclient/pull/2982), [#3023](https://github.com/dotnet/sqlclient/pull/3023), [#3015](https://github.com/dotnet/sqlclient/pull/3015), [#2967](https://github.com/dotnet/sqlclient/pull/2967), [#3164](https://github.com/dotnet/sqlclient/pull/3164), [#3163](https://github.com/dotnet/sqlclient/pull/3163), [#3171](https://github.com/dotnet/sqlclient/pull/3171), [#3182](https://github.com/dotnet/sqlclient/pull/3182), [#3179](https://github.com/dotnet/sqlclient/pull/3179), [#3156](https://github.com/dotnet/sqlclient/pull/3156), [#3213](https://github.com/dotnet/sqlclient/pull/3213), [#3232](https://github.com/dotnet/sqlclient/pull/3232), [#3236](https://github.com/dotnet/sqlclient/pull/3236), [#3231](https://github.com/dotnet/sqlclient/pull/3231), [#3241](https://github.com/dotnet/sqlclient/pull/3241), [#3246](https://github.com/dotnet/sqlclient/pull/3246), [#3247](https://github.com/dotnet/sqlclient/pull/3247), [#3222](https://github.com/dotnet/sqlclient/pull/3222), [#3255](https://github.com/dotnet/sqlclient/pull/3255), [#3254](https://github.com/dotnet/sqlclient/pull/3254), [#3259](https://github.com/dotnet/sqlclient/pull/3259), [#3264](https://github.com/dotnet/sqlclient/pull/3264), [#3256](https://github.com/dotnet/sqlclient/pull/3256), [#3251](https://github.com/dotnet/sqlclient/pull/3251), [#3275](https://github.com/dotnet/sqlclient/pull/3275), [#3277](https://github.com/dotnet/sqlclient/pull/3277), [#3263](https://github.com/dotnet/sqlclient/pull/3263), [#3292](https://github.com/dotnet/sqlclient/pull/3292), [#3208](https://github.com/dotnet/sqlclient/pull/3208)).
441460
- Test improvements include updates to test references, removal of hardcoded certificates, improved stability, and better coverage ([#3041](https://github.com/dotnet/sqlclient/pull/3041), [#3034](https://github.com/dotnet/sqlclient/pull/3034), [#3130](https://github.com/dotnet/sqlclient/pull/3130), [#3128](https://github.com/dotnet/sqlclient/pull/3128), [#3181](https://github.com/dotnet/sqlclient/pull/3181), [#3060](https://github.com/dotnet/sqlclient/pull/3060), [#3184](https://github.com/dotnet/sqlclient/pull/3184), [#3033](https://github.com/dotnet/sqlclient/pull/3033), [#3186](https://github.com/dotnet/sqlclient/pull/3186), [#3025](https://github.com/dotnet/sqlclient/pull/3025), [#3230](https://github.com/dotnet/sqlclient/pull/3230), [#3237](https://github.com/dotnet/sqlclient/pull/3237), [#3059](https://github.com/dotnet/sqlclient/pull/3059), [#3061](https://github.com/dotnet/sqlclient/pull/3061)).
442461

462+
## [Stable release 6.0.3] - 2025-10-07
463+
464+
This update brings the below changes over the previous stable release:
465+
466+
### Fixed
467+
468+
- Fixed an issue where a Custom SqlClientAuthenticationProvider was being overwritten by default implementation. [#3652](https://github.com/dotnet/SqlClient/pull/3652)
469+
- 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)
470+
471+
### Changed
472+
473+
- Updated MSAL usage as per code compliance requirements [#3360](https://github.com/dotnet/SqlClient/pull/3360)
474+
- Updated `SqlDecimal` implementation to improve code compliance [#3466](https://github.com/dotnet/SqlClient/pull/3466)
475+
- Updated Azure.Identity and related dependencies [#3553](https://github.com/dotnet/SqlClient/pull/3553)
476+
443477
## [Stable release 6.0.2] - 2025-04-25
444478

445479
This update brings the below changes over the previous release:

eng/pipelines/common/templates/jobs/build-signed-package-job.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ jobs:
3939
name: GetBuildType
4040
4141
- template: ../steps/build-all-configurations-signed-dlls-step.yml@self
42+
parameters:
43+
buildConfiguration: Release
4244

4345
- template: ../steps/code-analyze-step.yml@self
4446
parameters:
@@ -50,6 +52,7 @@ jobs:
5052

5153
- template: ../steps/generate-nuget-package-step.yml@self
5254
parameters:
55+
buildConfiguration: Release
5356
OutputDirectory: $(artifactDirectory)
5457
installNuget: false
5558

@@ -59,10 +62,12 @@ jobs:
5962

6063
- template: ../steps/copy-dlls-for-test-step.yml@self
6164
parameters:
65+
buildConfiguration: Release
6266
product: MDS
6367

6468
# Publish symbols to servers
6569
- template: ../steps/publish-symbols-step.yml@self
6670
parameters:
71+
buildConfiguration: Release
6772
publishSymbols: ${{ parameters['PublishSymbols'] }}
6873
symbolsArtifactName: mds_symbols_$(System.TeamProject)_$(Build.Repository.Name)_$(Build.SourceBranchName)_$(NuGetPackageVersion)_$(System.TimelineId)

eng/pipelines/common/templates/jobs/ci-build-nugets-job.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ parameters:
2020
type: string
2121
default: $(Platform)
2222

23-
- name: configuration
23+
- name: buildConfiguration
2424
type: string
25-
default: $(Configuration)
25+
values:
26+
- Debug
27+
- Release
2628

2729
- name: prebuildSteps
2830
type: stepList
@@ -47,14 +49,14 @@ jobs:
4749
- template: ../steps/ci-project-build-step.yml@self
4850
parameters:
4951
platform: ${{ parameters.platform }}
50-
configuration: ${{ parameters.configuration }}
52+
buildConfiguration: ${{ parameters.buildConfiguration }}
5153
operatingSystem: Windows
5254
build: all
5355

5456
- template: ../steps/generate-nuget-package-step.yml@self
5557
parameters:
5658
NugetPackageVersion: $(NugetPackageVersion)
57-
configuration: $(Configuration)
59+
buildConfiguration: ${{ parameters.buildConfiguration }}
5860
nuspecPath: 'tools/specs/Microsoft.Data.SqlClient.nuspec'
5961
OutputDirectory: $(packagePath)
6062
generateSymbolsPackage: false
@@ -63,7 +65,7 @@ jobs:
6365
- template: ../steps/generate-nuget-package-step.yml@self
6466
parameters:
6567
NugetPackageVersion: $(NugetPackageVersion)
66-
configuration: $(Configuration)
68+
buildConfiguration: ${{ parameters.buildConfiguration }}
6769
nuspecPath: 'tools/specs/add-ons/Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.nuspec'
6870
OutputDirectory: $(packagePath)
6971
generateSymbolsPackage: false

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

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,18 +65,22 @@ parameters:
6565
- name: operatingSystem
6666
type: string
6767
default: ''
68+
69+
- name: buildConfiguration
70+
type: string
71+
values:
72+
- Debug
73+
- Release
6874

6975
- name: buildType
70-
displayName: 'Build Type'
7176
default: Project
7277
values:
7378
- Project
7479
- Package
7580

7681
# The timeout, in minutes, for this job.
7782
- name: timeout
78-
type: string
79-
default: 90
83+
type: number
8084

8185
jobs:
8286
- job: ${{ format('{0}', coalesce(parameters.jobDisplayName, parameters.image, 'unknown_image')) }}
@@ -227,6 +231,7 @@ jobs:
227231
- template: ../steps/build-all-tests-step.yml@self # build tests
228232
parameters:
229233
targetFramework: ${{ parameters.targetFramework }}
234+
buildConfiguration: ${{ parameters.buildConfiguration }}
230235
referenceType: ${{ parameters.buildType }}
231236
testSet: ${{ parameters.testSet }}
232237
${{ if ne(parameters.operatingSystem, 'Windows') }}:
@@ -237,6 +242,7 @@ jobs:
237242
parameters:
238243
debug: ${{ parameters.debug }}
239244
targetFramework: ${{ parameters.targetFramework }}
245+
buildConfiguration: ${{ parameters.buildConfiguration }}
240246
referenceType: ${{ parameters.buildType }}
241247
testSet: ${{ parameters.testSet }}
242248
operatingSystem: ${{ parameters.operatingSystem }}
@@ -279,6 +285,7 @@ jobs:
279285
parameters:
280286
debug: ${{ parameters.debug }}
281287
targetFramework: ${{ parameters.targetFramework }}
288+
buildConfiguration: ${{ parameters.buildConfiguration }}
282289
referenceType: ${{ parameters.buildType }}
283290
testSet: ${{ parameters.testSet }}
284291
msbuildArchitecture: x86
@@ -291,3 +298,4 @@ jobs:
291298
debug: ${{ parameters.debug }}
292299
targetFramework: ${{ parameters.targetFramework }}
293300
operatingSystem: ${{ parameters.operatingSystem }}
301+
buildConfiguration: ${{ parameters.buildConfiguration }}

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ parameters:
2222

2323
# The timeout, in minutes, for this job.
2424
- name: timeout
25-
type: string
26-
default: 90
25+
type: number
2726

2827
jobs:
2928
- job: run_tests_package_reference
@@ -67,12 +66,14 @@ jobs:
6766
- template: ../steps/build-and-run-tests-netfx-step.yml
6867
parameters:
6968
referenceType: Package
69+
buildConfiguration: Release
7070
${{ if parameters.isPreview }}:
7171
nugetPackageVersion: $(PreviewNugetPackageVersion)
7272

7373
- template: ../steps/build-and-run-tests-netcore-step.yml
7474
parameters:
7575
referenceType: Package
76+
buildConfiguration: Release
7677
cleanFirst: true
7778
${{ if parameters.isPreview }}:
7879
nugetPackageVersion: $(PreviewNugetPackageVersion)

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

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,17 @@ parameters:
1616
default: ''
1717

1818
- name: buildType
19-
displayName: 'Build Type'
2019
default: Project
2120
values:
2221
- Project
2322
- Package
2423

24+
- name: buildConfiguration
25+
type: string
26+
values:
27+
- Debug
28+
- Release
29+
2530
- name: prebuildSteps
2631
type: stepList
2732
default: []
@@ -31,9 +36,8 @@ parameters:
3136
default: []
3237

3338
# The timeout, in minutes, for each test job.
34-
- name: testsTimeout
35-
type: string
36-
default: 90
39+
- name: testJobTimeout
40+
type: number
3741

3842
stages:
3943
- ${{ each config in parameters.testConfigurations }}:
@@ -51,8 +55,9 @@ stages:
5155
- template: ../jobs/ci-run-tests-job.yml@self
5256
parameters:
5357
debug: ${{ parameters.debug }}
58+
buildConfiguration: ${{ parameters.buildConfiguration }}
5459
buildType: ${{ parameters.buildType }}
55-
timeout: ${{ parameters.testsTimeout }}
60+
timeout: ${{ parameters.testJobTimeout }}
5661
poolName: ${{ config.value.pool }}
5762
hostedPool: ${{ eq(config.value.hostedPool, true) }}
5863
image: ${{ image.value }}
@@ -77,8 +82,9 @@ stages:
7782
- template: ../jobs/ci-run-tests-job.yml@self
7883
parameters:
7984
debug: ${{ parameters.debug }}
85+
buildConfiguration: ${{ parameters.buildConfiguration }}
8086
buildType: ${{ parameters.buildType }}
81-
timeout: ${{ parameters.testsTimeout }}
87+
timeout: ${{ parameters.testJobTimeout }}
8288
poolName: ${{ config.value.pool }}
8389
hostedPool: ${{ eq(config.value.hostedPool, true) }}
8490
image: ${{ image.value }}

eng/pipelines/common/templates/steps/build-all-configurations-signed-dlls-step.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ parameters:
88
type: string
99
default: $(AssemblyFileVersion)
1010

11-
- name: Configuration
11+
- name: buildConfiguration
1212
type: string
13-
default: '$(Configuration)'
13+
values:
14+
- Debug
15+
- Release
1416

1517
- name: packageRefMdsVersion
1618
type: string
@@ -46,5 +48,5 @@ steps:
4648
displayName: 'BuildAllConfigurations using build.proj'
4749
inputs:
4850
solution: '**/build.proj'
49-
configuration: '${{parameters.Configuration }}'
51+
configuration: '${{parameters.buildConfiguration }}'
5052
msbuildArguments: '-p:AssemblyFileVersion=${{parameters.AssemblyFileVersion }} -t:BuildAllConfigurations -p:GenerateNuget=false -p:SigningKeyPath=$(Agent.TempDirectory)\netfxKeypair.snk'

eng/pipelines/common/templates/steps/build-all-tests-step.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@ parameters:
1515
type: string
1616
default: $(Platform)
1717

18-
- name: configuration
18+
- name: buildConfiguration
1919
type: string
20-
default: '$(Configuration)'
20+
values:
21+
- Debug
22+
- Release
2123

2224
- name: referenceType
2325
default: Package
@@ -39,7 +41,7 @@ steps:
3941
inputs:
4042
solution: build.proj
4143
platform: '${{parameters.platform }}'
42-
configuration: '${{parameters.configuration }}'
44+
configuration: '${{parameters.buildConfiguration }}'
4345
msbuildArguments: '-t:BuildTestsNetFx -p:TF=${{parameters.targetFramework }} -p:TestSet=${{parameters.testSet }} -p:ReferenceType=${{parameters.referenceType }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.nugetPackageVersion }}'
4446

4547
# - ${{else if contains(parameters.targetFramework, 'netstandard')}}: # .NET Standard
@@ -48,7 +50,7 @@ steps:
4850
# inputs:
4951
# solution: build.proj
5052
# platform: '${{parameters.platform }}'
51-
# configuration: '${{parameters.configuration }}'
53+
# configuration: '${{parameters.buildConfiguration }}'
5254
# msbuildArguments: '-t:BuildTestsNetCore -p:ReferenceType=NetStandard -p:TargetNetStandardVersion=${{parameters.targetNetStandardVersion }} -p:TF=${{parameters.targetFramework }} -p:ReferenceType=${{parameters.referenceType }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.nugetPackageVersion }}'
5355
# condition: and(succeeded(), not(startsWith(variables['TF'], 'net4')), startsWith(variables['TargetNetStandardVersion'], 'netstandard'))
5456

@@ -58,7 +60,7 @@ steps:
5860
inputs:
5961
solution: build.proj
6062
platform: '${{parameters.platform }}'
61-
configuration: '${{parameters.configuration }}'
63+
configuration: '${{parameters.buildConfiguration }}'
6264
msbuildArguments: '-t:BuildTestsNetCore -p:TF=${{parameters.targetFramework }} -p:TestSet=${{parameters.testSet }} -p:ReferenceType=${{parameters.referenceType }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.nugetPackageVersion }}'
6365
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
6466

@@ -69,7 +71,7 @@ steps:
6971
command: custom
7072
projects: build.proj
7173
custom: msbuild
72-
arguments: '-t:BuildTestsNetCore -p:TF=${{parameters.targetFramework }} -p:TestSet=${{parameters.testSet }} -p:ReferenceType=${{parameters.referenceType }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.nugetPackageVersion }} -p:OSGroup=${{parameters.OSGroup }} -p:platform=${{parameters.platform }} -p:Configuration=${{parameters.configuration }}'
74+
arguments: '-t:BuildTestsNetCore -p:TF=${{parameters.targetFramework }} -p:TestSet=${{parameters.testSet }} -p:ReferenceType=${{parameters.referenceType }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.nugetPackageVersion }} -p:OSGroup=${{parameters.OSGroup }} -p:platform=${{parameters.platform }} -p:Configuration=${{parameters.buildConfiguration }}'
7375
verbosityRestore: Detailed
7476
verbosityPack: Detailed
7577
condition: and(succeeded(), ne(variables['Agent.OS'], 'Windows_NT'))

0 commit comments

Comments
 (0)