Skip to content

Commit 85f345b

Browse files
committed
Merge branch 'main' into cleanup/remove-dbmetadatafactory
2 parents 0722b56 + da467a7 commit 85f345b

File tree

35 files changed

+627
-244
lines changed

35 files changed

+627
-244
lines changed

.azuredevops/policies/approvercountpolicy.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
# that govern how PRs are approved in general. The settings here dictate how
44
# the validator behaves, and it can also prevent PRs from completing.
55
#
6-
# Suggested by Merlinbot (https://sqlclientdrivers.visualstudio.com/ADO.Net/_git/dotnet-sqlclient/pullrequest/4982)
6+
# https://eng.ms/docs/coreai/devdiv/one-engineering-system-1es/1es-docs/policy-service/policy-as-code/approver-count-policy-overview
77

88
name: approver_count
9-
description: Approver count policy for dotnet-sqlclient
9+
description: Approver count policy for dotnet-sqlclient [internal/main]
1010
resource: repository
1111
where:
1212
configuration:
@@ -22,8 +22,5 @@ configuration:
2222
resetRejectionsOnSourcePush: false
2323
blockLastPusherVote: true
2424
branchNames:
25-
- refs/heads/internal/main
26-
- refs/heads/internal/release/6.0
27-
- refs/heads/internal/release/5.2
28-
- refs/heads/internal/release/5.1
29-
displayName: dotnet-sqlclient Approver Count Policy
25+
- internal/main
26+
displayName: dotnet-sqlclient Approver Count Policy [internal/main]

.github/workflows/codeql.yml

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL Advanced"
13+
14+
on:
15+
push:
16+
branches: [ "main" ]
17+
pull_request:
18+
branches: [ "main" ]
19+
schedule:
20+
- cron: '33 23 * * 6'
21+
22+
jobs:
23+
analyze:
24+
name: Analyze (${{ matrix.language }})
25+
# Runner size impacts CodeQL analysis time. To learn more, please see:
26+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
27+
# - https://gh.io/supported-runners-and-hardware-resources
28+
# - https://gh.io/using-larger-runners (GitHub.com only)
29+
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
30+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
31+
permissions:
32+
# required for all workflows
33+
security-events: write
34+
35+
# required to fetch internal or private CodeQL packs
36+
packages: read
37+
38+
# only required for workflows in private repositories
39+
actions: read
40+
contents: read
41+
42+
strategy:
43+
fail-fast: false
44+
matrix:
45+
include:
46+
- language: csharp
47+
build-mode: manual
48+
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift'
49+
# Use `c-cpp` to analyze code written in C, C++ or both
50+
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
51+
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
52+
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
53+
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
54+
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
55+
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
56+
steps:
57+
- name: Checkout repository
58+
uses: actions/checkout@v4
59+
60+
- name: Setup .NET Core SDK
61+
uses: actions/[email protected]
62+
with:
63+
# TODO: Update this to .NET 10 once PR #3686 is complete.
64+
# TODO: Replace this with global-json-file once PR #3797 is complete.
65+
dotnet-version: 9.x
66+
dotnet-quality: ga
67+
#global-json-file: global.json
68+
69+
# Initializes the CodeQL tools for scanning.
70+
- name: Initialize CodeQL
71+
uses: github/codeql-action/init@v4
72+
with:
73+
languages: ${{ matrix.language }}
74+
build-mode: ${{ matrix.build-mode }}
75+
# If you wish to specify custom queries, you can do so here or in a config file.
76+
# By default, queries listed here will override any specified in a config file.
77+
# Prefix the list here with "+" to use these queries and those in the config file.
78+
79+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
80+
# queries: security-extended,security-and-quality
81+
82+
# If the analyze step fails for one of the languages you are analyzing with
83+
# "We were unable to automatically build your code", modify the matrix above
84+
# to set the build mode to "manual" for that language. Then modify this step
85+
# to build your code.
86+
# ℹ️ Command-line programs to run using the OS shell.
87+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
88+
- name: Run manual build steps
89+
if: matrix.build-mode == 'manual'
90+
shell: bash
91+
run: |
92+
mkdir packages
93+
dotnet build src/
94+
95+
- name: Perform CodeQL Analysis
96+
uses: github/codeql-action/analyze@v4
97+
with:
98+
category: "/language:${{matrix.language}}"

Directory.Packages.props

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
<PackageVersion Include="Microsoft.Identity.Client" Version="4.78.0" />
1313
</ItemGroup>
1414
<!-- Published - Target Framework Specific Dependencies -->
15-
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
15+
<ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net9.0'))">
1616
<!-- MDS and AKV -->
1717
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="9.0.9" />
1818
</ItemGroup>
19-
<ItemGroup Condition="'$(TargetFramework)' != 'net9.0'">
19+
<ItemGroup Condition="!$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net9.0'))">
2020
<!-- MDS and AKV -->
2121
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="8.0.1" />
2222
</ItemGroup>
@@ -31,7 +31,6 @@
3131
<PackageVersion Include="Microsoft.SqlServer.SqlManagementObjects" Version="172.76.0" />
3232
<PackageVersion Include="Microsoft.SqlServer.Types" Version="160.1000.6" />
3333
<PackageVersion Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.5" />
34-
<PackageVersion Include="Microsoft.Win32.Registry" Version="5.0.0" />
3534
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
3635
<PackageVersion Include="System.Data.Odbc" Version="9.0.9" />
3736
<PackageVersion Include="System.Security.Principal.Windows" Version="5.0.0" />
@@ -42,11 +41,11 @@
4241
<PackageVersion Include="xunit.runner.console" Version="2.9.3" />
4342
</ItemGroup>
4443
<!-- Internal - Target Framework Specific Dependencies -->
45-
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
44+
<ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net9.0'))">
4645
<!-- MDS and AKV Tests -->
4746
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="9.0.9" />
4847
</ItemGroup>
49-
<ItemGroup Condition="'$(TargetFramework)' != 'net9.0'">
48+
<ItemGroup Condition="!$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net9.0'))">
5049
<!-- MDS and AKV Tests -->
5150
<!--
5251
We can't use a newer major version of this package because it pulls in
@@ -62,20 +61,17 @@
6261
<PackageVersion Include="Azure.Identity" Version="1.16.0" />
6362
<PackageVersion Include="Microsoft.IdentityModel.JsonWebTokens" Version="8.14.0" />
6463
<PackageVersion Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="8.14.0" />
65-
<PackageVersion Include="System.Runtime.InteropServices.RuntimeInformation" Version="4.3.0" />
6664
</ItemGroup>
6765
<!-- Common Target Framework Specific Dependencies -->
68-
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
66+
<ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net9.0'))">
6967
<PackageVersion Include="Microsoft.Bcl.Cryptography" Version="9.0.9" />
7068
<PackageVersion Include="System.Configuration.ConfigurationManager" Version="9.0.9" />
7169
<PackageVersion Include="System.Security.Cryptography.Pkcs" Version="9.0.9" />
72-
<PackageVersion Include="System.Text.Json" Version="9.0.9" />
7370
</ItemGroup>
74-
<ItemGroup Condition="'$(TargetFramework)' != 'net9.0'">
71+
<ItemGroup Condition="!$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net9.0'))">
7572
<PackageVersion Include="Microsoft.Bcl.Cryptography" Version="8.0.0" />
7673
<PackageVersion Include="System.Configuration.ConfigurationManager" Version="8.0.1" />
7774
<PackageVersion Include="System.Security.Cryptography.Pkcs" Version="8.0.1" />
78-
<PackageVersion Include="System.Text.Json" Version="8.0.6" />
7975
</ItemGroup>
8076
<!-- .NET Dependencies -->
8177
<ItemGroup>
@@ -86,10 +82,10 @@
8682
<ItemGroup>
8783
<PackageVersion Include="Microsoft.Data.SqlClient.SNI" Version="6.0.2" />
8884
<PackageVersion Include="System.Buffers" Version="4.6.1" />
89-
<PackageVersion Include="System.Data.Common" Version="4.3.0" />
9085
<PackageVersion Include="System.Diagnostics.DiagnosticSource" Version="8.0.1" />
9186
<PackageVersion Include="System.Memory" Version="4.6.3" />
92-
<PackageVersion Include="System.Text.Encodings.Web" Version="8.0.0" />
87+
<PackageVersion Include="System.Runtime.InteropServices.RuntimeInformation" Version="4.3.0" />
88+
<PackageVersion Include="System.Text.Json" Version="8.0.6" />
9389
<PackageVersion Include="System.ValueTuple" Version="4.6.1" />
9490
<PackageVersion Include="System.Threading.Channels" Version="8.0.0" />
9591
</ItemGroup>
@@ -101,4 +97,4 @@
10197
<!-- =================================================================== -->
10298
<!-- MSS Dependencies -->
10399
<!-- None -->
104-
</Project>
100+
</Project>

eng/pipelines/common/templates/jobs/ci-code-coverage-job.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ jobs:
6363
- template: ../steps/ensure-dotnet-version.yml@self
6464
parameters:
6565
packageType: sdk
66+
version: '10.0'
67+
68+
- template: ../steps/ensure-dotnet-version.yml@self
69+
parameters:
70+
packageType: runtime
6671
version: '9.0'
6772

6873
- pwsh: |

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,15 @@ steps:
3232
retryCount: 5
3333

3434
- task: UseDotNet@2
35-
displayName: 'Use .NET 9.x sdk'
35+
displayName: 'Use .NET 10.x sdk'
3636
inputs:
3737
packageType: sdk
38+
version: '10.x'
39+
40+
- task: UseDotNet@2
41+
displayName: 'Use .NET 9.x runtime'
42+
inputs:
43+
packageType: runtime
3844
version: '9.x'
3945

4046
- task: UseDotNet@2

eng/pipelines/common/templates/steps/ci-prebuild-step.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ steps:
2929
parameters:
3030
packageType: sdk
3131
usePreview: false
32+
version: 10.0
33+
34+
- template: ensure-dotnet-version.yml
35+
parameters:
36+
packageType: runtime
37+
usePreview: false
3238
version: 9.0
3339

3440
- template: ensure-dotnet-version.yml

eng/pipelines/common/templates/steps/ci-project-build-step.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ steps:
4040
- template: ./ensure-dotnet-version.yml@self
4141
parameters:
4242
packageType: 'sdk'
43+
version: '10.0'
44+
45+
- template: ./ensure-dotnet-version.yml@self
46+
parameters:
47+
packageType: 'runtime'
4348
version: '9.0'
4449

4550
- template: ./ensure-dotnet-version.yml@self

eng/pipelines/common/templates/steps/pre-build-step.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ steps:
77
- template: ./ensure-dotnet-version.yml@self
88
parameters:
99
packageType: 'sdk'
10+
version: '10.0'
11+
usePreview: false
12+
13+
- template: ./ensure-dotnet-version.yml@self
14+
parameters:
15+
packageType: 'runtime'
1016
version: '9.0'
1117

1218
- template: ./ensure-dotnet-version.yml@self

eng/pipelines/dotnet-sqlclient-ci-core.yml

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,28 @@ parameters:
99
type: boolean
1010
default: false
1111

12+
# The target frameworks to build and run tests for on Windows.
13+
#
14+
# These are _not_ the target frameworks to build the driver packages for.
15+
#
1216
- name: targetFrameworks
1317
displayName: 'Target Frameworks on Windows'
1418
type: object
15-
default: [net462, net8.0, net9.0]
16-
17-
- name: targetFrameworksLinux
18-
displayName: 'Target Frameworks on Non-Windows'
19+
default: [net462, net8.0, net9.0, net10.0]
20+
21+
# The target frameworks to build and run tests for on Unix.
22+
#
23+
# These are _not_ the target frameworks to build the driver packages for.
24+
#
25+
- name: targetFrameworksUnix
26+
displayName: 'Target Frameworks on Unix'
1927
type: object
20-
default: [net8.0, net9.0]
28+
default: [net8.0, net9.0, net10.0]
2129

2230
- name: netcoreVersionTestUtils
2331
displayName: 'Netcore Version for Test Utilities'
2432
type: object
25-
default: net9.0
33+
default: net10.0
2634

2735
- name: buildPlatforms
2836
displayName: 'Build Platforms on Windows'
@@ -53,10 +61,12 @@ parameters:
5361
type: string
5462
default: https://sqlclientdrivers.pkgs.visualstudio.com/ADO.Net/_packaging/SNIValidation/nuget/v3/index.json
5563

64+
# Frameworks to expect code coverage information for, and to compile into
65+
# reports.
5666
- name: codeCovTargetFrameworks
5767
displayName: 'Code Coverage Target Frameworks'
5868
type: object
59-
default: [net462, net8.0, net9.0]
69+
default: [net462, net8.0, net9.0, net10.0]
6070

6171
- name: buildType
6272
displayName: 'Build Type'
@@ -310,7 +320,7 @@ stages:
310320
windows_sql_22_named_instance:
311321
pool: ${{parameters.defaultPoolName }}
312322
images:
313-
Win22_Sql22_named_instance: ADO-MMS22-SQL22-WITH-NAMED-INSTANCE
323+
Win22_Sql22_Named_Instance: ADO-MMS22-SQL22-WITH-NAMED-INSTANCE
314324
TargetFrameworks: ${{parameters.targetFrameworks }}
315325
netcoreVersionTestUtils: ${{parameters.netcoreVersionTestUtils }}
316326
buildPlatforms: ${{parameters.buildPlatforms }}
@@ -334,7 +344,7 @@ stages:
334344
pool: ${{parameters.defaultPoolName }}
335345
images:
336346
Win22_Azure_Sql: ADO-MMS22-SQL19
337-
win11_Azure_Sql: ADO-CI-Win11
347+
Win11_Azure_Sql: ADO-CI-Win11
338348
TargetFrameworks: ${{parameters.targetFrameworks }}
339349
netcoreVersionTestUtils: ${{parameters.netcoreVersionTestUtils }}
340350
buildPlatforms: ${{parameters.buildPlatforms }}
@@ -366,7 +376,7 @@ stages:
366376
windows_azure_arm64_sql:
367377
pool: ADO-CI-PUBLIC-ARM64-1ES-EUS-POOL
368378
images:
369-
Win22_Azure_ARM64_Sql: ADO-WIN11-ARM64
379+
Win11_ARM64_Azure_Sql: ADO-WIN11-ARM64
370380
TargetFrameworks: ${{parameters.targetFrameworks }}
371381
netcoreVersionTestUtils: ${{parameters.netcoreVersionTestUtils }}
372382
buildPlatforms: ${{parameters.buildPlatforms }}
@@ -431,7 +441,7 @@ stages:
431441
images:
432442
Ubuntu20_Sql22: ADO-UB20-SQL22 # drop testing against UB20 image post April 2025
433443
Ubuntu22_Sql22: ADO-UB22-SQL22
434-
TargetFrameworks: ${{parameters.targetFrameworksLinux }}
444+
TargetFrameworks: ${{parameters.targetFrameworksUnix }}
435445
netcoreVersionTestUtils: ${{parameters.netcoreVersionTestUtils }}
436446
buildPlatforms: [AnyCPU]
437447
testSets: ${{parameters.testSets }}
@@ -456,7 +466,7 @@ stages:
456466
pool: ${{parameters.defaultPoolName }}
457467
images:
458468
Ubuntu22_Azure_Sql: ADO-UB22-SQL22
459-
TargetFrameworks: ${{parameters.targetFrameworksLinux }}
469+
TargetFrameworks: ${{parameters.targetFrameworksUnix }}
460470
netcoreVersionTestUtils: ${{parameters.netcoreVersionTestUtils }}
461471
buildPlatforms: [AnyCPU]
462472
testSets: ${{parameters.testSets }}
@@ -488,7 +498,7 @@ stages:
488498
pool: ADO-CI-AE-1ES-Pool
489499
images:
490500
Ubuntu20_Enclave_Sql19: ADO-UB22-Sql22
491-
TargetFrameworks: ${{parameters.targetFrameworksLinux }}
501+
TargetFrameworks: ${{parameters.targetFrameworksUnix }}
492502
netcoreVersionTestUtils: ${{parameters.netcoreVersionTestUtils }}
493503
buildPlatforms: [AnyCPU]
494504
testSets: [AE]
@@ -518,7 +528,7 @@ stages:
518528
hostedPool: true
519529
images:
520530
MacOSLatest_Sql22: macos-latest
521-
TargetFrameworks: ${{parameters.targetFrameworksLinux }}
531+
TargetFrameworks: ${{parameters.targetFrameworksUnix }}
522532
netcoreVersionTestUtils: ${{parameters.netcoreVersionTestUtils }}
523533
buildPlatforms: [AnyCPU]
524534
testSets: ${{parameters.testSets }}

0 commit comments

Comments
 (0)