Skip to content

Commit 227aa9a

Browse files
committed
Merge main
2 parents a1896e7 + bd36b43 commit 227aa9a

67 files changed

Lines changed: 5202 additions & 719 deletions

File tree

Some content is hidden

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

Directory.Packages.props

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
</ItemGroup>
100100

101101
<ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net9.0'))">
102-
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="9.0.13" />
102+
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="9.0.18" />
103103
</ItemGroup>
104104

105105
<ItemGroup Condition="!$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net9.0'))">
@@ -148,11 +148,11 @@
148148
</ItemGroup>
149149

150150
<ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net9.0'))">
151-
<PackageVersion Include="Microsoft.Bcl.Cryptography" Version="9.0.13" />
152-
<PackageVersion Include="Microsoft.Bcl.TimeProvider" Version="9.0.16" />
153-
<PackageVersion Include="System.Threading.RateLimiting" Version="9.0.13" />
154-
<PackageVersion Include="System.Configuration.ConfigurationManager" Version="9.0.13" />
155-
<PackageVersion Include="System.Security.Cryptography.Pkcs" Version="9.0.13" />
151+
<PackageVersion Include="Microsoft.Bcl.Cryptography" Version="9.0.18" />
152+
<PackageVersion Include="Microsoft.Bcl.TimeProvider" Version="9.0.18" />
153+
<PackageVersion Include="System.Threading.RateLimiting" Version="9.0.18" />
154+
<PackageVersion Include="System.Configuration.ConfigurationManager" Version="9.0.18" />
155+
<PackageVersion Include="System.Security.Cryptography.Pkcs" Version="9.0.18" />
156156
</ItemGroup>
157157

158158
<ItemGroup Condition="!$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net9.0'))">
Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
####################################################################################################
2+
# Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this
3+
# file to you under the MIT license. See the LICENSE file in the project root for more information.
4+
####################################################################################################
5+
6+
# This job builds and runs the SqlClient Manual test suite against an Azure SQL Managed Instance.
7+
# The SqlClient NuGet packages produced by the sqlclient-ci-package pipeline are downloaded into the
8+
# local NuGet feed (packages/) and the test project is built in "Package" mode
9+
# (ReferenceType=Package) against the exact package versions produced by that pipeline.
10+
#
11+
# The Managed Instance TCP connection string is provided by the "ADO Test Configuration Properties"
12+
# variable group (SQL_MI_TCP_CONN_STRING). This job runs on the Managed-Instance-pool, whose agents
13+
# have network line-of-sight to the Managed Instance.
14+
#
15+
# This template defines a job named 'managed_instance_tests_job_<suffix>' that can be depended on by
16+
# downstream jobs.
17+
18+
parameters:
19+
20+
# The type of build to produce (Debug or Release).
21+
- name: buildConfiguration
22+
type: string
23+
values:
24+
- Debug
25+
- Release
26+
27+
# True to enable debugging steps.
28+
- name: debug
29+
type: boolean
30+
31+
# The job's display name.
32+
- name: displayName
33+
type: string
34+
35+
# The verbosity level for the dotnet CLI commands.
36+
- name: dotnetVerbosity
37+
type: string
38+
values:
39+
- quiet
40+
- minimal
41+
- normal
42+
- detailed
43+
- diagnostic
44+
45+
# The suffix to append to the job name.
46+
- name: jobNameSuffix
47+
type: string
48+
49+
# The OS to build and run the tests for.
50+
- name: operatingSystem
51+
type: string
52+
values:
53+
- Linux
54+
- Windows
55+
56+
# The .NET runtime (TFM) to build and run the tests for.
57+
- name: runtime
58+
type: string
59+
60+
# The timeout, in minutes, for this job.
61+
- name: timeout
62+
type: number
63+
default: 90
64+
65+
# True to use managed SNI on Windows. Ignored on non-Windows, where managed SNI is always used.
66+
- name: useManagedSNI
67+
type: boolean
68+
default: false
69+
70+
# The pool VM image to use. The Managed-Instance-pool must provide an image with this name.
71+
#
72+
# NOTE: This value is evaluated at template-expansion (compile) time to select the pool image, so
73+
# it must be a literal and must not contain any runtime expressions (e.g. $(...) macros or
74+
# $[...] runtime expressions).
75+
- name: vmImage
76+
type: string
77+
78+
jobs:
79+
- job: managed_instance_tests_job_${{ parameters.jobNameSuffix }}
80+
displayName: ${{ parameters.displayName }}
81+
timeoutInMinutes: ${{ parameters.timeout }}
82+
83+
workspace:
84+
clean: all
85+
86+
variables:
87+
88+
# Import the variable group that provides the Managed Instance TCP connection string
89+
# (SQL_MI_TCP_CONN_STRING) and other test configuration.
90+
- group: ADO Test Configuration Properties
91+
92+
# The Managed-Instance-pool agents have network line-of-sight to the Managed Instance.
93+
pool:
94+
name: Managed-Instance-pool
95+
demands:
96+
- imageOverride -equals ${{ parameters.vmImage }}
97+
98+
steps:
99+
100+
# Check out the repo and align the working-tree source with the commit that built the upstream
101+
# sqlclient-ci-package artifacts, so the test projects compile against the matching API surface.
102+
- template: /eng/pipelines/common/steps/align-source-with-upstream-step.yml@self
103+
104+
# Download the SqlClient driver packages published by the triggering sqlclient-ci-package
105+
# pipeline, stage them into the local NuGet feed, and resolve their exact versions into the
106+
# sqlClient/sqlServer/abstractions/logging/azure PackageVersion variables.
107+
#
108+
# sqlServerVersionOverride pins Microsoft.SqlServer.Server to the released stable 1.0.0 to
109+
# avoid an NU1605 downgrade against the >= 1.0.0 dependency from Microsoft.SqlServer.Types.
110+
- template: /eng/pipelines/common/steps/download-driver-packages-step.yml@self
111+
parameters:
112+
sqlServerVersionOverride: 1.0.0
113+
114+
# Install the .NET SDK and the runtimes needed to execute the test frameworks.
115+
- template: /eng/pipelines/common/steps/install-dotnet.yml@self
116+
parameters:
117+
debug: ${{ parameters.debug }}
118+
runtimes: [8.x, 9.x, 10.x]
119+
120+
# Restore dotnet CLI tools (e.g. pwsh, apicompat) before building.
121+
- template: /eng/pipelines/common/steps/restore-dotnet-tools.yml@self
122+
123+
# Authenticate with NuGet feeds so that upstream packages (e.g. runtime host packs) can be
124+
# fetched through the ADO Artifacts feed.
125+
- task: NuGetAuthenticate@1
126+
displayName: Authenticate NuGet feeds
127+
128+
# Write the config.jsonc file pointing the tests at the Managed Instance. Integrated security
129+
# and managed identity are not supported against the Managed Instance, and IsManagedInstance
130+
# opts the test suite into Managed-Instance-specific behavior.
131+
- template: /eng/pipelines/common/templates/steps/update-config-file-step.yml@self
132+
parameters:
133+
debug: ${{ parameters.debug }}
134+
# The Managed Instance connection strings carry their own credentials, so no local SA
135+
# password is used here; pass an empty string for the required saPassword parameter.
136+
saPassword: ''
137+
TCPConnectionString: $(SQL_MI_TCP_CONN_STRING)
138+
# Azure SQL Managed Instance exposes TDS over TCP and does not support Named Pipes.
139+
NPConnectionString: ''
140+
SupportsIntegratedSecurity: false
141+
ManagedIdentitySupported: false
142+
IsManagedInstance: true
143+
UseManagedSNIOnWindows: ${{ parameters.useManagedSNI }}
144+
145+
# Ensure the TestResults directory exists so publish steps don't fail when tests are skipped
146+
# due to a setup failure.
147+
- pwsh: New-Item -ItemType Directory -Path TestResults -Force | Out-Null
148+
displayName: Create TestResults Directory
149+
150+
# Gate: record that all setup steps completed successfully. Test steps condition on this
151+
# variable so they are skipped when setup fails, yet remain independent of each other's
152+
# results.
153+
- pwsh: Write-Host '##vso[task.setvariable variable=setupSucceeded]true'
154+
displayName: 'Gate: Mark Setup Succeeded'
155+
156+
# Run ManualTests sets 1, 2, and 3 against the Managed Instance using the exact upstream
157+
# package versions. UnitTests and FunctionalTests do not exercise the configured instance.
158+
# Set AE is omitted because this pipeline does not provision its separate AE, enclave, and AKV
159+
# resources. build.proj's default filter also excludes failing, flaky, and interactive tests.
160+
- task: DotNetCoreCLI@2
161+
displayName: Run Managed Instance Tests
162+
condition: and(eq(variables['setupSucceeded'], 'true'), succeededOrFailed())
163+
inputs:
164+
command: build
165+
projects: build.proj
166+
arguments: >-
167+
--verbosity ${{ parameters.dotnetVerbosity }}
168+
-t:TestSqlClientManual
169+
-p:TestFramework=${{ parameters.runtime }}
170+
-p:TestSet=123
171+
-p:ReferenceType=Package
172+
-p:Configuration=${{ parameters.buildConfiguration }}
173+
-p:PackageVersionAbstractions=$(abstractionsPackageVersion)
174+
-p:PackageVersionLogging=$(loggingPackageVersion)
175+
-p:PackageVersionSqlClient=$(sqlClientPackageVersion)
176+
-p:PackageVersionSqlServer=$(sqlServerPackageVersion)
177+
-p:TestResultsFolderPath=TestResults
178+
retryCountOnTaskFailure: 2
179+
180+
- template: /eng/pipelines/common/templates/steps/publish-test-results-step.yml@self
181+
parameters:
182+
debug: ${{ parameters.debug }}
183+
targetFramework: ${{ parameters.runtime }}
184+
operatingSystem: ${{ parameters.operatingSystem }}
185+
buildConfiguration: ${{ parameters.buildConfiguration }}
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
####################################################################################################
2+
# Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this
3+
# file to you under the MIT license. See the LICENSE file in the project root for more information.
4+
####################################################################################################
5+
6+
# This pipeline runs the SqlClient Unit, Functional, and Manual test suites against an Azure SQL
7+
# Managed Instance, building the test projects in "Package" mode against the NuGet packages produced
8+
# by the sqlclient-ci-package pipeline. It is triggered by successful runs of that pipeline:
9+
#
10+
# ADO.Net project:
11+
# Triggering pipeline: sqlclient-ci-package
12+
# Pipeline name: sqlclient-ci-managed-instance
13+
#
14+
# This pipeline is registered in the ADO.Net (internal) project ONLY, because it depends on the
15+
# Managed Instance connection strings provided by the "ADO Test Configuration Properties" variable
16+
# group and on the Managed-Instance-pool agents, neither of which exist in the Public project.
17+
18+
# Set the pipeline run name to the day-of-year and the daily run counter.
19+
name: $(DayOfYear)$(Rev:rr)
20+
21+
# Do not trigger this pipeline for PRs, commits, or schedules.
22+
pr: none
23+
trigger: none
24+
25+
# Trigger this pipeline after successful runs of the sqlclient-ci-package pipeline.
26+
resources:
27+
pipelines:
28+
29+
# Trigger this pipeline when the sqlclient-ci-package pipeline completes successfully.
30+
#
31+
# 'project' is omitted so the resource resolves to the sqlclient-ci-package pipeline in the
32+
# *current* ADO project (ADO.Net), where this pipeline is registered.
33+
#
34+
# IMPORTANT: 'source' is the bare pipeline name with no folder path. This REQUIRES the
35+
# sqlclient-ci-package name to be UNIQUE within the ADO.Net project. Azure DevOps only allows
36+
# omitting the folder when the name is unambiguous; if a second pipeline with this name is ever
37+
# added to the project, this resource will fail to resolve and the folder path must be added.
38+
- pipeline: sqlclient-ci-package
39+
source: sqlclient-ci-package
40+
trigger: true
41+
42+
# Pipeline parameters, visible in the Azure DevOps UI.
43+
parameters:
44+
45+
# The build configuration to use when building the test projects; defaults to Release.
46+
#
47+
# This should match the mode the driver packages we consume were built in - typically Release -
48+
# but may vary if we are triggered due to a manual build of sqlclient-ci-package.
49+
#
50+
- name: buildConfiguration
51+
displayName: Test Build Configuration
52+
type: string
53+
default: Release
54+
values:
55+
- Debug
56+
- Release
57+
58+
# True to emit debug information and steps.
59+
- name: debug
60+
displayName: Enable debug output
61+
type: boolean
62+
default: false
63+
64+
# Dotnet CLI verbosity level.
65+
- name: dotnetVerbosity
66+
displayName: dotnet CLI Verbosity
67+
type: string
68+
default: normal
69+
values:
70+
- quiet
71+
- minimal
72+
- normal
73+
- detailed
74+
- diagnostic
75+
76+
# The stages to run.
77+
stages:
78+
79+
# Run the Managed Instance tests. The .NET and .NET Framework runtimes are defaulted by the stage
80+
# template, which runs both native and managed SNI for .NET on Windows.
81+
- template: /eng/pipelines/ci/managed-instance/sqlclient-ci-managed-instance-stage.yml@self
82+
parameters:
83+
buildConfiguration: ${{ parameters.buildConfiguration }}
84+
debug: ${{ parameters.debug }}
85+
dotnetVerbosity: ${{ parameters.dotnetVerbosity }}

0 commit comments

Comments
 (0)