Skip to content

Commit 2fdc3cb

Browse files
committed
Merge branch 'master' of https://github.com/Azure/azure-sdk-for-python into python-track2-test
2 parents 4d03877 + 6f76546 commit 2fdc3cb

File tree

3,477 files changed

+906465
-296652
lines changed

Some content is hidden

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

3,477 files changed

+906465
-296652
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
/common/smoketest/ @lmazuel @chlowell @annatisch @rakshith91 @shurd @southpolesteve
129129

130130
# Management Plane
131-
/**/*mgmt*/ @00Kai0 @msyyc @jsntcy @changlong-liu
131+
/**/*mgmt*/ @RAY-316 @msyyc
132132

133133

134134
###########

SUPPORT.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Support
2+
3+
## How to file issues and get help
4+
5+
Customers with an [Azure support plan](https://azure.microsoft.com/support/options/) can open an [Azure support ticket](https://azure.microsoft.com/support/create-ticket/).
6+
**We recommend this option if your problem requires immediate attention.**
7+
8+
### Github issues
9+
We use [GitHub Issues](https://github.com/Azure/azure-sdk-for-python/issues/new/choose) to track bugs, questions, and feature requests.
10+
GitHub issues are free, but **response time is not guaranteed.** See [GitHub issues support process](https://devblogs.microsoft.com/azure-sdk/github-issue-support-process/) for more details.
11+
12+
### Community resources
13+
- Search for similar issues in [our GitHub repository](https://github.com/Azure/azure-sdk-for-python/issues)
14+
- Ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/azure-sdk-python) and tag it with azure-sdk-python
15+
- Share or upvote feature requests on [Feedback Page](https://feedback.azure.com/forums/34192--general-feedback).
16+
- Take a look at the [Azure SDK blog](https://devblogs.microsoft.com/azure-sdk/).
17+
- Chat with other community members on [gitter](https://gitter.im/Azure/azure-sdk-for-python?source=orgpage)
18+
- Ask a question on [Twitter](https://twitter.com/AzureSDK)
19+
- Ask a question at [Microsoft Q&A](https://docs.microsoft.com/answers/products/azure?WT.mc_id=Portal-Microsoft_Azure_Support&product=all)
20+
- Ask a question at [Microsoft Tech Community](https://techcommunity.microsoft.com/t5/azure/ct-p/Azure)
21+
22+
### Security bugs
23+
Security issues and bugs should be reported privately, via email, to the Microsoft Security Response Center([email protected]).
24+
You should receive a response within 24 hours.
25+
Further information, including the MSRC PGP key, can be found in the [Security TechCenter](https://www.microsoft.com/msrc/faqs-report-an-issue?rtc=1)
26+
27+
## Microsoft Support Policy
28+
29+
Please refer to [Azure SDK Support and Lifecycle information](https://azure.github.io/azure-sdk/policies_support.html)

doc/dev/conda-builds.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
Follow the instructions [here](https://docs.conda.io/projects/conda-build/en/latest/install-conda-build.html) to install `conda` and `conda-build`.
66

7+
**The Azure SDK Conda artifacts support `python3.8` and `python3.9` only.**
8+
79
## CI Build Process
810

911
There will be a `CondaArtifact` defined in the `ci.yml` of each service directory. (`sdk/<service>`)
@@ -15,9 +17,18 @@ A Conda Artifact defines:
1517
- Any other necessary details.
1618

1719
## How to Build an Azure SDK Conda Package Locally
20+
#### If using powershell, you will need to prep your environment before proceeding to the next step
21+
22+
```
23+
powershell -ExecutionPolicy ByPass -NoExit -Command "& '<path-to-conda-folder>\shell\condabin\conda-hook.ps1' ; conda activate '<path-to-conda-folder>' "
24+
```
25+
26+
Afterwards, invoke `conda init powershell` and re-create the pshell session.
1827

28+
By default, your powershell environment will now load `conda`. If you want pure pip, you will need to use explicit invocations of your `python` locations to create virtual envs.
1929
### Set up your conda environment
2030

31+
2132
You will notice that all the azure-sdk conda distributions have the **same** version number and requirement set. This is due to the fact that the azure-sdk team pushes our conda packages out in waves. To support this, all versions are set via a common environment variable `AZURESDK_CONDA_VERSION`.
2233

2334
We keep this environment variable set properly across all our builds by using a common `conda_env.yml` when creating our build environment. This environment definition ensures that:

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

Lines changed: 77 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,65 @@
11
# intended to be used as part of a release process
22
parameters:
3-
ArtifactLocation: 'not-specified'
4-
PackageRepository: 'not-specified'
5-
ReleaseSha: 'not-specified'
6-
RepoId: $(Build.Repository.Name)
7-
WorkingDirectory: ''
8-
ScriptDirectory: eng/common/scripts
9-
TargetDocRepoName: ''
10-
TargetDocRepoOwner: ''
11-
PRBranchName: 'master-rdme'
12-
PRLabels: 'auto-merge'
13-
ArtifactName: ''
14-
Language: ''
15-
DocRepoDestinationPath: '' #usually docs-ref-services/
16-
CIConfigs: '[]'
17-
GHReviewersVariable: ''
18-
GHTeamReviewersVariable: '' # externally set, as eng-common does not have the identity-resolver. Run as pre-step
19-
OnboardingBranch: ''
20-
CloseAfterOpenForTesting: false
21-
SkipPackageJson: false
3+
- name: ArtifactLocation
4+
type: string
5+
default: 'not-specified'
6+
- name: PackageRepository
7+
type: string
8+
default: 'not-specified'
9+
- name: ReleaseSha
10+
type: string
11+
default: 'not-specified'
12+
- name: RepoId
13+
type: string
14+
default: $(Build.Repository.Name)
15+
- name: WorkingDirectory
16+
type: string
17+
default: ''
18+
- name: ScriptDirectory
19+
type: string
20+
default: eng/common/scripts
21+
- name: TargetDocRepoName
22+
type: string
23+
default: ''
24+
- name: TargetDocRepoOwner
25+
type: string
26+
default: ''
27+
- name: PRBranchName
28+
type: string
29+
default: 'master-rdme'
30+
- name: PRLabels
31+
type: string
32+
default: 'auto-merge'
33+
- name: ArtifactName
34+
type: string
35+
default: ''
36+
- name: Language
37+
type: string
38+
default: ''
39+
- name: DocRepoDestinationPath
40+
type: string
41+
default: '' #usually docs-ref-services/
42+
- name: CIConfigs
43+
type: string
44+
default: '[]'
45+
- name: GHReviewersVariable
46+
type: string
47+
default: ''
48+
- name: GHTeamReviewersVariable
49+
type: string
50+
default: '' # externally set, as eng-common does not have the identity-resolver. Run as pre-step
51+
- name: OnboardingBranch
52+
type: string
53+
default: ''
54+
- name: CloseAfterOpenForTesting
55+
type: boolean
56+
default: false
57+
- name: SkipPackageJson
58+
type: object
59+
default: false
60+
- name: SparseCheckoutPaths
61+
type: object
62+
default: null
2263

2364
steps:
2465
- pwsh: |
@@ -30,14 +71,25 @@ steps:
3071
Write-Host "This script is not executing on Windows, skipping registry modification."
3172
}
3273
displayName: Enable Long Paths if Necessary
33-
34-
- pwsh: |
35-
git clone https://github.com/${{ parameters.TargetDocRepoOwner }}/${{ parameters.TargetDocRepoName }} ${{ parameters.WorkingDirectory }}/repo
36-
displayName: Clone Documentation Repository
37-
ignoreLASTEXITCODE: false
74+
75+
- ${{ if not(parameters.SparseCheckoutPaths) }}:
76+
- pwsh: |
77+
git clone https://github.com/${{ parameters.TargetDocRepoOwner }}/${{ parameters.TargetDocRepoName }} ${{ parameters.WorkingDirectory }}/repo
78+
displayName: Clone Documentation Repository
79+
ignoreLASTEXITCODE: false
80+
81+
- ${{ if parameters.SparseCheckoutPaths }}:
82+
- template: /eng/common/pipelines/templates/steps/sparse-checkout.yml
83+
parameters:
84+
SkipDefaultCheckout: true
85+
Repositories:
86+
- Name: ${{ parameters.TargetDocRepoOwner }}/${{ parameters.TargetDocRepoName }}
87+
WorkingDirectory: ${{ parameters.WorkingDirectory }}/repo
88+
Paths: ${{ parameters.SparseCheckoutPaths }}
89+
3890
- template: /eng/common/pipelines/templates/steps/set-default-branch.yml
3991
parameters:
40-
WorkingDirectory: ${{ parameters.WorkingDirectory }}/repo
92+
WorkingDirectory: ${{ parameters.WorkingDirectory }}/repo
4193
- task: PowerShell@2
4294
displayName: 'Apply Documentation Updates From Artifact'
4395
inputs:

eng/common/pipelines/templates/steps/sparse-checkout.yml

Lines changed: 56 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,59 @@ steps:
1616
- ${{ if not(parameters.SkipDefaultCheckout) }}:
1717
- checkout: none
1818

19-
- ${{ each repo in parameters.Repositories }}:
20-
- pwsh: |
21-
$dir = "${{ coalesce(repo.WorkingDirectory, format('{0}/{1}', '$(System.DefaultWorkingDirectory)', repo.Name)) }}"
22-
New-Item $dir -ItemType Directory -Force
23-
displayName: Create ${{ repo.Name }} directories
24-
25-
- pwsh: |
26-
git clone --no-checkout --filter=tree:0 git://github.com/${{ repo.Name }} .
27-
git sparse-checkout init
28-
$paths = ('${{ convertToJson(parameters.Paths) }}' | ConvertFrom-Json) -Join ' '
29-
Invoke-Expression -Command "git sparse-checkout set eng $paths"
30-
Write-Host "Set sparse checkout paths to:"
31-
Get-Content .git/info/sparse-checkout
32-
displayName: Init sparse checkout ${{ repo.Name }}
33-
workingDirectory: ${{ coalesce(repo.WorkingDirectory, format('{0}/{1}', '$(System.DefaultWorkingDirectory)', repo.Name)) }}
34-
35-
- pwsh: git checkout ${{ repo.Commitish }}
36-
displayName: Sparse checkout at ${{ repo.Commitish }}
37-
workingDirectory: ${{ coalesce(repo.WorkingDirectory, format('{0}/{1}', '$(System.DefaultWorkingDirectory)', repo.Name)) }}
19+
- task: PowerShell@2
20+
displayName: 'Sparse checkout repositories'
21+
inputs:
22+
targetType: inline
23+
# Define this inline, because of the chicken/egg problem with loading a script when nothing
24+
# has been checked out yet.
25+
script: |
26+
function SparseCheckout([Array]$paths, [Hashtable]$repository)
27+
{
28+
$paths = $paths -Join ' '
29+
30+
$dir = $repository.WorkingDirectory
31+
if (!$dir) {
32+
$dir = "./$($repository.Name)"
33+
}
34+
New-Item $dir -ItemType Directory -Force
35+
Push-Location $dir
36+
37+
if (Test-Path .git/info/sparse-checkout) {
38+
$hasInitialized = $true
39+
Write-Host "Repository $($repository.Name) has already been initialized. Skipping this step."
40+
} else {
41+
Write-Host "Repository $($repository.Name) is being initialized."
42+
git clone --no-checkout --filter=tree:0 git://github.com/$($repository.Name) .
43+
git sparse-checkout init
44+
git sparse-checkout set eng
45+
}
46+
47+
$gitsparsecmd = "git sparse-checkout add $paths"
48+
Write-Host $gitsparsecmd
49+
Invoke-Expression -Command $gitsparsecmd
50+
51+
Write-Host "Set sparse checkout paths to:"
52+
Get-Content .git/info/sparse-checkout
53+
54+
# sparse-checkout commands after initial checkout will auto-checkout again
55+
if (!$hasInitialized) {
56+
Write-Host "git checkout $($repository.Commitish)"
57+
git checkout $($repository.Commitish) # this will use the default branch if repo.Commitish is empty
58+
} else {
59+
Write-Host "Skipping checkout as repo has already been initialized"
60+
}
61+
62+
Pop-Location
63+
}
64+
65+
# Paths may be sourced as a yaml object literal OR a dynamically generated variable json string.
66+
# If the latter, convertToJson will wrap the 'string' in quotes, so remove them.
67+
$paths = '${{ convertToJson(parameters.Paths) }}'.Trim('"') | ConvertFrom-Json
68+
# Replace windows backslash paths, as Azure Pipelines default directories are sometimes formatted like 'D:\a\1\s'
69+
$repositories = '${{ convertToJson(parameters.Repositories) }}' -replace '\\', '/' | ConvertFrom-Json -AsHashtable
70+
foreach ($repo in $Repositories) {
71+
SparseCheckout $paths $repo
72+
}
73+
pwsh: true
74+
workingDirectory: $(System.DefaultWorkingDirectory)

eng/common/scripts/ChangeLog-Operations.ps1

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,35 @@ function Get-ChangeLogEntries {
1313
[String]$ChangeLogLocation
1414
)
1515

16-
$changeLogEntries = [Ordered]@{}
1716
if (!(Test-Path $ChangeLogLocation)) {
1817
LogError "ChangeLog[${ChangeLogLocation}] does not exist"
1918
return $null
2019
}
20+
LogDebug "Extracting entries from [${ChangeLogLocation}]."
21+
return Get-ChangeLogEntriesFromContent (Get-Content -Path $ChangeLogLocation)
22+
}
2123

24+
function Get-ChangeLogEntriesFromContent {
25+
param (
26+
[Parameter(Mandatory = $true)]
27+
$changeLogContent
28+
)
29+
30+
if ($changeLogContent -is [string])
31+
{
32+
$changeLogContent = $changeLogContent.Split("`n")
33+
}
34+
elseif($changeLogContent -isnot [array])
35+
{
36+
LogError "Invalid ChangelogContent passed"
37+
return $null
38+
}
39+
40+
$changeLogEntries = [Ordered]@{}
2241
try {
23-
$contents = Get-Content $ChangeLogLocation
2442
# walk the document, finding where the version specifiers are and creating lists
2543
$changeLogEntry = $null
26-
foreach ($line in $contents) {
44+
foreach ($line in $changeLogContent) {
2745
if ($line -match $RELEASE_TITLE_REGEX) {
2846
$changeLogEntry = [pscustomobject]@{
2947
ReleaseVersion = $matches["version"]
@@ -41,7 +59,7 @@ function Get-ChangeLogEntries {
4159
}
4260
}
4361
catch {
44-
Write-Host "Error parsing $ChangeLogLocation."
62+
Write-Host "Error parsing Changelog."
4563
Write-Host $_.Exception.Message
4664
}
4765
return $changeLogEntries

eng/conda_env.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
variables:
2-
AZURESDK_CONDA_VERSION: '2021.05.01'
2+
AZURESDK_CONDA_VERSION: '2021.05.01b1'

eng/conda_test_requirements.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# install from root of repo
2+
aiohttp>=3.0; python_version >= '3.5'
3+
tools/azure-devtools
4+
tools/azure-sdk-tools
5+
mock;
6+
aiodns>=2.0; python_version >= '3.5'
7+
parameterized>=0.7.3; python_version >= '3.0'
8+
trio; python_version >= '3.5'
9+
typing_extensions>=3.7.2
10+
futures==3.3.0; python_version <= '2.7'
11+
cryptography
12+
adal

eng/pipelines/docindex.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
trigger: none
2+
3+
jobs:
4+
- template: /eng/common/pipelines/templates/jobs/docindex.yml

0 commit comments

Comments
 (0)