Skip to content

Commit 284f0c1

Browse files
Refresh release/v3 branch to latest eng and scripts folder (Azure#12874)
* Refresh release/v3 branch to latest eng and scripts folder
1 parent 11a57d5 commit 284f0c1

File tree

344 files changed

+2749
-2181
lines changed

Some content is hidden

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

344 files changed

+2749
-2181
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Libraries which enable you to provision specific resources. They are responsible
4040
## Need help?
4141

4242
* For detailed documentation visit our [Azure SDK for Python documentation](https://aka.ms/python-docs)
43-
* File an issue via [Github Issues](../../issues)
43+
* File an issue via [Github Issues](https://github.com/Azure/azure-sdk-for-python/issues)
4444
* Check [previous questions](https://stackoverflow.com/questions/tagged/azure+python) or ask new ones on StackOverflow using `azure` and `python` tags.
4545

4646
### Community

doc/dev/mgmt/generating-integration-test.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ now you can run live integration test:
127127
128128
## Fixing Test
129129

130-
It's obvious that when running test for the first time someting is not going to work.
130+
It's obvious that when running test for the first time something is not going to work.
131131

132132
The best approach is to:
133133
- fix the test manually

doc/dev/mgmt/generation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ IMPORTANT NOTE: All the commands prefixed by `python` in this page assumes you h
88

99
### Autorest versioning
1010

11-
A few notes on [Autorest for Python versionning](https://github.com/Azure/autorest.python/blob/master/ChangeLog.md):
11+
A few notes on [Autorest for Python versioning](https://github.com/Azure/autorest.python/blob/master/ChangeLog.md):
1212
- Autorest for Python v2.x is deprecated, and should not be used anymore for any generation under any circumstances.
1313
- Autorest for Python v3.x is the most currently used one. Should not be used, but still ok if service team are still in v3.x and they want to avoid breaking changes for a given version (rare).
1414
- Autorest for Python v4.x is the current recommendation. This generator can generates async code, but this should be disabled with --no-async. No package should be shipped with async based on v4

doc/dev/mgmt/swagger/multi_api/readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This is the AutoRest configuration file for Network.
88

99
## Getting Started
1010

11-
To build the SDK for Network, simply [Install AutoRest](https://aka.ms/autorest/install) and in this folder, run:
11+
To build the SDK for Network, simply [Install AutoRest](https://github.com/Azure/autorest/blob/master/docs/installing-autorest.md) and in this folder, run:
1212

1313
> `autorest`
1414
@@ -66,4 +66,4 @@ swagger-to-sdk:
6666

6767
## Python
6868

69-
See configuration in [readme.python.md](./readme.python.md)
69+
See configuration in [readme.python.md](https://github.com/Azure/azure-sdk-for-python/blob/master/doc/dev/mgmt/swagger/multi_api/readme.python.md)

doc/dev/mgmt/swagger/single_api/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This is the AutoRest configuration file for Cdn.
88

99
---
1010
## Getting Started
11-
To build the SDK for Cdn, simply [Install AutoRest](https://aka.ms/autorest/install) and in this folder, run:
11+
To build the SDK for Cdn, simply [Install AutoRest](https://github.com/Azure/autorest/blob/master/docs/installing-autorest.md) and in this folder, run:
1212

1313
> `autorest`
1414

doc/dev/mgmt/swagger_conf.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,42 +14,42 @@ In practical terms, we want to control the version of Autorest used, the output
1414

1515
## Writing the readme
1616

17-
Writing the readme is the responsability of the Python SDK team. There is currently two types of templates for Python readmes:
17+
Writing the readme is the responsibility of the Python SDK team. There is currently two types of templates for Python readmes:
1818
- Readme that handles only one API version, and generates packages that handle one API version only
1919
- Readme that handles several API versions, and generates packages with multiples API and profile supports
2020

21-
These templates can be found in the [single_api](./single_api) and the [multi_api](./multi_api) folders.
21+
These templates can be found in the [single_api](https://github.com/Azure/azure-sdk-for-python/blob/master/doc/dev/mgmt/swagger/single_api) and the [multi_api](https://github.com/Azure/azure-sdk-for-python/blob/master/doc/dev/mgmt/swagger/multi_api) folders.
2222

2323

2424
### Single API readmes
2525

2626
This one is the most simple:
27-
- Copy the [readme.python.md](./single_api/readme.python.md) and replace `servicetoreplace` by your service name
28-
- Be sure the main [readme.md](./single_api/readme.md) contains a "swagger-to-sdk" section with Python
27+
- Copy the [readme.python.md](https://github.com/Azure/azure-sdk-for-python/blob/master/doc/dev/mgmt/swagger/single_api/readme.python.md) and replace `servicetoreplace` by your service name
28+
- Be sure the main [readme.md](https://github.com/Azure/azure-sdk-for-python/blob/master/doc/dev/mgmt/swagger/single_api/readme.md) contains a "swagger-to-sdk" section with Python
2929

3030
### Multi API readmes
3131

32-
When doing multi-api packages, it means you have shipping several "tags" of the main readme as one package. Autorest is calling this process a "batch" call, and this is the purpose of the "batch" section in [readme.python.md](./multi_api/readme.python.md).
32+
When doing multi-api packages, it means you have shipping several "tags" of the main readme as one package. Autorest is calling this process a "batch" call, and this is the purpose of the "batch" section in [readme.python.md](https://github.com/Azure/azure-sdk-for-python/blob/master/doc/dev/mgmt/swagger/multi_api/readme.python.md).
3333

3434
In order to be sure the correct tags exist, you can use the following script:
3535
```shell
3636
python ./scripts/multi_api_readme_help.py /azure-rest-api-specs/specification/service/resource-manager/
3737
```
3838

3939
This script will analyze the Swaggers available, and suggests on stdout:
40-
- A list of tags for the main [readme.md](./multi_api/readme.md)
41-
- A batch declaration for the [readme.python.md](./multi_api/readme.python.md)
40+
- A list of tags for the main [readme.md](https://github.com/Azure/azure-sdk-for-python/blob/master/doc/dev/mgmt/swagger/multi_api/readme.md)
41+
- A batch declaration for the [readme.python.md](https://github.com/Azure/azure-sdk-for-python/blob/master/doc/dev/mgmt/swagger/multi_api/readme.python.md)
4242

4343
This script is not perfect that it *does* require manual review of the output and not a direct copy/paste.
4444

4545
It's important for Python that tags represents only *ONE* unique API version. It's why it's pretty common that Python uses a set of tags that other languages don't use.
4646

4747
Once you know the list of tags you need to generate:
4848

49-
- Copy the [readme.python.md](./multi_api/readme.python.md) and replace `servicetoreplace` by your service name
50-
- Update the batch list of [readme.python.md](./multi_api/readme.python.md)
51-
- Be sure you have one tag section for each batch entry in [readme.python.md](./multi_api/readme.python.md)
52-
- Be sure the main [readme.md](./multi_api/readme.md) contains a "swagger-to-sdk" section with Python with an `afterscripts` section like the one in the template.
49+
- Copy the [readme.python.md](https://github.com/Azure/azure-sdk-for-python/blob/master/doc/dev/mgmt/swagger/multi_api/readme.python.md) and replace `servicetoreplace` by your service name
50+
- Update the batch list of [readme.python.md](https://github.com/Azure/azure-sdk-for-python/blob/master/doc/dev/mgmt/swagger/multi_api/readme.python.md)
51+
- Be sure you have one tag section for each batch entry in [readme.python.md](https://github.com/Azure/azure-sdk-for-python/blob/master/doc/dev/mgmt/swagger/multi_api/readme.python.md)
52+
- Be sure the main [readme.md](https://github.com/Azure/azure-sdk-for-python/blob/master/doc/dev/mgmt/swagger/multi_api/readme.md) contains a "swagger-to-sdk" section with Python with an `afterscripts` section like the one in the template.
5353

5454
The `afterscripts` will execute a Jinja template to create a client to link together all the batch generated autorest ([example](https://github.com/Azure/azure-sdk-for-python/blob/4a7c67189591b052fe2b5769847ff68f7845386d/sdk/storage/azure-mgmt-storage/azure/mgmt/storage/_storage_management_client.py))
5555

eng/.docsettings.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ known_content_issues:
4343
# data plane. common issue filed to azure-sdk-for-python
4444
- ['README.rst', '#4554']
4545
- ['sdk/synapse/azure-synapse/README.md', '#4554']
46+
- ['sdk/synapse/azure-synapse-accesscontrol/README.md', '#4554']
47+
- ['sdk/synapse/azure-synapse-spark/README.md', '#4554']
48+
- ['sdk/synapse/azure-synapse-artifacts/README.md', '#4554']
49+
- ['sdk/synapse/azure-synapse-nspkg/README.md', '#4554']
4650
- ['sdk/applicationinsights/azure-applicationinsights/README.md', '#4554']
4751
- ['sdk/batch/azure-batch/README.md', '#4554']
4852
- ['sdk/cognitiveservices/azure-cognitiveservices-anomalydetector/README.md', '#4554']
@@ -78,6 +82,7 @@ known_content_issues:
7882
- ['sdk/graphrbac/azure-graphrbac/README.md', '#4554']
7983
- ['sdk/loganalytics/azure-loganalytics/README.md', '#4554']
8084
- ['sdk/servicebus/azure-servicebus/README.md', '#4554']
85+
- ['sdk/servicebus/azure-servicebus/swagger/README.md', '#4554']
8186
- ['sdk/servicefabric/azure-servicefabric/README.md', '#4554']
8287
- ['sdk/storage/azure-storage-nspkg/README.md', '#4554']
8388
- ['sdk/storage/azure-storage-blob/swagger/README.md', '#4554']
@@ -109,10 +114,12 @@ known_content_issues:
109114
- ['sdk/search/azure-search-nspkg/README.md', 'nspkg and common']
110115
- ['sdk/storage/azure-storage-blob/samples/README.md', 'nspkg and common']
111116
- ['sdk/storage/azure-storage-file-datalake/samples/README.md', 'nspkg and common']
117+
- ['sdk/storage/azure-storage-blob-changefeed/samples/README.md', 'nspkg and common']
112118
- ['sdk/storage/azure-storage-file-share/samples/README.md', 'nspkg and common']
113119
- ['sdk/storage/azure-storage-queue/samples/README.md', 'nspkg and common']
114120
- ['sdk/textanalytics/azure-ai-nspkg/README.md', 'nspkg and common']
115121
- ['sdk/eventhub/azure-eventhub/samples/README.md', 'nspkg and common']
122+
- ['sdk/tables/azure-data-nspkg/README.md', 'nspkg and common']
116123

117124
# HISTORY.rst
118125
- ['sdk/core/azure/HISTORY.rst','#4554']

eng/ci_tools.txt

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,35 @@
11
# requirements leveraged by ci tools
22
setuptools==44.1.0; python_version == '2.7'
3-
setuptools==45.1.0; python_version >= '3.5'
3+
setuptools==46.4.0; python_version >= '3.5'
44
virtualenv==20.0.23
5-
wheel==0.34.2
6-
Jinja2==2.11.1
5+
wheel==0.34.2
6+
Jinja2==2.11.2
77
packaging==20.4
8-
tox==3.14.6
8+
tox==3.15.0
99
tox-monorepo==0.1.2
10-
twine==1.15.0
10+
twine==1.15.0; python_version == '2.7' or python_version == '3.5'
11+
twine==3.1.1; python_version >= '3.6'
1112
pathlib2==2.3.5
1213
readme-renderer[md]==25.0
13-
doc-warden==0.5.4
14+
doc-warden==0.7.1
15+
# we pin coverage to 4.5.4 because there is an bug with `pytest-cov`. the generated coverage files cannot be `coverage combine`ed
1416
coverage==4.5.4
15-
codecov==2.0.22
16-
beautifulsoup4==4.8.2
17+
codecov==2.1.0
18+
beautifulsoup4==4.9.1
1719
pkginfo==1.5.0.1
1820

1921
# locking packages defined as deps from azure-sdk-tools or azure-devtools
2022
pytoml==0.1.21
2123
pyOpenSSL==19.1.0
2224
json-delta==2.0
23-
ConfigArgParse==1.1
25+
ConfigArgParse==1.2.3
2426
six==1.14.0
2527
vcrpy==3.0.0
2628
pyyaml==5.3.1
27-
pytest==5.4.1; python_version >= '3.5'
29+
pytest==5.4.2; python_version >= '3.5'
2830
pytest==4.6.9; python_version == '2.7'
2931
pytest-cov==2.8.1
3032

3133
# local dev packages
3234
./tools/azure-devtools
3335
./tools/azure-sdk-tools
34-
35-
36-

eng/common/Extract-ReleaseNotes.ps1

Lines changed: 0 additions & 65 deletions
This file was deleted.

eng/common/TestResources/New-TestResources.ps1

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,14 +154,21 @@ if ($ProvisionerApplicationId) {
154154
$subscriptionArgs = if ($SubscriptionId) {
155155
@{SubscriptionId = $SubscriptionId}
156156
}
157+
else {
158+
@{}
159+
}
157160

158161
$provisionerAccount = Retry {
159162
Connect-AzAccount -Force:$Force -Tenant $TenantId -Credential $provisionerCredential -ServicePrincipal -Environment $Environment @subscriptionArgs
160163
}
161164

162165
$exitActions += {
163166
Write-Verbose "Logging out of service principal '$($provisionerAccount.Context.Account)'"
164-
$null = Disconnect-AzAccount -AzureContext $provisionerAccount.Context
167+
168+
# Only attempt to disconnect if the -WhatIf flag was not set. Otherwise, this call is not necessary and will fail.
169+
if ($PSCmdlet.ShouldProcess($ProvisionerApplicationId)) {
170+
$null = Disconnect-AzAccount -AzureContext $provisionerAccount.Context
171+
}
165172
}
166173
}
167174

@@ -176,7 +183,6 @@ if ($TestApplicationId -and !$TestApplicationOid) {
176183
}
177184
}
178185

179-
180186
# If the ServiceDirectory is an absolute path use the last directory name
181187
# (e.g. D:\foo\bar\ -> bar)
182188
$serviceName = if (Split-Path -IsAbsolute $ServiceDirectory) {
@@ -229,6 +235,13 @@ if ($resourceGroup.ProvisioningState -eq 'Succeeded') {
229235
# New-AzResourceGroup would've written an error and stopped the pipeline by default anyway.
230236
Write-Verbose "Successfully created resource group '$($resourceGroup.ResourceGroupName)'"
231237
}
238+
elseif (($resourceGroup -eq $null) -and (-not $PSCmdlet.ShouldProcess($resourceGroupName))) {
239+
# If the -WhatIf flag was passed, there will be no resource group created. Fake it.
240+
$resourceGroup = [PSCustomObject]@{
241+
ResourceGroupName = $resourceGroupName
242+
Location = $Location
243+
}
244+
}
232245

233246
# Populate the template parameters and merge any additional specified.
234247
$templateParameters = @{
@@ -299,6 +312,9 @@ foreach ($templateFile in $templateFiles) {
299312
"$($serviceDirectoryPrefix)RESOURCE_GROUP" = $resourceGroup.ResourceGroupName;
300313
"$($serviceDirectoryPrefix)LOCATION" = $resourceGroup.Location;
301314
"$($serviceDirectoryPrefix)ENVIRONMENT" = $context.Environment.Name;
315+
"$($serviceDirectoryPrefix)AZURE_AUTHORITY_HOST" = $context.Environment.ActiveDirectoryAuthority;
316+
"$($serviceDirectoryPrefix)RESOURCE_MANAGER_URL" = $context.Environment.ResourceManagerUrl;
317+
"$($serviceDirectoryPrefix)SERVICE_MANAGEMENT_URL" = $context.Environment.ServiceManagementUrl;
302318
}
303319

304320
foreach ($key in $deployment.Outputs.Keys) {
@@ -331,7 +347,7 @@ foreach ($templateFile in $templateFiles) {
331347
}
332348
else
333349
{
334-
350+
335351
if (!$CI) {
336352
# Write an extra new line to isolate the environment variables for easy reading.
337353
Log "Persist the following environment variables based on your detected shell ($shell):`n"
@@ -340,7 +356,7 @@ foreach ($templateFile in $templateFiles) {
340356
foreach ($key in $deploymentOutputs.Keys)
341357
{
342358
$value = $deploymentOutputs[$key]
343-
359+
344360
if ($CI) {
345361
# Treat all ARM template output variables as secrets since "SecureString" variables do not set values.
346362
# In order to mask secrets but set environment variables for any given ARM template, we set variables twice as shown below.

0 commit comments

Comments
 (0)