Skip to content

Commit 6ed4e1e

Browse files
committed
Merge branch 'master' of https://github.com/Azure/azure-sdk-for-python into analyze_redesign
* 'master' of https://github.com/Azure/azure-sdk-for-python: (32 commits) Adopt new MSAL auth code flow API (Azure#16449) [formrecognizer] use ARM template for tests (Azure#16432) T2 kusto 2021 02 04 (Azure#16527) T2 applicationinsights 2021 02 04 (Azure#16525) Sync eng/common directory with azure-sdk-tools for PR 1366 (Azure#16506) [Python] python track2 new pipeline fix (Azure#16494) Added package properties SDKType and NewSDK (Azure#16476) bump six dependencies in some libraries (Azure#16496) call on_error if timeout in flush (Azure#16485) Sync eng/common directory with azure-sdk-tools for PR 1365 (Azure#16505) Fix min dependency tests - update azure core (Azure#16504) Sync eng/common directory with azure-sdk-tools for PR 1364 (Azure#16503) Ma arch feedback (Azure#16502) Adding a new limitation to the README file. (Azure#16475) [Blob][Datalake] STG76 Preview (Azure#16349) append code coverage over each other (Azure#16202) Arch preview feedback (Azure#16441) Support CAE in azure-identity (Azure#16323) [EventHubs] Support for Custom endpoint adddress and custom certificate (Azure#16295) [Communication] - Phone Number Management - Added support for AAD auth (Azure#16075) ...
2 parents 20eee41 + db4892a commit 6ed4e1e

File tree

471 files changed

+38691
-17804
lines changed

Some content is hidden

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

471 files changed

+38691
-17804
lines changed

.coveragerc

+5
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ omit =
66
*/test*
77
env*
88

9+
[paths]
10+
source =
11+
sdk/
12+
**/sdk
13+
914
[report]
1015
exclude_lines =
1116
pragma: no cover

eng/ci_tools.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ cryptography==3.1
33
setuptools==44.1.0; python_version == '2.7'
44
setuptools==46.4.0; python_version >= '3.5'
55
virtualenv==20.0.23
6-
wheel==0.34.2
6+
wheel==0.34.2
77
Jinja2==2.11.2
88
packaging==20.4
99
tox==3.15.0
@@ -18,6 +18,7 @@ coverage==4.5.4
1818
codecov==2.1.0
1919
beautifulsoup4==4.9.1
2020
pkginfo==1.5.0.1
21+
pip==20.2
2122

2223
# locking packages defined as deps from azure-sdk-tools or azure-devtools
2324
pytoml==0.1.21

eng/common/docgeneration/Generate-DocIndex.ps1

+1-6
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,7 @@ function Get-TocMapping {
6565
$orderServiceMapping = @{}
6666

6767
foreach ($artifact in $artifacts) {
68-
$packageInfo = $metadata | ? {$_.Package -eq $artifact}
69-
70-
if ($packageInfo -and $packageInfo[0].Hide -eq 'true') {
71-
LogDebug "The artifact $artifact set 'Hide' to 'true'."
72-
continue
73-
}
68+
$packageInfo = $metadata | ? { $_.Package -eq $artifact -and $_.Hide -ne "true" }
7469
$serviceName = ""
7570
$displayName = ""
7671
if (!$packageInfo) {

eng/common/pipelines/templates/steps/cosmos-emulator.yml

+81-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,87 @@ steps:
99
Write-Host "Target Dir: $targetDir"
1010
msiexec /a ${{ parameters.EmulatorMsiUrl }} TARGETDIR=$targetDir /qn | wait-process
1111
displayName: Download and Extract Public Cosmos DB Emulator
12+
- powershell: |
13+
Write-Host "Deleting Cosmos DB Emulator data"
14+
if (Test-Path $Env:LOCALAPPDATA\CosmosDbEmulator) { Remove-Item -Recurse -Force $Env:LOCALAPPDATA\CosmosDbEmulator }
15+
displayName: Delete Cosmos DB Emulator data
16+
- powershell: |
17+
Write-Host "Getting Cosmos DB Emulator Version"
18+
$ProductName = "Azure Cosmos DB Emulator"
19+
$Emulator = (Join-Path $env:temp (Join-Path $ProductName "Microsoft.Azure.Cosmos.Emulator.exe"))
20+
$fileVersion = Get-ChildItem $Emulator
21+
Write-Host $Emulator $fileVersion.VersionInfo
22+
displayName: Get Cosmos DB Emulator Version
1223
- powershell: |
1324
Write-Host "Launching Cosmos DB Emulator"
14-
Import-Module "$env:temp\Azure Cosmos DB Emulator\PSModules\Microsoft.Azure.CosmosDB.Emulator"
15-
Start-CosmosDbEmulator -NoUI ${{ parameters.StartParameters }}
25+
$ProductName = "Azure Cosmos DB Emulator"
26+
$Emulator = (Join-Path $env:temp (Join-Path $ProductName "Microsoft.Azure.Cosmos.Emulator.exe"))
27+
if (!(Test-Path $Emulator)) {
28+
Write-Error "The emulator is not installed where expected at '$Emulator'"
29+
return
30+
}
31+
$process = Start-Process $Emulator -ArgumentList "/getstatus" -PassThru -Wait
32+
switch ($process.ExitCode) {
33+
1 {
34+
Write-Host "The emulator is already starting"
35+
return
36+
}
37+
2 {
38+
Write-Host "The emulator is already running"
39+
return
40+
}
41+
3 {
42+
Write-Host "The emulator is stopped"
43+
}
44+
default {
45+
Write-Host "Unrecognized exit code $process.ExitCode"
46+
return
47+
}
48+
}
49+
$argumentList = ""
50+
if (-not [string]::IsNullOrEmpty("${{ parameters.StartParameters }}")) {
51+
$argumentList += , "${{ parameters.StartParameters }}"
52+
} else {
53+
# Use the default params if none provided
54+
$argumentList = "/noexplorer /noui /enablepreview /disableratelimiting /enableaadauthentication"
55+
}
56+
Write-Host "Starting emulator process: $Emulator $argumentList"
57+
$process=Start-Process $Emulator -ArgumentList $argumentList -ErrorAction Stop -PassThru
58+
Write-Host "Emulator process started: $($process.Name), $($process.FileVersion)"
59+
$Timeout = 600
60+
$result="NotYetStarted"
61+
$complete = if ($Timeout -gt 0) {
62+
$start = [DateTimeOffset]::Now
63+
$stop = $start.AddSeconds($Timeout)
64+
{
65+
$result -eq "Running" -or [DateTimeOffset]::Now -ge $stop
66+
}
67+
}
68+
else {
69+
{
70+
$result -eq "Running"
71+
}
72+
}
73+
do {
74+
$process = Start-Process $Emulator -ArgumentList "/getstatus" -PassThru -Wait
75+
switch ($process.ExitCode) {
76+
1 {
77+
Write-Host "The emulator is starting"
78+
}
79+
2 {
80+
Write-Host "The emulator is running"
81+
$result="Running"
82+
return
83+
}
84+
3 {
85+
Write-Host "The emulator is stopped"
86+
}
87+
default {
88+
Write-Host "Unrecognized exit code $process.ExitCode"
89+
}
90+
}
91+
Start-Sleep -Seconds 5
92+
}
93+
until ($complete.Invoke())
94+
Write-Error "The emulator failed to reach Running status within ${Timeout} seconds"
1695
displayName: Start Cosmos DB Emulator

eng/common/scripts/Create-APIReview.ps1

+7-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ Param (
88
[string] $APIKey,
99
[Parameter(Mandatory=$True)]
1010
[string] $APILabel,
11-
[string] $PackageName = ""
11+
[string] $PackageName,
12+
[string] $ConfigFileDir = ""
1213
)
1314

1415

@@ -82,17 +83,19 @@ else
8283
}
8384

8485
$FoundFailure = $False
85-
$pkgInfoPath = Join-Path -Path $ArtifactPath "PackageInfo"
86+
if (-not $ConfigFileDir)
87+
{
88+
$ConfigFileDir = Join-Path -Path $ArtifactPath "PackageInfo"
89+
}
8690
foreach ($pkgName in $responses.Keys)
8791
{
8892
$respCode = $responses[$pkgName]
8993
if ($respCode -ne '200')
9094
{
91-
$pkgPropPath = Join-Path -Path $pkgInfoPath ($PackageName + ".json")
95+
$pkgPropPath = Join-Path -Path $ConfigFileDir "$PackageName.json"
9296
if (-Not (Test-Path $pkgPropPath))
9397
{
9498
Write-Host " Package property file path $($pkgPropPath) is invalid."
95-
$FoundFailure = $True
9699
}
97100
else
98101
{

eng/common/scripts/Save-Package-Properties.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ if ($allPackageProperties)
1313
New-Item -ItemType Directory -Force -Path $outDirectory
1414
foreach($pkg in $allPackageProperties)
1515
{
16-
if ($pkg.IsNewSDK)
16+
if ($pkg.IsNewSdk)
1717
{
1818
Write-Host "Package Name: $($pkg.Name)"
1919
Write-Host "Package Version: $($pkg.Version)"

eng/pipelines/templates/jobs/archetype-sdk-client.yml

+12-12
Original file line numberDiff line numberDiff line change
@@ -39,31 +39,31 @@ parameters:
3939
Pool: $(LinuxPool)
4040
OSVmImage:
4141
PythonVersion: '2.7'
42-
CoverageArg: ''
42+
CoverageArg: '--disablecov'
4343
RunForPR: true
4444
Linux_Python35:
4545
Pool: $(LinuxPool)
4646
OSVmImage:
4747
PythonVersion: '3.5'
48-
CoverageArg: ''
48+
CoverageArg: '--disablecov'
4949
RunForPR: false
5050
Linux_Python38:
5151
Pool: $(LinuxPool)
5252
OSVmImage:
5353
PythonVersion: '3.8'
54-
CoverageArg: ''
54+
CoverageArg: '--disablecov'
5555
RunForPR: true
5656
Windows_Python35:
5757
Pool: $(WindowsPool)
5858
OSVmImage:
5959
PythonVersion: '3.5'
60-
CoverageArg: ''
60+
CoverageArg: '--disablecov'
6161
RunForPR: true
6262
MacOS_Python27:
6363
Pool:
6464
OSVmImage: 'macOS-10.15'
6565
PythonVersion: '2.7'
66-
CoverageArg: ''
66+
CoverageArg: '--disablecov'
6767
RunForPR: false
6868
Linux_pypy3:
6969
Pool: $(LinuxPool)
@@ -100,7 +100,7 @@ jobs:
100100

101101
steps:
102102
- template: ../steps/build-artifacts.yml
103-
parameters:
103+
parameters:
104104
ServiceDirectory: ${{ parameters.ServiceDirectory }}
105105
BuildTargetingString: ${{ parameters.BuildTargetingString }}
106106
BeforePublishSteps: ${{ parameters.BeforePublishSteps }}
@@ -133,7 +133,7 @@ jobs:
133133
CheckLinkGuidance: $true
134134

135135
- template: ../steps/analyze.yml
136-
parameters:
136+
parameters:
137137
ServiceDirectory: ${{ parameters.ServiceDirectory }}
138138
BuildTargetingString: ${{ parameters.BuildTargetingString }}
139139
TestMarkArgument: ${{ parameters.TestMarkArgument }}
@@ -168,7 +168,7 @@ jobs:
168168
${{ if or(eq(matrixEntry.value.RunForPR, 'true'), ne(variables['Build.Reason'], 'PullRequest')) }}:
169169
${{ matrixEntry.key }}:
170170
${{ insert }}: ${{ matrixEntry.value }}
171-
171+
172172
pool:
173173
name: $[coalesce(variables['Pool'], '')]
174174
vmImage: $[coalesce(variables['OSVmImage'], '')]
@@ -195,7 +195,7 @@ jobs:
195195
{
196196
$toxenvvar = '$(Run.ToxCustomEnvs)'
197197
}
198-
198+
199199
echo "##vso[task.setvariable variable=toxenv]$toxenvvar"
200200
displayName: "Set Tox Environment"
201201
@@ -211,10 +211,10 @@ jobs:
211211
ToxTestEnv: $(toxenv)
212212
ToxEnvParallel: ${{ parameters.ToxEnvParallel }}
213213
InjectedPackages: $(InjectedPackages)
214-
BeforeTestSteps:
214+
BeforeTestSteps:
215215
- task: DownloadPipelineArtifact@0
216216
inputs:
217-
artifactName: 'artifacts'
217+
artifactName: 'artifacts'
218218
targetPath: $(Build.ArtifactStagingDirectory)
219219

220220
- template: ../steps/set-dev-build.yml
@@ -237,6 +237,6 @@ jobs:
237237

238238
steps:
239239
- template: ../steps/test_regression.yml
240-
parameters:
240+
parameters:
241241
ServiceDirectory: ${{ parameters.ServiceDirectory }}
242242
BuildTargetingString: ${{ parameters.BuildTargetingString }}

0 commit comments

Comments
 (0)