Skip to content

Commit 855e63c

Browse files
committed
Merge branch 'main' of https://github.com/dotnet/SqlClient into dev/samsharma2700/sqlbulkcopy_metadata_optimization
2 parents 638a2ab + cac3b1a commit 855e63c

34 files changed

Lines changed: 549 additions & 605 deletions

.github/workflows/codeql.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ on:
2121

2222
jobs:
2323
analyze:
24+
if: github.event.repository.fork == false
2425
name: Analyze (${{ matrix.language }})
2526
# Runner size impacts CodeQL analysis time. To learn more, please see:
2627
# - https://gh.io/recommended-hardware-resources-for-running-codeql

.github/workflows/stale.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ permissions:
1414
jobs:
1515
close-stale:
1616
runs-on: ubuntu-latest
17+
if: github.event.repository.fork == false
1718
name: Close stale Issues and PRs
1819

1920
steps:

build.proj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@
9191
<ManualTests Include="**/tools/TDS/TDS.EndPoint/TDS.EndPoint.csproj" />
9292
<ManualTests Include="**/tools/TDS/TDS.Servers/TDS.Servers.csproj" />
9393
<ManualTests Include="**/CustomConfigurableRetryLogic/CustomRetryLogicProvider.csproj" />
94-
<ManualTests Include="**/ManualTests/Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" />
95-
<ManualTestsProj Include="**/ManualTests/Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" />
94+
<ManualTests Include="**/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj" />
95+
<ManualTestsProj Include="**/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj" />
9696
</ItemGroup>
9797

9898
<!-- Top Level Build targets -->

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

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
displayName: 'Build Signed MDS Package'
2424
pool:
2525
type: windows # read more about custom job pool types at https://aka.ms/obpipelines/yaml/jobs
26-
26+
2727
variables:
2828
- template: /eng/pipelines/libraries/variables.yml@self
2929
- ${{ if parameters.isPreview }}:
@@ -38,22 +38,25 @@ jobs:
3838
Write-Host "##vso[task.setvariable variable=CDP_BUILD_TYPE_COPY;isOutput=true]$($env:CDP_BUILD_TYPE)"
3939
name: GetBuildType
4040
41+
# Install the .NET SDK.
42+
- template: /eng/pipelines/steps/install-dotnet.yml@self
43+
4144
# Build our tooling, which is required by the analysis step below, but
4245
# shouldn't be analyzed itself.
4346
- task: MSBuild@1
4447
displayName: 'Build Tooling'
4548
inputs:
4649
solution: '**/build.proj'
47-
configuration: $(Configuration)
50+
configuration: Release
4851
msbuildArguments: -t:BuildTools
4952

5053
# Perform analysis before building, since this step will clobber build output.
5154
- template: /eng/pipelines/common/templates/steps/code-analyze-step.yml@self
52-
55+
5356
# Build MDS in Package mode, producing signed DLLs.
5457
- template: /eng/pipelines/common/templates/steps/build-all-configurations-signed-dlls-step.yml@self
5558
parameters:
56-
buildConfiguration: $(Configuration)
59+
buildConfiguration: Release
5760
# These variables are sourced from common-variables.yml.
5861
mdsAssemblyFileVersion: $(mdsAssemblyFileVersion)
5962
mdsPackageVersion: $(mdsPackageVersion)
@@ -62,7 +65,7 @@ jobs:
6265
- template: /eng/pipelines/common/templates/steps/esrp-code-signing-step.yml@self
6366
parameters:
6467
artifactType: dll
65-
68+
6669
- template: /eng/pipelines/common/templates/steps/generate-nuget-package-step.yml@self
6770
parameters:
6871
buildConfiguration: Release
@@ -72,11 +75,11 @@ jobs:
7275
outputDirectory: $(artifactDirectory)
7376
packageVersion: $(mdsPackageVersion)
7477
referenceType: Package
75-
78+
7679
- template: /eng/pipelines/common/templates/steps/esrp-code-signing-step.yml@self
7780
parameters:
7881
artifactType: pkg
79-
82+
8083
- template: /eng/pipelines/common/templates/steps/copy-dlls-for-test-step.yml@self
8184
parameters:
8285
buildConfiguration: Release

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

Lines changed: 22 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ jobs:
3838
isCustom: true
3939
name: ADO-1ES-Pool
4040
vmImage: 'ADO-MMS22-SQL19'
41-
41+
4242
variables: # More settings at https://aka.ms/obpipelines/yaml/jobs
4343
- template: /eng/pipelines/libraries/mds-validation-variables.yml@self
44-
44+
4545
- name: pathToDownloadedNuget # path to the downloaded nuget files
4646
value: $(Pipeline.Workspace)\${{parameters.packageFolderName }}
47-
47+
4848
- name: BuildType
4949
value: $[ stageDependencies.buildMDS.build_signed_package.outputs['GetBuildType.CDP_BUILD_TYPE_COPY'] ]
5050

@@ -61,21 +61,10 @@ jobs:
6161
- task: NuGetToolInstaller@1
6262
displayName: 'Use NuGet'
6363

64-
- powershell: |
65-
# Sets the pipeline ASSEMBLY_VERSION variable.
66-
67-
[Xml] $versionprops = Get-Content -Path ".\tools\props\Versions.props"
68-
Write-Host $versionprops.Project.PropertyGroup[0].AssemblyFileVersion
69-
70-
$AssemblyVersion = $versionprops.Project.PropertyGroup[0].AssemblyVersion
71-
72-
Write-Host "##vso[task.setvariable variable=ASSEMBLY_VERSION;]$AssemblyVersion"
73-
displayName: 'Update assembly version property'
74-
7564
- powershell: |
7665
# Displays the paths of all the local cache directories
7766
nuget locals all -List
78-
67+
7968
#Clears all files from all local cache directories
8069
nuget locals all -Clear
8170
displayName: 'Clear local cache'
@@ -99,7 +88,7 @@ jobs:
9988
Write-Host "--------------------------------------------------"
10089
Write-Host "This will verify the artifact signature" -ForegroundColor Green
10190
Write-Host "--------------------------------------------------"
102-
91+
10392
if ($packageType -eq 'dll' -or $packageType -eq 'both')
10493
{
10594
nuget verify -All $(pathToDownloadedNuget)\*.nupkg
@@ -111,15 +100,15 @@ jobs:
111100
displayName: 'Verify nuget signature'
112101
113102
- powershell: |
114-
$buildType = [string]"$(BuildType)"
103+
$buildType = [string]"$(BuildType)"
115104
116105
if($buildType -eq 'Official')
117106
{
118107
# Recursively find all .dll files in TempFolder (installed nuget folder)
119108
# Microsoft.Data.SqlClient.dll and Microsoft.Data.SqlClient.resources.dll (in localized folders) should have strong name
120109
$dllFiles = Get-ChildItem -Path $(TempFolderName) -Recurse -Filter *.dll
121110
$badDlls = @()
122-
foreach ($file in $dllFiles)
111+
foreach ($file in $dllFiles)
123112
{
124113
# Run sn.k to verify the strong name on each dll
125114
$result = & "C:\Program Files (x86)\Microsoft SDKs\Windows\*\bin\NETFX 4.8.1 Tools\sn.exe" -vf $file.FullName
@@ -137,7 +126,7 @@ jobs:
137126
foreach($dll in $badDlls)
138127
{
139128
Write-Output $dll
140-
}
129+
}
141130
Exit -1
142131
}
143132
Write-Host "Strong name has been verified for all dlls"
@@ -179,7 +168,7 @@ jobs:
179168
}
180169
}
181170
}
182-
171+
183172
elseif ($_.Name -eq 'runtimes'){
184173
Get-ChildItem -Depth 3 -Path $_.FullName -Exclude $excludNamesFromRuntimeFolder -Directory | foreach{
185174
if('$(expectedDotnetVersions)'.Contains($_.Name)){
@@ -211,15 +200,15 @@ jobs:
211200
212201
- powershell: |
213202
# list all the child items of created temp folder
214-
203+
215204
#Verify all DLLs unzipped match "expected" hierarchy
216-
205+
217206
foreach( $folderName in (Get-ChildItem -Path $(extractedNugetPath) -Directory).Name)
218207
{
219208
# List all Childerns of the Path
220-
Get-ChildItem -Path $(extractedNugetPath)\$folderName -Recurse -File
221-
$subFiles = Get-ChildItem -Path $(extractedNugetPath)\$folderName -Recurse -File
222-
209+
Get-ChildItem -Path $(extractedNugetPath)\$folderName -Recurse -File
210+
$subFiles = Get-ChildItem -Path $(extractedNugetPath)\$folderName -Recurse -File
211+
223212
foreach($file in $subFiles)
224213
{
225214
if($subFiles[0].Name -like "*.dll" )
@@ -238,7 +227,7 @@ jobs:
238227
Write-Host "Expected file pattern for localization did not match to *.dll" -ForegroundColor Red
239228
Exit -1
240229
}
241-
}
230+
}
242231
}
243232
else
244233
{
@@ -252,7 +241,7 @@ jobs:
252241
displayName: 'Verify all DLLs unzipped match "expected" hierarchy'
253242
- powershell: |
254243
# Verify all dlls status are Valid
255-
244+
256245
$dlls = Get-ChildItem -Path $(extractedNugetPath) -Recurse -Include *.dll
257246
foreach ($status in $dlls | Get-AuthenticodeSignature)
258247
{
@@ -274,18 +263,18 @@ jobs:
274263
# expected values.
275264
$failed = 0
276265
277-
foreach ( $pVersion in Get-ChildItem *.dll -Path $(extractedNugetPath) -Recurse | ForEach-Object versioninfo )
266+
foreach ( $pVersion in Get-ChildItem *.dll -Path $(extractedNugetPath) -Recurse | ForEach-Object versioninfo )
278267
{
279268
if ($pVersion.ProductVersion -Like '$(mdsPackageVersion)*')
280269
{
281270
Write-Host -ForegroundColor Green "Correct ProductVersion detected for $($pVersion.FileName): $($pVersion.ProductVersion)"
282271
}
283272
else
284-
{
273+
{
285274
Write-Host -ForegroundColor Red "Wrong ProductVersion detected for $($pVersion.FileName); expected: $(mdsPackageVersion); found: $($pVersion.ProductVersion)"
286275
$failed = 1
287276
}
288-
277+
289278
if ($pVersion.FileVersion -eq '$(mdsAssemblyFileVersion)')
290279
{
291280
Write-Host -ForegroundColor Green "Correct FileVersion detected for $($pVersion.FileName): $($pVersion.FileVersion)"
@@ -296,7 +285,7 @@ jobs:
296285
$failed = 1
297286
}
298287
}
299-
288+
300289
if ($failed -ne 0)
301290
{
302291
Exit -1
@@ -314,10 +303,10 @@ jobs:
314303
# TODO: This also isn't checking the versions of the actual assemblies in
315304
# the package, so it isn't terribly useful.
316305
317-
[Xml] $versionprops = Get-Content -Path "tools/props/Versions.props"
306+
[Xml] $versionprops = Get-Content -Path "tools/props/Versions.props"
318307
$AssemblyFileVersion = $versionprops.Project.PropertyGroup[2].AssemblyFileVersion
319308
$AssemblyVersion = $versionprops.Project.PropertyGroup[2].AssemblyVersion
320-
309+
321310
if($AssemblyFileVersion -eq $AssemblyVersion)
322311
{
323312
Write-Host AssemblyFileVersion: $AssemblyFileVersion should not be equal to: $AssemblyVersion

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,5 @@ steps:
4343
-p:ReferenceType=${{ parameters.referenceType }}
4444
-p:GenerateNuget=false
4545
-p:SigningKeyPath=$(Agent.TempDirectory)\netfxKeypair.snk
46-
-p:MdsAssemblyFileVersion=${{ parameters.mdsAssemblyFileVersion }}
46+
-p:AssemblyFileVersion=${{ parameters.mdsAssemblyFileVersion }}
4747
-p:MdsPackageVersion=${{ parameters.mdsPackageVersion }}

eng/pipelines/dotnet-sqlclient-signing-pipeline.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,15 @@ parameters: # parameters are shown up in ADO UI in a build queue time
7474

7575
variables:
7676
- template: /eng/pipelines/libraries/variables.yml@self
77-
- name: packageFolderName
78-
value: packages
77+
- name: mdsArtifactName
78+
value: drop_buildMDS_build_signed_package
7979
- name: PublishSymbols
8080
value: ${{ parameters['publishSymbols'] }}
8181
- name: CurrentNetFxVersion
8282
value: ${{ parameters['CurrentNetFxVersion'] }}
8383

8484
resources:
85-
repositories:
85+
repositories:
8686
- repository: templates
8787
type: git
8888
name: OneBranch.Pipelines/GovernedTemplates
@@ -124,7 +124,7 @@ extends:
124124
break: true # always break the build on policheck issues. You can disable it by setting to 'false'
125125
exclusionsFile: $(REPOROOT)\.config\PolicheckExclusions.xml
126126
asyncSdl:
127-
enabled: false
127+
enabled: false
128128
credscan:
129129
enabled: ${{ not(parameters['isPreview']) }}
130130
suppressionsFile: $(REPOROOT)/.config/CredScanSuppressions.json
@@ -159,11 +159,11 @@ extends:
159159
jobs:
160160
- template: /eng/pipelines/common/templates/jobs/validate-signed-package-job.yml@self
161161
parameters:
162-
packageFolderName: $(packageFolderName)
162+
packageFolderName: $(mdsArtifactName)
163163
isPreview: ${{ parameters['isPreview'] }}
164164
downloadPackageStep:
165165
download: current
166-
artifact: $(packageFolderName)
166+
artifact: $(mdsArtifactName)
167167
patterns: '**/*.*nupkg'
168168
displayName: 'Download NuGet Package'
169169

@@ -174,6 +174,6 @@ extends:
174174
# timeout: ${{ parameters.testJobTimeout }}
175175
# downloadPackageStep:
176176
# download: current
177-
# artifact: $(packageFolderName)
177+
# artifact: $(mdsArtifactName)
178178
# patterns: '**/*.nupkg'
179179
# displayName: 'Download NuGet Package'

eng/pipelines/libraries/build-variables.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
# This file is only included in MDS OneBranch Official pipelines.
88

99
variables:
10+
- group: Release Variables
1011
- template: /eng/pipelines/libraries/common-variables.yml@self
11-
- template: /eng/pipelines/libraries/mds-variables.yml@self

eng/pipelines/libraries/common-variables.yml

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ variables:
1717
# AuthSignCertName
1818

1919
- name: CommitHead
20-
value: '' # the value will be extracted from the repo's head
20+
value: '' # the value will be extracted from the repo's head
2121
- name: REPOROOT
2222
value: $(Build.SourcesDirectory)
2323
- name: softwareFolder
@@ -47,39 +47,34 @@ variables:
4747
# The NuGet package version for GA releases (non-preview).
4848
- name: abstractionsPackageVersion
4949
value: '1.0.0'
50-
50+
5151
# The NuGet package version for preview releases.
5252
- name: abstractionsPackagePreviewVersion
5353
value: 1.0.0-preview1.$(Build.BuildNumber)
5454

5555
# The AssemblyFileVersion for all assemblies in the Abstractions package.
56-
#
5756
- name: abstractionsAssemblyFileVersion
5857
value: 1.0.0.$(assemblyBuildNumber)
59-
58+
6059
# ----------------------------------------------------------------------------
6160
# MDS Package Versions
61+
#
62+
# These are version values that will be used by the official build. They
63+
# should be updated after each release to reflect the next release's versions.
6264

63-
# Update this after every release. This is used to generate the MDS NuGet package version.
64-
- name: Major
65-
value: '7'
66-
- name: Minor
67-
value: '0'
68-
- name: Patch
69-
value: '0'
70-
71-
# Update this for preview releases.
72-
- name: Preview
73-
value: '-preview'
74-
- name: Revision
75-
value: '3'
76-
65+
# The NuGet package version for GA releases (non-preview).
7766
- name: mdsPackageVersion
78-
value: $(Major).$(Minor).$(Patch)
67+
value: '7.0.0'
68+
69+
# The NuGet package version for preview releases.
7970
- name: previewMdsPackageVersion
80-
value: $(Major).$(Minor).$(Patch)$(Preview)$(Revision).$(Build.BuildNumber)
71+
value: 7.0.0-preview4.$(Build.BuildNumber)
72+
73+
# The AssemblyFileVersion for all assemblies in the MDS package.
8174
- name: mdsAssemblyFileVersion
82-
value: $(Major).$(Minor).$(Patch).$(assemblyBuildNumber)
75+
value: 7.0.0.$(assemblyBuildNumber)
76+
77+
# The path to the NuGet packaging specification file used to generate the MDS NuGet package.
8378
- name: nuspecPath
8479
value: '$(REPOROOT)/tools/specs/Microsoft.Data.SqlClient.nuspec'
8580

@@ -92,12 +87,11 @@ variables:
9287
# The NuGet package version for GA releases (non-preview).
9388
- name: azurePackageVersion
9489
value: '1.0.0'
95-
90+
9691
# The NuGet package version for preview releases.
9792
- name: azurePackagePreviewVersion
9893
value: 1.0.0-preview1.$(Build.BuildNumber)
9994

10095
# The AssemblyFileVersion for all assemblies in the Azure package.
101-
#
10296
- name: azureAssemblyFileVersion
10397
value: 1.0.0.$(assemblyBuildNumber)

0 commit comments

Comments
 (0)