Skip to content

Commit 71866ae

Browse files
committed
Merge branch 'master' of https://github.com/Azure/azure-sdk-for-python into make_canary_test
* 'master' of https://github.com/Azure/azure-sdk-for-python: (28 commits) Kaihuis maps (Azure#11574) [formrecognizer] support Copy API (Azure#11372) Artifact Powered Docs.MS Release (Azure#11395) Sync eng/common directory with azure-sdk-tools repository (Azure#11562) Updated changelog (Azure#11554) update pinned versions in autorest_req.txt (Azure#11557) Add user authentication API to UsernamePasswordCredential (Azure#11528) Reduce Build Matrix (Azure#11539) Prevent Key Vault test failure due to operation timing (Azure#11552) update tests (Azure#11534) Datashare 2019 11 01 (Azure#11540) Search Renames / Regen (Azure#11342) update unit test according to the latest uamqp update (Azure#11533) Sync eng/common directory with azure-sdk-tools repository (Azure#11472) rename input parameters (Azure#11518) [cosmos] readme review feedback (Azure#11527) Update CODEOWNERS (Azure#11516) [Core] Support multipart changesets (Azure#10972) fix AttributeException (Azure#11463) release-for-hanaonazure-mgmt (Azure#11441) ...
2 parents b09dced + b22a709 commit 71866ae

File tree

227 files changed

+13463
-7958
lines changed

Some content is hidden

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

227 files changed

+13463
-7958
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
# Core
1212
/sdk/core/ @lmazuel @xiangyan99 @johanste
13-
/sdk/core/azure-core/ @xiangyan99 @bryevdv @lmazuel
13+
/sdk/core/azure-core/ @xiangyan99 @lmazuel
1414

1515
# Service team
1616
/sdk/identity/ @chlowell @schaabs

common/smoketest/smoke-test.yml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,58 +9,58 @@ jobs:
99
PythonVersion: '2.7'
1010
InstallAsyncRequirements: false
1111
OSVmImage: ubuntu-18.04
12-
CloudType: AzureCloud
12+
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
1313
ArmTemplateParameters: $(azureCloudArmParameters)
1414
Python_37_Linux (AzureCloud):
1515
PythonVersion: '3.7'
1616
OSVmImage: ubuntu-18.04
17-
CloudType: AzureCloud
17+
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
1818
ArmTemplateParameters: $(azureCloudArmParameters)
1919
Python_38_Linux (AzureCloud):
2020
PythonVersion: '3.8'
2121
OSVmImage: ubuntu-18.04
22-
CloudType: AzureCloud
22+
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
2323
ArmTemplateParameters: $(azureCloudArmParameters)
2424
Python_37_Windows (AzureCloud):
2525
PythonVersion: '3.7'
2626
OSVmImage: windows-2019
27-
CloudType: AzureCloud
27+
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
2828
ArmTemplateParameters: $(azureCloudArmParameters)
2929
Python_38_Windows (AzureCloud):
3030
PythonVersion: '3.8'
3131
OSVmImage: windows-2019
32-
CloudType: AzureCloud
32+
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
3333
ArmTemplateParameters: $(azureCloudArmParameters)
3434
Python_37_Mac (AzureCloud):
3535
PythonVersion: '3.7'
3636
OSVmImage: macOS-10.15
37-
CloudType: AzureCloud
37+
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
3838
ArmTemplateParameters: $(azureCloudArmParameters)
3939
Python_38_Mac (AzureCloud):
4040
PythonVersion: '3.8'
4141
OSVmImage: macOS-10.15
42-
CloudType: AzureCloud
42+
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
4343
ArmTemplateParameters: $(azureCloudArmParameters)
4444
Python_38_Linux (AzureUSGovernment):
4545
PythonVersion: '3.8'
4646
OSVmImage: ubuntu-18.04
47-
CloudType: AzureUSGovernment
47+
SubscriptionConfiguration: $(sub-config-gov-test-resources)
4848
ArmTemplateParameters: $(azureUSGovernmentArmParameters)
4949
Python_37_Windows (AzureUSGovernment):
5050
PythonVersion: '3.7'
5151
OSVmImage: windows-2019
52-
CloudType: AzureUSGovernment
52+
SubscriptionConfiguration: $(sub-config-gov-test-resources)
5353
ArmTemplateParameters: $(azureUSGovernmentArmParameters)
5454
Python_38_Linux (AzureChinaCloud):
5555
PythonVersion: '3.8'
5656
OSVmImage: ubuntu-18.04
57-
CloudType: AzureChinaCloud
57+
SubscriptionConfiguration: $(sub-config-cn-test-resources)
5858
Location: 'chinanorth'
5959
ArmTemplateParameters: $(azureChinaCloudArmParameters)
6060
Python_37_Windows (AzureChinaCloud):
6161
PythonVersion: '3.7'
6262
OSVmImage: windows-2019
63-
CloudType: AzureChinaCloud
63+
SubscriptionConfiguration: $(sub-config-cn-test-resources)
6464
Location: 'chinanorth'
6565
ArmTemplateParameters: $(azureChinaCloudArmParameters)
6666

@@ -103,7 +103,7 @@ jobs:
103103
- template: /eng/common/TestResources/deploy-test-resources.yml
104104
parameters:
105105
ServiceDirectory: '$(Build.SourcesDirectory)/common/smoketest/'
106-
CloudType: $(CloudType)
106+
SubscriptionConfiguration: $(SubscriptionConfiguration)
107107
Location: $(Location)
108108
ArmTemplateParameters: $(ArmTemplateParameters)
109109

@@ -113,3 +113,5 @@ jobs:
113113
- template: /eng/common/TestResources/remove-test-resources.yml
114114
parameters:
115115
ServiceDirectory: '$(Build.SourcesDirectory)/common/smoketest/'
116+
SubscriptionConfiguration: $(SubscriptionConfiguration)
117+

eng/autorest_req.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
pytest==5.4.1; python_version >= '3.5'
1+
pytest==5.4.2; python_version >= '3.5'
22
pytest==4.6.9; python_version == '2.7'
33
pytest-cov==2.8.1
4-
pytest-asyncio==0.10.0; python_version >= '3.5'
4+
pytest-asyncio==0.12.0; python_version >= '3.5'
55
isodate==0.6.0
6-
msrest==0.6.13
6+
msrest==0.6.14
77
aiohttp==3.6.2
8-
wheel
8+
wheel==0.34.2

eng/common/TestResources/remove-test-resources.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,5 @@ steps:
3232
-Force `
3333
-Verbose
3434
displayName: Remove test resources
35+
condition: and(ne(variables['AZURE_RESOURCEGROUP_NAME'], ''), succeededOrFailed())
3536
continueOnError: true

eng/common/pipelines/templates/steps/docs-metadata-release.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,4 @@ steps:
5555
PRTitle: "Docs.MS Readme Update."
5656
BaseBranchName: smoke-test
5757
WorkingDirectory: ${{parameters.WorkingDirectory}}/repo
58-
ScriptDirectory: ${{parameters.WorkingDirectory}}/${{parameters.ScriptDirectory}}
59-
60-
61-
58+
ScriptDirectory: ${{parameters.WorkingDirectory}}/${{parameters.ScriptDirectory}}

eng/common/scripts/artifact-metadata-parsing.ps1

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ function GetExistingTags($apiUrl) {
358358
}
359359

360360
# Walk across all build artifacts, check them against the appropriate repository, return a list of tags/releases
361-
function VerifyPackages($pkgRepository, $artifactLocation, $workingDirectory, $apiUrl, $releaseSha, $exitOnError = $True) {
361+
function VerifyPackages($pkgRepository, $artifactLocation, $workingDirectory, $apiUrl, $releaseSha, $continueOnError = $false) {
362362
$pkgList = [array]@()
363363
$ParsePkgInfoFn = ""
364364
$packagePattern = ""
@@ -404,7 +404,7 @@ function VerifyPackages($pkgRepository, $artifactLocation, $workingDirectory, $a
404404
continue
405405
}
406406

407-
if ($parsedPackage.Deployable -ne $True -and $exitOnError) {
407+
if ($parsedPackage.Deployable -ne $True -and !$continueOnError) {
408408
Write-Host "Package $($parsedPackage.PackageId) is marked with version $($parsedPackage.PackageVersion), the version $($parsedPackage.PackageVersion) has already been deployed to the target repository."
409409
Write-Host "Maybe a pkg version wasn't updated properly?"
410410
exit(1)
@@ -430,8 +430,8 @@ function VerifyPackages($pkgRepository, $artifactLocation, $workingDirectory, $a
430430

431431
$intersect = $results | % { $_.Tag } | ? { $existingTags -contains $_ }
432432

433-
if ($intersect.Length -gt 0 -and $exitOnError) {
434-
CheckArtifactShaAgainstTagsList -priorExistingTagList $intersect -releaseSha $releaseSha -apiUrl $apiUrl -exitOnError $exitOnError
433+
if ($intersect.Length -gt 0 -and !$continueOnError) {
434+
CheckArtifactShaAgainstTagsList -priorExistingTagList $intersect -releaseSha $releaseSha -apiUrl $apiUrl -continueOnError $continueOnError
435435

436436
# all the tags are clean. remove them from the list of releases we will publish.
437437
$results = $results | ? { -not ($intersect -contains $_.Tag ) }
@@ -443,7 +443,7 @@ function VerifyPackages($pkgRepository, $artifactLocation, $workingDirectory, $a
443443
# given a set of tags that we want to release, we need to ensure that if they already DO exist.
444444
# if they DO exist, quietly exit if the commit sha of the artifact matches that of the tag
445445
# if the commit sha does not match, exit with error and report both problem shas
446-
function CheckArtifactShaAgainstTagsList($priorExistingTagList, $releaseSha, $apiUrl, $exitOnError) {
446+
function CheckArtifactShaAgainstTagsList($priorExistingTagList, $releaseSha, $apiUrl, $continueOnError) {
447447
$headers = @{
448448
"Content-Type" = "application/json"
449449
"Authorization" = "token $($env:GH_TOKEN)"
@@ -465,7 +465,7 @@ function CheckArtifactShaAgainstTagsList($priorExistingTagList, $releaseSha, $ap
465465
}
466466
}
467467

468-
if ($unmatchedTags.Length -gt 0 -and $exitOnError) {
468+
if ($unmatchedTags.Length -gt 0 -and !$continueOnError) {
469469
Write-Host "Tags already existing with different SHA versions. Exiting."
470470
exit(1)
471471
}

eng/common/scripts/create-tags-and-git-release.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ param (
1515
$repoOwner = "", # the owning organization of the repository. EG "Azure"
1616
$repoName = "", # the name of the repository. EG "azure-sdk-for-java"
1717
$repoId = "$repoOwner/$repoName", # full repo id. EG azure/azure-sdk-for-net DevOps: $(Build.Repository.Id),
18-
[switch]$forceCreate = $false
18+
[switch]$continueOnError = $false
1919
)
2020

2121
Write-Host "> $PSCommandPath $args"
@@ -26,7 +26,7 @@ $apiUrl = "https://api.github.com/repos/$repoId"
2626
Write-Host "Using API URL $apiUrl"
2727

2828
# VERIFY PACKAGES
29-
$pkgList = VerifyPackages -pkgRepository $packageRepository -artifactLocation $artifactLocation -workingDirectory $workingDirectory -apiUrl $apiUrl -releaseSha $releaseSha
29+
$pkgList = VerifyPackages -pkgRepository $packageRepository -artifactLocation $artifactLocation -workingDirectory $workingDirectory -apiUrl $apiUrl -releaseSha $releaseSha -continueOnError $continueOnError
3030

3131
if ($pkgList) {
3232
Write-Host "Given the visible artifacts, github releases will be created for the following:"

eng/common/scripts/update-docs-metadata.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ $pkgs = VerifyPackages -pkgRepository $Repository `
8686
-workingDirectory $WorkDirectory `
8787
-apiUrl $apiUrl `
8888
-releaseSha $ReleaseSHA `
89-
-exitOnError $False
89+
-continueOnError $True
9090

9191
if ($pkgs) {
9292
Write-Host "Given the visible artifacts, readmes will be copied for the following packages"

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

Lines changed: 1 addition & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,6 @@ parameters:
2020
PythonVersion: '3.5'
2121
CoverageArg: ''
2222
RunForPR: false
23-
Linux_Python36:
24-
OSName: 'Linux'
25-
OSVmImage: 'ubuntu-18.04'
26-
PythonVersion: '3.6'
27-
CoverageArg: ''
28-
RunForPR: false
29-
Linux_Python37:
30-
OSName: 'Linux'
31-
OSVmImage: 'ubuntu-18.04'
32-
PythonVersion: '3.7'
33-
CoverageArg: ''
34-
RunForPR: false
3523
Linux_Python38:
3624
OSName: 'Linux'
3725
OSVmImage: 'ubuntu-18.04'
@@ -90,6 +78,7 @@ jobs:
9078
parameters:
9179
ServiceDirectory: ${{ parameters.ServiceDirectory }}
9280
BuildTargetingString: ${{ parameters.BuildTargetingString }}
81+
TestMarkArgument: ${{ parameters.TestMarkArgument }}
9382

9483
- job: 'Test'
9584
condition: and(succeededOrFailed(), ne(variables['Skip.Test'], 'true'))
@@ -146,44 +135,6 @@ jobs:
146135
ServiceDirectory: ${{ parameters.ServiceDirectory }}
147136
BuildTargetingString: ${{ parameters.BuildTargetingString }}
148137

149-
- job: 'RunMyPy'
150-
condition: and(succeededOrFailed(), ne(variables['Skip.MyPy'], 'true'))
151-
displayName: 'Run MyPy'
152-
variables:
153-
- template: ../variables/globals.yml
154-
155-
dependsOn:
156-
- 'Build'
157-
158-
pool:
159-
vmImage: 'ubuntu-18.04'
160-
161-
steps:
162-
- template: ../steps/run_mypy.yml
163-
parameters:
164-
ServiceDirectory: ${{ parameters.ServiceDirectory }}
165-
BuildTargetingString: ${{ parameters.BuildTargetingString }}
166-
TestMarkArgument: ${{ parameters.TestMarkArgument }}
167-
168-
- job: 'RunPyLint'
169-
condition: and(succeededOrFailed(), ne(variables['Skip.Pylint'], 'true'))
170-
displayName: 'Run Pylint'
171-
variables:
172-
- template: ../variables/globals.yml
173-
174-
dependsOn:
175-
- 'Build'
176-
177-
pool:
178-
vmImage: 'ubuntu-18.04'
179-
180-
steps:
181-
- template: ../steps/run_pylint.yml
182-
parameters:
183-
ServiceDirectory: ${{ parameters.ServiceDirectory }}
184-
BuildTargetingString: ${{ parameters.BuildTargetingString }}
185-
TestMarkArgument: ${{ parameters.TestMarkArgument }}
186-
187138
- job: 'RunRegression'
188139
condition: and(succeededOrFailed(), or(eq(variables['Run.Regression'], 'true'), and(eq(variables['Build.Reason'], 'Schedule'), eq(variables['System.TeamProject'],'internal'))))
189140
displayName: 'Run Regression'

eng/pipelines/templates/stages/archetype-python-release.yml

Lines changed: 62 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ parameters:
44
DependsOn: Build
55
DocArtifact: 'documentation'
66
DevFeedName: public/azure-sdk-for-python
7+
TargetDocRepoOwner: ''
8+
TargetDocRepoName: ''
79

810
stages:
911
- ${{if and(eq(variables['Build.Reason'], 'Manual'), eq(variables['System.TeamProject'], 'internal'))}}:
@@ -26,15 +28,15 @@ stages:
2628
deploy:
2729
steps:
2830
- checkout: self
31+
- template: /eng/pipelines/templates/steps/stage-filtered-artifacts.yml
32+
parameters:
33+
SourceFolder: ${{parameters.ArtifactName}}
34+
TargetFolder: ${{artifact.safeName}}
35+
PackageName: ${{artifact.name}}
2936
- pwsh: |
30-
Get-ChildItem $(Pipeline.Workspace)/${{parameters.ArtifactName}}
31-
New-Item -Type Directory -Name ${{artifact.safeName}} -Path $(Pipeline.Workspace)
32-
$underscorePrefix = "${{artifact.name}}"
33-
$dashPrefix = "${{artifact.name}}".Replace("_", "-")
34-
Copy-Item $(Pipeline.Workspace)/${{parameters.ArtifactName}}/$dashPrefix-[0-9]*.[0-9]*.[0-9]* $(Pipeline.Workspace)/${{artifact.safeName}}
35-
Copy-Item $(Pipeline.Workspace)/${{parameters.ArtifactName}}/$underscorePrefix-[0-9]*.[0-9]*.[0-9]* $(Pipeline.Workspace)/${{artifact.safeName}}
36-
Get-ChildItem $(Pipeline.Workspace)/${{artifact.safeName}}
37-
displayName: Stage artifacts
37+
Get-ChildItem -Recurse $(Pipeline.Workspace)/${{artifact.safeName}}
38+
workingDirectory: $(Pipeline.Workspace)
39+
displayName: Output Visible Artifacts
3840
- template: /eng/common/pipelines/templates/steps/create-tags-and-git-release.yml
3941
parameters:
4042
ArtifactLocation: $(Pipeline.Workspace)/${{artifact.safeName}}
@@ -62,14 +64,11 @@ stages:
6264
artifact: ${{parameters.ArtifactName}}
6365
timeoutInMinutes: 5
6466

65-
- pwsh: |
66-
Get-ChildItem $(Pipeline.Workspace)/${{parameters.ArtifactName}}
67-
New-Item -Type Directory -Name ${{artifact.safeName}} -Path $(Pipeline.Workspace)
68-
$underscorePrefix = "${{artifact.name}}"
69-
$dashPrefix = "${{artifact.name}}".Replace("_", "-")
70-
Copy-Item $(Pipeline.Workspace)/${{parameters.ArtifactName}}/$dashPrefix-[0-9]*.[0-9]*.[0-9]* $(Pipeline.Workspace)/${{artifact.safeName}}
71-
Copy-Item $(Pipeline.Workspace)/${{parameters.ArtifactName}}/$underscorePrefix-[0-9]*.[0-9]*.[0-9]* $(Pipeline.Workspace)/${{artifact.safeName}}
72-
Get-ChildItem $(Pipeline.Workspace)/${{artifact.safeName}}
67+
- template: /eng/pipelines/templates/steps/stage-filtered-artifacts.yml
68+
parameters:
69+
SourceFolder: ${{parameters.ArtifactName}}
70+
TargetFolder: ${{artifact.safeName}}
71+
PackageName: ${{artifact.name}}
7372

7473
- task: UsePythonVersion@0
7574

@@ -105,7 +104,7 @@ stages:
105104
displayName: 'Publish package to feed: ${{parameters.DevFeedName}}'
106105
107106
- ${{if ne(artifact.options.skipPublishDocs, 'true')}}:
108-
- deployment: PublishDocs
107+
- deployment: PublishGitHubIODocs
109108
displayName: Publish Docs to GitHubIO Blob Storage
110109
condition: and(succeeded(), ne(variables['Skip.PublishDocs'], 'true'))
111110
environment: githubio
@@ -119,12 +118,12 @@ stages:
119118
deploy:
120119
steps:
121120
- checkout: self
122-
- pwsh: |
123-
Get-ChildItem $(Pipeline.Workspace)/${{parameters.DocArtifact}}
124-
New-Item -Type Directory -Name ${{artifact.safeName}} -Path $(Pipeline.Workspace)
125-
$dashPrefix = "${{artifact.name}}".Replace("_", "-")
126-
Copy-Item $(Pipeline.Workspace)/${{parameters.DocArtifact}}/$dashPrefix.zip $(Pipeline.Workspace)/${{artifact.safeName}}
127-
displayName: Stage artifacts
121+
- template: /eng/pipelines/templates/steps/stage-filtered-artifacts.yml
122+
parameters:
123+
SourceFolder: ${{parameters.DocArtifact}}
124+
TargetFolder: ${{artifact.safeName}}
125+
PackageName: ${{artifact.name}}
126+
AdditionalRegex: '.zip'
128127
- pwsh: |
129128
Get-ChildItem -Recurse $(Pipeline.Workspace)/${{artifact.safeName}}
130129
workingDirectory: $(Pipeline.Workspace)
@@ -138,6 +137,46 @@ stages:
138137
# we override the regular script path because we have cloned the build tools repo as a separate artifact.
139138
ScriptPath: 'eng/common/scripts/copy-docs-to-blobstorage.ps1'
140139

140+
- ${{if ne(artifact.options.skipPublishDocs, 'true')}}:
141+
- deployment: PublishDocs
142+
displayName: "Docs.MS Release"
143+
condition: and(succeeded(), ne(variables['Skip.PublishDocs'], 'true'))
144+
environment: githubio
145+
dependsOn: PublishPackage
146+
147+
pool:
148+
vmImage: ubuntu-18.04
149+
150+
strategy:
151+
runOnce:
152+
deploy:
153+
steps:
154+
- checkout: self
155+
- template: /eng/pipelines/templates/steps/stage-filtered-artifacts.yml
156+
parameters:
157+
SourceFolder: ${{parameters.ArtifactName}}
158+
TargetFolder: ${{artifact.safeName}}
159+
PackageName: ${{artifact.name}}
160+
- pwsh: |
161+
Get-ChildItem -Recurse $(Pipeline.Workspace)/${{artifact.safeName}}
162+
workingDirectory: $(Pipeline.Workspace)
163+
displayName: Output Visible Artifacts
164+
- template: /eng/common/pipelines/templates/steps/docs-metadata-release.yml
165+
parameters:
166+
ArtifactLocation: $(Pipeline.Workspace)/${{artifact.safeName}}
167+
PackageRepository: PyPI
168+
ReleaseSha: $(Build.SourceVersion)
169+
RepoId: Azure/azure-sdk-for-python
170+
WorkingDirectory: $(System.DefaultWorkingDirectory)
171+
TargetDocRepo: 'MicrosoftDocs/azure-docs-sdk-python'
172+
TargetDocRepoOwner: ${{parameters.TargetDocRepoOwner}}
173+
TargetDocRepoName: ${{parameters.TargetDocRepoName}}
174+
PRBranchName: 'smoke-test-rdme'
175+
ArtifactName: ${{parameters.ArtifactName}}
176+
Language: 'python'
177+
ServiceDirectory: ${{ parameters.ServiceDirectory }}
178+
DocRepoDestinationPath: 'docs-ref-services/'
179+
141180
- ${{if ne(artifact.options.skipUpdatePackageVersion, 'true')}}:
142181
- deployment: UpdatePackageVersion
143182
displayName: "Update Package Version"

0 commit comments

Comments
 (0)