From 4dfdf7623f2f6e5ead0cfac0e4147a8f8a9e5d27 Mon Sep 17 00:00:00 2001 From: Cheena Malhotra Date: Mon, 24 Aug 2026 14:17:30 -0700 Subject: [PATCH 1/2] Restore SQL Server 2022 coverage in the CI test matrix Adds back windows_sql_22_x64 (ADO-MMS22-SQL22) and linux_ub22_sql_22 (ADO-UB22-SQL22) to the CI-SqlClient test configurations, so moving the primary configurations to SQL Server 2025 does not drop SQL Server 2022 coverage entirely. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- eng/pipelines/dotnet-sqlclient-ci-core.yml | 57 ++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/eng/pipelines/dotnet-sqlclient-ci-core.yml b/eng/pipelines/dotnet-sqlclient-ci-core.yml index ec5703a487..1fcd68290a 100644 --- a/eng/pipelines/dotnet-sqlclient-ci-core.yml +++ b/eng/pipelines/dotnet-sqlclient-ci-core.yml @@ -426,6 +426,37 @@ stages: SQLRootPath: $(SQL19RootPath) enableLocalDB: true + # Windows Server 22 with local SQL Server 2022, x64 build platform. + # + # SQL Server 2025 is covered by windows_sql_25_x64 below. This + # configuration keeps SQL Server 2022 in the coverage matrix, alongside + # the 2016/2017/2019 configurations above. + windows_sql_22_x64: + pool: ${{parameters.defaultPoolName }} + images: + Win22_Sql22: ADO-MMS22-SQL22 + TargetFrameworks: ${{parameters.targetFrameworks }} + netcoreVersionTestUtils: ${{parameters.netcoreVersionTestUtils }} + buildPlatforms: ${{parameters.buildPlatforms }} + testSets: ${{parameters.testSets }} + useManagedSNI: ${{parameters.useManagedSNI }} + configSqlFor: local + operatingSystem: Windows + # config.jsonc properties + configProperties: + TCPConnectionString: $(SQL_TCP_CONN_STRING) + NPConnectionString: $(SQL_NP_CONN_STRING) + AzureKeyVaultUrl: $(AzureKeyVaultUrl) + AzureKeyVaultTenantId: $(AzureKeyVaultTenantId) + SupportsIntegratedSecurity: true + UserManagedIdentityClientId: $(UserManagedIdentityClientId) + FileStreamDirectory: $(FileStreamDirectory) + LocalDbAppName: $(LocalDbAppName) + LocalDbSharedInstanceName: $(LocalDbSharedInstanceName) + AliasName: $(SQLAliasName) + SQLRootPath: $(SQL22RootPath) + enableLocalDB: true + # Windows Server 25 with local SQL Server 2025, x64 build platform. windows_sql_25_x64: pool: ${{parameters.defaultPoolName }} @@ -556,6 +587,32 @@ stages: LocalDbAppName: $(LocalDbAppName) LocalDbSharedInstanceName: $(LocalDbSharedInstanceName) + # Linux Ubuntu 22 with local SQL Server 2022, x64 build platform. + # + # Keeps Linux SQL Server 2022 coverage now that the primary Linux + # configuration below runs against SQL Server 2025. + linux_ub22_sql_22: + pool: ${{parameters.defaultPoolName }} + images: + Ubuntu22_Sql22: ADO-UB22-SQL22 + TargetFrameworks: ${{parameters.targetFrameworksUnix }} + netcoreVersionTestUtils: ${{parameters.netcoreVersionTestUtils }} + buildPlatforms: [AnyCPU] + testSets: ${{parameters.testSets }} + useManagedSNI: [true] + configSqlFor: local + operatingSystem: Linux + configProperties: + TCPConnectionString: $(SQL_TCP_CONN_STRING) + NPConnectionString: $(SQL_NP_CONN_STRING) + AzureKeyVaultUrl: $(AzureKeyVaultUrl) + AzureKeyVaultTenantId: $(AzureKeyVaultTenantId) + SupportsIntegratedSecurity: false + UserManagedIdentityClientId: $(UserManagedIdentityClientId) + LocalDbAppName: $(LocalDbAppName) + LocalDbSharedInstanceName: $(LocalDbSharedInstanceName) + AliasName: $(SQLAliasName) + # Linux Ubuntu 24 with local SQL Server 2025, x64 build platform. linux_ub24_sql_25: pool: ${{parameters.defaultPoolName }} From 1a2b3af619ee48a49576e547ad401d78d95fa0d1 Mon Sep 17 00:00:00 2001 From: Cheena Malhotra Date: Mon, 24 Aug 2026 14:31:59 -0700 Subject: [PATCH 2/2] Gate SQL Server 2022 test configurations to CI pipelines only Groups windows_sql_22_x64 and linux_ub22_sql_22 under a single runSql22Tests conditional (mirroring the existing legacy SQL block) and opts the PR pipelines out, so PR validation stays on SQL Server 2019, 2025 and Azure SQL. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- eng/pipelines/dotnet-sqlclient-ci-core.yml | 122 ++++++++++-------- .../sqlclient-pr-package-ref-pipeline.yml | 3 + .../sqlclient-pr-project-ref-pipeline.yml | 3 + 3 files changed, 71 insertions(+), 57 deletions(-) diff --git a/eng/pipelines/dotnet-sqlclient-ci-core.yml b/eng/pipelines/dotnet-sqlclient-ci-core.yml index 1fcd68290a..522f25395e 100644 --- a/eng/pipelines/dotnet-sqlclient-ci-core.yml +++ b/eng/pipelines/dotnet-sqlclient-ci-core.yml @@ -114,6 +114,15 @@ parameters: type: boolean default: true + # If true, run manual tests against SQL Server 2022. + # + # The primary test configurations run against SQL Server 2025, so SQL Server + # 2022 is CI-only coverage. PR pipelines disable it to keep validation fast. + # + - name: runSql22Tests + type: boolean + default: true + # Build suffix appended to the prerelease tag. PR pipelines pass 'pr', # CI pipelines pass 'ci'. Official builds leave this empty. - name: buildSuffix @@ -426,37 +435,6 @@ stages: SQLRootPath: $(SQL19RootPath) enableLocalDB: true - # Windows Server 22 with local SQL Server 2022, x64 build platform. - # - # SQL Server 2025 is covered by windows_sql_25_x64 below. This - # configuration keeps SQL Server 2022 in the coverage matrix, alongside - # the 2016/2017/2019 configurations above. - windows_sql_22_x64: - pool: ${{parameters.defaultPoolName }} - images: - Win22_Sql22: ADO-MMS22-SQL22 - TargetFrameworks: ${{parameters.targetFrameworks }} - netcoreVersionTestUtils: ${{parameters.netcoreVersionTestUtils }} - buildPlatforms: ${{parameters.buildPlatforms }} - testSets: ${{parameters.testSets }} - useManagedSNI: ${{parameters.useManagedSNI }} - configSqlFor: local - operatingSystem: Windows - # config.jsonc properties - configProperties: - TCPConnectionString: $(SQL_TCP_CONN_STRING) - NPConnectionString: $(SQL_NP_CONN_STRING) - AzureKeyVaultUrl: $(AzureKeyVaultUrl) - AzureKeyVaultTenantId: $(AzureKeyVaultTenantId) - SupportsIntegratedSecurity: true - UserManagedIdentityClientId: $(UserManagedIdentityClientId) - FileStreamDirectory: $(FileStreamDirectory) - LocalDbAppName: $(LocalDbAppName) - LocalDbSharedInstanceName: $(LocalDbSharedInstanceName) - AliasName: $(SQLAliasName) - SQLRootPath: $(SQL22RootPath) - enableLocalDB: true - # Windows Server 25 with local SQL Server 2025, x64 build platform. windows_sql_25_x64: pool: ${{parameters.defaultPoolName }} @@ -587,32 +565,6 @@ stages: LocalDbAppName: $(LocalDbAppName) LocalDbSharedInstanceName: $(LocalDbSharedInstanceName) - # Linux Ubuntu 22 with local SQL Server 2022, x64 build platform. - # - # Keeps Linux SQL Server 2022 coverage now that the primary Linux - # configuration below runs against SQL Server 2025. - linux_ub22_sql_22: - pool: ${{parameters.defaultPoolName }} - images: - Ubuntu22_Sql22: ADO-UB22-SQL22 - TargetFrameworks: ${{parameters.targetFrameworksUnix }} - netcoreVersionTestUtils: ${{parameters.netcoreVersionTestUtils }} - buildPlatforms: [AnyCPU] - testSets: ${{parameters.testSets }} - useManagedSNI: [true] - configSqlFor: local - operatingSystem: Linux - configProperties: - TCPConnectionString: $(SQL_TCP_CONN_STRING) - NPConnectionString: $(SQL_NP_CONN_STRING) - AzureKeyVaultUrl: $(AzureKeyVaultUrl) - AzureKeyVaultTenantId: $(AzureKeyVaultTenantId) - SupportsIntegratedSecurity: false - UserManagedIdentityClientId: $(UserManagedIdentityClientId) - LocalDbAppName: $(LocalDbAppName) - LocalDbSharedInstanceName: $(LocalDbSharedInstanceName) - AliasName: $(SQLAliasName) - # Linux Ubuntu 24 with local SQL Server 2025, x64 build platform. linux_ub24_sql_25: pool: ${{parameters.defaultPoolName }} @@ -636,6 +588,62 @@ stages: LocalDbSharedInstanceName: $(LocalDbSharedInstanceName) AliasName: $(SQLAliasName) + # SQL Server 2022 coverage, on Windows and Linux. + # + # The primary configurations run against SQL Server 2025, so these keep + # SQL Server 2022 in the matrix. They are grouped under a single + # conditional so that PR pipelines can opt out of them as a unit. + ${{ if eq(parameters.runSql22Tests, true) }}: + # Windows Server 22 with local SQL Server 2022, x64 build platform. + windows_sql_22_x64: + pool: ${{parameters.defaultPoolName }} + images: + Win22_Sql22: ADO-MMS22-SQL22 + TargetFrameworks: ${{parameters.targetFrameworks }} + netcoreVersionTestUtils: ${{parameters.netcoreVersionTestUtils }} + buildPlatforms: ${{parameters.buildPlatforms }} + testSets: ${{parameters.testSets }} + useManagedSNI: ${{parameters.useManagedSNI }} + configSqlFor: local + operatingSystem: Windows + # config.jsonc properties + configProperties: + TCPConnectionString: $(SQL_TCP_CONN_STRING) + NPConnectionString: $(SQL_NP_CONN_STRING) + AzureKeyVaultUrl: $(AzureKeyVaultUrl) + AzureKeyVaultTenantId: $(AzureKeyVaultTenantId) + SupportsIntegratedSecurity: true + UserManagedIdentityClientId: $(UserManagedIdentityClientId) + FileStreamDirectory: $(FileStreamDirectory) + LocalDbAppName: $(LocalDbAppName) + LocalDbSharedInstanceName: $(LocalDbSharedInstanceName) + AliasName: $(SQLAliasName) + SQLRootPath: $(SQL22RootPath) + enableLocalDB: true + + # Linux Ubuntu 22 with local SQL Server 2022, x64 build platform. + linux_ub22_sql_22: + pool: ${{parameters.defaultPoolName }} + images: + Ubuntu22_Sql22: ADO-UB22-SQL22 + TargetFrameworks: ${{parameters.targetFrameworksUnix }} + netcoreVersionTestUtils: ${{parameters.netcoreVersionTestUtils }} + buildPlatforms: [AnyCPU] + testSets: ${{parameters.testSets }} + useManagedSNI: [true] + configSqlFor: local + operatingSystem: Linux + configProperties: + TCPConnectionString: $(SQL_TCP_CONN_STRING) + NPConnectionString: $(SQL_NP_CONN_STRING) + AzureKeyVaultUrl: $(AzureKeyVaultUrl) + AzureKeyVaultTenantId: $(AzureKeyVaultTenantId) + SupportsIntegratedSecurity: false + UserManagedIdentityClientId: $(UserManagedIdentityClientId) + LocalDbAppName: $(LocalDbAppName) + LocalDbSharedInstanceName: $(LocalDbSharedInstanceName) + AliasName: $(SQLAliasName) + # Linux Ubuntu 24 with Azure SQL Server, x64 build platform. linux_azure_sql: pool: ${{parameters.defaultPoolName }} diff --git a/eng/pipelines/sqlclient-pr-package-ref-pipeline.yml b/eng/pipelines/sqlclient-pr-package-ref-pipeline.yml index abb0ef5f39..7623f83ce4 100644 --- a/eng/pipelines/sqlclient-pr-package-ref-pipeline.yml +++ b/eng/pipelines/sqlclient-pr-package-ref-pipeline.yml @@ -145,6 +145,9 @@ extends: useManagedSNI: ${{ parameters.useManagedSNI }} # Legacy SQL Server tests (2016/2017) run in CI only, not on PRs. runLegacySqlTests: false + # SQL Server 2022 coverage runs in CI only. PR validation covers SQL + # Server 2019, 2025 and Azure SQL. + runSql22Tests: false # Don't run the AE tests in Debug mode; they rarely succeed. ${{ if eq(parameters.buildConfiguration, 'Debug') }}: runAlwaysEncryptedTests: false diff --git a/eng/pipelines/sqlclient-pr-project-ref-pipeline.yml b/eng/pipelines/sqlclient-pr-project-ref-pipeline.yml index f9578e6548..74309ae643 100644 --- a/eng/pipelines/sqlclient-pr-project-ref-pipeline.yml +++ b/eng/pipelines/sqlclient-pr-project-ref-pipeline.yml @@ -145,6 +145,9 @@ extends: useManagedSNI: ${{ parameters.useManagedSNI }} # Legacy SQL Server tests (2016/2017) run in CI only, not on PRs. runLegacySqlTests: false + # SQL Server 2022 coverage runs in CI only. PR validation covers SQL + # Server 2019, 2025 and Azure SQL. + runSql22Tests: false # Don't run the AE tests in Debug mode; they rarely succeed. ${{ if eq(parameters.buildConfiguration, 'Debug') }}: runAlwaysEncryptedTests: false