Skip to content

Commit 9c53373

Browse files
committed
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-python into update_package_json
* 'main' of https://github.com/Azure/azure-sdk-for-python: (136 commits) Re-record (Azure#32584) Update CODEOWNERS (Azure#32583) capture request data with aiohttp multipart/form-data (Azure#32543) [Core] Create generic azure-core package: `corehttp` (Azure#32191) overwrite .amlignore file (Azure#32546) Fix Sphinx error in core (Azure#32417) skip pyright for now (Azure#32569) Fix identity-broker sdist (Azure#32568) Updates to interactions with `pyproject.toml` (Azure#32480) fix: fixing local variable's name(last_modified_exising -> last_modified_existing) typo via Cspell (Azure#32556) Update feature store related entities to use the GA version (Azure#32541) Removing unused RST files (Azure#32547) Update python version for virtualenv issues (Azure#32528) [AutoRelease] t2-keyvault-2023-10-13-36681(can only be merged by SDK owner) (Azure#32478) [Monitor Distro] Update broken link (Azure#32505) Bump python stress images and addons (Azure#32554) Bump (Azure#32552) Increment package version after release of azure-cosmos (Azure#32550) repair aggregate report pipeline (Azure#32509) update readme and samples (Azure#32548) ...
2 parents 6318424 + 59f2ce8 commit 9c53373

File tree

1,505 files changed

+194003
-166776
lines changed

Some content is hidden

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

1,505 files changed

+194003
-166776
lines changed

.github/CODEOWNERS

+7-4
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929
/sdk/ @lmazuel
3030

3131
# Core
32+
# PRLabel: %Core.Http
33+
/sdk/core/corehttp/ @pvaneck @lmazuel @annatisch @johanste @xiangyan99 @iscai-msft @kashifkhan
34+
3235
# PRLabel: %Azure.Core
3336
/sdk/core/ @lmazuel @annatisch @johanste
3437
/sdk/core/azure-core/ @lmazuel @annatisch @johanste @xiangyan99 @tjprescott @iscai-msft @kashifkhan
@@ -104,7 +107,7 @@
104107
/sdk/keyvault/ @schaabs @mccoyp
105108

106109
# PRLabel: %Load Testing
107-
/sdk/loadtestservice/azure-developer-loadtesting/ @msyyc @iscai-msft
110+
/sdk/loadtesting/azure-developer-loadtesting/ @msyyc @iscai-msft
108111

109112
# PRLabel: %Monitor
110113
/sdk/loganalytics/azure-loganalytics/ @azmonapplicationinsights @pvaneck
@@ -142,7 +145,7 @@
142145
# PRLabel: %Data Factory
143146
/sdk/datafactory/ @hvermis
144147
/sdk/datalake/ @ro-joowan
145-
/sdk/datadatamigration/ @vchske
148+
/sdk/datamigration/ @vchske
146149

147150
# PRLabel: %Device Provisioning
148151
/sdk/iothub/azure-iot-deviceprovisioning @c-ryan-k @digimaun
@@ -160,7 +163,7 @@
160163
/sdk/modelsrepository/ @cartertinney @digimaun
161164

162165
# PRLabel: %Machine Learning Compute
163-
/sdk/machinelearningcompute/ @shutchings
166+
/sdk/machinelearning/ @shutchings
164167

165168
# PRLabel: %Machine Learning
166169
/sdk/ml/ @paulshealy1 @singankit @diondrapeck @luigiw @kdestin @MilesHolland @needuv @ninghu @YusakuNo1
@@ -281,7 +284,7 @@
281284
/sdk/servicefabric/ @QingChenmsft @samedder
282285

283286
# PRLabel: %SQL
284-
/sql/sql/ @jaredmoo
287+
/sdk/sql/ @jaredmoo
285288

286289
# PRLabel: %Service Bus
287290
/sdk/servicebus/ @annatisch @kashifkhan @swathipil @l0lawrence

.github/workflows/event-processor.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
run: >
5656
dotnet tool install
5757
Azure.Sdk.Tools.GitHubEventProcessor
58-
--version 1.0.0-dev.20230713.2
58+
--version 1.0.0-dev.20231010.2
5959
--add-source https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json
6060
--global
6161
shell: bash

.github/workflows/scheduled-event-processor.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
run: >
3535
dotnet tool install
3636
Azure.Sdk.Tools.GitHubEventProcessor
37-
--version 1.0.0-dev.20230713.2
37+
--version 1.0.0-dev.20231010.2
3838
--add-source https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json
3939
--global
4040
shell: bash

.vscode/cspell.json

+13-2
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
"sdk/core/azure-core-tracing-opencensus/**",
5656
"sdk/core/azure-core-tracing-opentelemetry/**",
5757
"sdk/core/azure-servicemanagement-legacy/**",
58+
"sdk/core/corehttp/**",
5859
"sdk/digitaltwins/azure-digitaltwins-core/**",
5960
"sdk/eventhub/azure-eventhub-checkpointstoretable/**",
6061
"sdk/eventhub/azure-eventhub-checkpointstoreblob-aio/**",
@@ -97,6 +98,9 @@
9798
"sdk/translation/azure-ai-translation-text/tests/test_break_sentence.py",
9899
"sdk/translation/azure-ai-translation-text/tests/test_translation.py",
99100
"sdk/translation/azure-ai-translation-text/tests/test_transliteration.py",
101+
"sdk/translation/azure-ai-translation-text/tests/test_break_sentence_async.py",
102+
"sdk/translation/azure-ai-translation-text/tests/test_translation_async.py",
103+
"sdk/translation/azure-ai-translation-text/tests/test_transliteration_async.py",
100104
"sdk/translation/test-resources.json",
101105
"eng/**/*.json",
102106
"eng/*.txt",
@@ -120,6 +124,11 @@
120124
"conda/conda-releaselogs/azure-mgmt.md"
121125
],
122126
"words": [
127+
"pyprojects",
128+
"certifi",
129+
"cffi",
130+
"tomlw",
131+
"xdist",
123132
"pyprojecttoml",
124133
"tomli",
125134
"sdkrel",
@@ -201,6 +210,7 @@
201210
"ekus",
202211
"encryptor",
203212
"engsys",
213+
"entra",
204214
"envname",
205215
"evals",
206216
"fileno",
@@ -493,7 +503,7 @@
493503
"words": [
494504
"wammsa"
495505
]
496-
},
506+
},
497507
{
498508
"filename": "sdk/tables/azure-data-tables/tests/**/*.py",
499509
"words": [
@@ -828,7 +838,8 @@
828838
{
829839
"filename": "sdk/keyvault/**",
830840
"words": [
831-
"eddsa"
841+
"eddsa",
842+
"Thawte"
832843
]
833844
},
834845
{

doc/eng_sys_checks.md

+15-1
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ Starting with [this pr](https://github.com/Azure/azure-sdk-for-python/pull/28345
118118

119119
We default to **enabling** most of our checks like `pylint`, `mypy`, etc. Due to that, most `pyproject.toml` settings will likely be **disabling** checks.
120120

121+
There is also an additional setting to turn on strict sphinx validation, for docstring validation.
122+
121123
Here's an example:
122124

123125
```toml
@@ -130,6 +132,7 @@ verifytypes = false
130132
pyright = false
131133
pylint = false
132134
black = false
135+
strict_sphinx = false
133136
```
134137

135138
If a package does not yet have a `pyproject.toml`, creating one with just the section `[tool.azure-sdk-build]` will do no harm to the release of the package in question.
@@ -195,9 +198,20 @@ Analyze job in both nightly CI and pull request validation pipeline runs a set o
195198

196199
1. Go to root of the package.
197200
2. Execute following command: `tox run -e pylint -c ../../../eng/tox/tox.ini --root .`
198-
201+
199202
Note that the `pylint` environment is configured to run against the **earliest supported python version**. This means that users **must** have `python 3.7` installed on their machine to run this check locally.
200203

204+
### Sphinx and docstring checker
205+
206+
[`Sphinx`](https://www.sphinx-doc.org/en/master/) is the preferred documentation builder for Python libraries. The documentation is always built and attached to each PR builds. Sphinx can be configured to
207+
fail if docstring are invalid, helping to ensure the resulting documentation will be of high quality. Following are the steps to run `sphinx` locally for a specific package with strict docstring checking:
208+
209+
1. Go to root of the package.
210+
2. Make sure the `pyproject.toml` file contains `strict_sphinx = true`
211+
3. Execute following command: `tox run -e sphinx -c ../../../eng/tox/tox.ini --root .`
212+
213+
Note: While as of now the default value is `False`, it will become `True` by mid 2024.
214+
201215
### Bandit
202216

203217
`Bandit` is static security analysis tool. This check is triggered for all Azure SDK package as part of analyze job. Following are the steps to `Bandit` tool locally for a specific package.

doc/sphinx/python_mgmt_migration_guide.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ To the show the code snippets for the change:
102102
from azure.identity import ClientSecretCredential
103103
104104
credential = ClientSecretCredential(
105-
client_secret=client_secret,
105+
tenant_id=tenant_id,
106106
client_id=client_id,
107107
client_secret=client_secret
108108
)

eng/.docsettings.yml

+4
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ known_content_issues:
103103
- ['sdk/appconfiguration/azure-appconfiguration/swagger/README.md', '#4554']
104104
- ['sdk/attestation/azure-security-attestation/swagger/README.md', '#4554']
105105
- ['sdk/core/azure-core/tests/testserver_tests/coretestserver/README.rst', '#4554']
106+
- ['sdk/core/corehttp/tests/testserver_tests/coretestserver/README.rst', '#4554']
106107
- ['sdk/media/azure-media-analytics-edge/README.md', '#4554']
107108
- ['sdk/remoterendering/azure-mixedreality-remoterendering/README.md', '#4554']
108109
- ['sdk/modelsrepository/azure-iot-modelsrepository/README.md', '#4554']
@@ -115,6 +116,8 @@ known_content_issues:
115116
- ['sdk/core/azure-common/README.rst', 'common']
116117
- ['sdk/core/azure-core/README.md', 'common']
117118
- ['sdk/core/azure-core/samples/README.md', 'common']
119+
- ['sdk/core/corehttp/README.md', 'common']
120+
- ['sdk/core/corehttp/samples/README.md', 'common']
118121
- ['sdk/search/azure-search-documents/README.md', 'common']
119122
- ['sdk/storage/azure-storage-blob/samples/README.md', 'common']
120123
- ['sdk/storage/azure-storage-file-datalake/samples/README.md', 'common']
@@ -153,6 +156,7 @@ known_content_issues:
153156
- ['sdk/appconfiguration/azure-appconfiguration/swagger/README.md', '#4554']
154157
- ['sdk/core/azure-core/tests/testserver_tests/coretestserver/README.md', '#4554']
155158
- ['sdk/core/azure-core-experimental/README.md', '#4554']
159+
- ['sdk/identity/azure-identity-broker/README.md', '#4554']
156160
package_indexing_exclusion_list:
157161
- 'azure-sdk-tools'
158162
- 'azure-template'

eng/ci_tools.txt

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
# requirements leveraged by ci tools
22
setuptools==67.6.0; python_version >= '3.5'
3-
virtualenv==20.23.0
3+
virtualenv==20.24.3
44
wheel==0.37.0
55
packaging==23.1
6-
wheel==0.37.0
76
tox==4.5.0
8-
pyproject-api<1.6
97
pathlib2==2.3.5
108
doc-warden==0.7.2
119
beautifulsoup4==4.9.1
1210
pkginfo==1.9.6
13-
pip==20.3.3
11+
pip==23.2.1
1412
wrapt==1.12.1; python_version <= '3.10'
1513
wrapt==1.15.0; python_version >= '3.11'
1614
typing-extensions<=4.6.3
15+
pyproject-api<1.6
1716

1817
# requirements leveraged for testing
1918
pytest==7.3.1
@@ -33,7 +32,7 @@ pyyaml==6.0.1
3332
urllib3==1.26.16
3433
PyGithub==1.59.1
3534
ConfigArgParse==1.2.3
36-
six==1.14.0
35+
six==1.16.0
3736

3837
# local dev packages
3938
./tools/azure-devtools

eng/common/TestResources/New-TestResources.ps1

+3-1
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,6 @@ try {
771771
-TemplateParameterObject $templateFileParameters `
772772
-Force:$Force
773773
}
774-
775774
if ($deployment.ProvisioningState -ne 'Succeeded') {
776775
Write-Host "Deployment '$($deployment.DeploymentName)' has state '$($deployment.ProvisioningState)' with CorrelationId '$($deployment.CorrelationId)'. Exiting..."
777776
Write-Host @'
@@ -803,6 +802,9 @@ try {
803802
Write-Verbose "Removing compiled bicep file $($templateFile.jsonFilePath)"
804803
Remove-Item $templateFile.jsonFilePath
805804
}
805+
806+
Write-Host "Deleting ARM deployment as it may contain secrets. Deployed resources will not be affected."
807+
$null = $deployment | Remove-AzResourceGroupDeployment
806808
}
807809

808810
} finally {

eng/common/pipelines/templates/steps/eng-common-workflow-enforcer.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ steps:
1111
1212
if ((!"$(System.PullRequest.SourceBranch)".StartsWith("sync-eng/common")) -and "$(System.PullRequest.TargetBranch)" -match "^(refs/heads/)?$(DefaultBranch)$")
1313
{
14-
$filesInCommonDir = & "eng/common/scripts/get-changedfiles.ps1" -DiffPath 'eng/common/*'
14+
$filesInCommonDir = & "eng/common/scripts/get-changedfiles.ps1" -DiffPath 'eng/common/*' -DiffFilterType ""
1515
if (($LASTEXITCODE -eq 0) -and ($filesInCommonDir.Count -gt 0))
1616
{
1717
Write-Host "##vso[task.LogIssue type=error;]Changes to files under 'eng/common' directory should not be made in this Repo`n${filesInCommonDir}"
@@ -21,7 +21,7 @@ steps:
2121
}
2222
if ((!"$(System.PullRequest.SourceBranch)".StartsWith("sync-.github/workflows")) -and "$(System.PullRequest.TargetBranch)" -match "^(refs/heads/)?$(DefaultBranch)$")
2323
{
24-
$filesInCommonDir = & "eng/common/scripts/get-changedfiles.ps1" -DiffPath '.github/workflows/*'
24+
$filesInCommonDir = & "eng/common/scripts/get-changedfiles.ps1" -DiffPath '.github/workflows/*' -DiffFilterType ""
2525
if (($LASTEXITCODE -eq 0) -and ($filesInCommonDir.Count -gt 0))
2626
{
2727
Write-Host "##vso[task.LogIssue type=error;]Changes to files under '.github/workflows' directory should not be made in this Repo`n${filesInCommonDir}"
@@ -30,4 +30,4 @@ steps:
3030
}
3131
}
3232
displayName: Prevent changes to eng/common and .github/workflows outside of azure-sdk-tools repo
33-
condition: and(succeeded(), ne(variables['Skip.EngCommonWorkflowEnforcer'], 'true'), not(endsWith(variables['Build.Repository.Name'], '-pr')))
33+
condition: and(succeeded(), ne(variables['Skip.EngCommonWorkflowEnforcer'], 'true'), not(endsWith(variables['Build.Repository.Name'], '-pr')))

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

+4-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ steps:
1717
- checkout: none
1818

1919
- task: PowerShell@2
20-
displayName: 'Sparse checkout repositories'
20+
${{ if eq(length(parameters.Repositories), 1) }}:
21+
displayName: 'Sparse checkout ${{ parameters.Repositories[0].Name }}'
22+
${{ else }}:
23+
displayName: 'Sparse checkout repositories'
2124
inputs:
2225
targetType: inline
2326
# Define this inline, because of the chicken/egg problem with loading a script when nothing

eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1

+2-75
Original file line numberDiff line numberDiff line change
@@ -182,56 +182,6 @@ function FindParentWorkItem($serviceName, $packageDisplayName, $outputCommand =
182182
return $null
183183
}
184184

185-
$releasePlanWorkItems = @{}
186-
function FindReleasePlanWorkItem($serviceName, $packageDisplayName, $outputCommand = $false, $ignoreReleasePlannerTests = $true)
187-
{
188-
$key = BuildHashKey $serviceName $packageDisplayName
189-
if ($key -and $releasePlanWorkItems.ContainsKey($key)) {
190-
return $releasePlanWorkItems[$key]
191-
}
192-
193-
if ($serviceName) {
194-
$condition = "[ServiceName] = '${serviceName}'"
195-
if ($packageDisplayName) {
196-
$condition += " AND [PackageDisplayName] = '${packageDisplayName}'"
197-
}
198-
else {
199-
$condition += " AND [PackageDisplayName] = ''"
200-
}
201-
}
202-
else {
203-
$condition = "[ServiceName] <> ''"
204-
}
205-
$condition += " AND [System.State] <> 'Finished'"
206-
if($ignoreReleasePlannerTests){
207-
$condition += " AND [Tags] NOT CONTAINS 'Release Planner App Test'"
208-
}
209-
210-
$query = "SELECT [ID], [ServiceName], [PackageDisplayName], [Parent] FROM WorkItems WHERE [Work Item Type] = 'Release Plan' AND ${condition}"
211-
212-
$fields = @("System.Id", "Custom.ServiceName", "Custom.PackageDisplayName", "System.Parent", "System.Tags")
213-
214-
$workItems = Invoke-Query $fields $query $outputCommand
215-
216-
foreach ($wi in $workItems)
217-
{
218-
$localKey = BuildHashKey $wi.fields["Custom.ServiceName"] $wi.fields["Custom.PackageDisplayName"]
219-
if (!$localKey) { continue }
220-
if ($releasePlanWorkItems.ContainsKey($localKey) -and $releasePlanWorkItems[$localKey].id -ne $wi.id) {
221-
Write-Warning "Already found parent [$($releasePlanWorkItems[$localKey].id)] with key [$localKey], using that one instead of [$($wi.id)]."
222-
}
223-
else {
224-
Write-Verbose "[$($wi.id)]$localKey - Cached"
225-
$releasePlanWorkItems[$localKey] = $wi
226-
}
227-
}
228-
229-
if ($key -and $releasePlanWorkItems.ContainsKey($key)) {
230-
return $releasePlanWorkItems[$key]
231-
}
232-
return $null
233-
}
234-
235185
$packageWorkItems = @{}
236186
$packageWorkItemWithoutKeyFields = @{}
237187

@@ -545,40 +495,17 @@ function CreateOrUpdatePackageWorkItem($lang, $pkg, $verMajorMinor, $existingIte
545495
}
546496
}
547497

548-
$newparentItem = FindOrCreateReleasePlanParent $serviceName $pkgDisplayName -outputCommand $false
498+
$newparentItem = FindOrCreatePackageGroupParent $serviceName $pkgDisplayName -outputCommand $false
549499
UpdateWorkItemParent $existingItem $newParentItem -outputCommand $outputCommand
550500
return $existingItem
551501
}
552502

553-
$parentItem = FindOrCreateReleasePlanParent $serviceName $pkgDisplayName -outputCommand $false
503+
$parentItem = FindOrCreatePackageGroupParent $serviceName $pkgDisplayName -outputCommand $false
554504
$workItem = CreateWorkItem $title "Package" "Release" "Release" $fields $assignedTo $parentItem.id -outputCommand $outputCommand
555505
Write-Host "[$($workItem.id)]$lang - $pkgName($verMajorMinor) - Created"
556506
return $workItem
557507
}
558508

559-
function FindOrCreateReleasePlanParent($serviceName, $packageDisplayName, $outputCommand = $true, $ignoreReleasePlannerTests = $true)
560-
{
561-
$existingItem = FindReleasePlanWorkItem $serviceName $packageDisplayName -outputCommand $outputCommand -ignoreReleasePlannerTests $ignoreReleasePlannerTests
562-
if ($existingItem) {
563-
Write-Host "Found existing release plan work item [$($existingItem.id)]"
564-
$newparentItem = FindOrCreatePackageGroupParent $serviceName $packageDisplayName -outputCommand $outputCommand -ignoreReleasePlannerTests $ignoreReleasePlannerTests
565-
UpdateWorkItemParent $existingItem $newParentItem
566-
return $existingItem
567-
}
568-
569-
$fields = @()
570-
$fields += "`"PackageDisplayName=${packageDisplayName}`""
571-
$fields += "`"ServiceName=${serviceName}`""
572-
$productParentItem = FindOrCreatePackageGroupParent $serviceName $packageDisplayName -outputCommand $outputCommand -ignoreReleasePlannerTests $ignoreReleasePlannerTests
573-
$title = "Release Plan - $($packageDisplayName)"
574-
$workItem = CreateWorkItem $title "Release Plan" "Release" "Release" $fields $null $productParentItem.id
575-
576-
$localKey = BuildHashKey $serviceName $packageDisplayName
577-
Write-Host "[$($workItem.id)]$localKey - Created release plan work item"
578-
$releasePlanWorkItems[$localKey] = $workItem
579-
return $workItem
580-
}
581-
582509
function FindOrCreatePackageGroupParent($serviceName, $packageDisplayName, $outputCommand = $true, $ignoreReleasePlannerTests = $true)
583510
{
584511
$existingItem = FindParentWorkItem $serviceName $packageDisplayName -outputCommand $outputCommand -ignoreReleasePlannerTests $ignoreReleasePlannerTests

eng/common/scripts/TypeSpec-Project-Generate.ps1

-7
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,6 @@ function NpmInstallForProject([string]$workingDirectory) {
5353
Copy-Item -Path $emitterPackageLock -Destination "package-lock.json" -Force
5454
}
5555

56-
$useAlphaNpmRegistry = (Get-Content $replacementPackageJson -Raw).Contains("-alpha.")
57-
58-
if($useAlphaNpmRegistry) {
59-
Write-Host "Package.json contains '-alpha.' in the version, Creating .npmrc using public/azure-sdk-for-js-test-autorest feed."
60-
"registry=https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js-test-autorest@local/npm/registry/ `n`nalways-auth=true" | Out-File '.npmrc'
61-
}
62-
6356
if ($usingLockFile) {
6457
Invoke-LoggedCommand "npm ci"
6558
}

0 commit comments

Comments
 (0)