Skip to content

Commit 0febd25

Browse files
Merge branch 'Azure:main' into main
2 parents 07b9c78 + d231b7b commit 0febd25

File tree

1,751 files changed

+60348
-250159
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,751 files changed

+60348
-250159
lines changed

.github/CODEOWNERS

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@
227227

228228
# ServiceLabel: %Cosmos
229229
# PRLabel: %Cosmos
230-
/sdk/cosmos/ @annatisch @Azure/azure-cosmos-python-sdk
230+
/sdk/cosmos/ @Azure/azure-cosmos-python-sdk
231231

232232
# ServiceLabel: %Cosmos %Service Attention
233233
#/<NotInRepo>/ @pjohari-ms @simorenoh @AbhinavTrips @bambriz @pilchie
@@ -299,27 +299,26 @@
299299

300300
# ServiceLabel: %Maps
301301
# PRLabel: %Maps
302-
/sdk/maps/ @dubiety
302+
/sdk/maps/ @dubiety @andykao1213
303303

304304
# ServiceLabel: %Mixed Reality
305305
# PRLabel: %Mixed Reality
306306
/sdk/mixedreality/azure-mixedreality-authentication/ @RamonArguelles
307307
/sdk/remoterendering/ @FlorianBorn71
308308

309-
# AzureSdkOwners: @kristapratico
310309
# ServiceLabel: %OpenAI
311310
# ServiceOwners: @trrwilson
312311

313312
# PRLabel: %OpenAI
314-
/sdk/openai/ @kristapratico @glecaros
313+
/sdk/openai/ @trrwilson
315314

316315
# ServiceLabel: %Operator Nexus - Network Cloud
317316
# PRLabel: %Operator Nexus - Network Cloud
318317
/sdk/networkcloud/ @Azure/azure-sdk-write-networkcloud
319318

320319
# ServiceLabel: %Purview
321320
# PRLabel: %Purview
322-
/sdk/purview/ @saxenarahulMs
321+
/sdk/purview/ @saxenarahulMs @adyabansal-ms
323322

324323
# ServiceLabel: %Recovery Services
325324
# ServiceOwners: @Daya-Patil @Sharmistha-Rai

.vscode/cspell.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,7 @@
377377
"prebuilts",
378378
"premf",
379379
"prevsnapshot",
380+
"prompty",
380381
"pschema",
381382
"PSECRET",
382383
"pydantic",
@@ -1411,6 +1412,8 @@
14111412
"Inadherent",
14121413
"nbformat",
14131414
"nbconvert",
1415+
"onedp",
1416+
"azureai",
14141417
]
14151418
},
14161419
{
@@ -1840,6 +1843,13 @@
18401843
"adfsasdfzsd"
18411844
]
18421845
},
1846+
{
1847+
"filename": "sdk/appconfiguration/azure-appconfiguration-provider/**",
1848+
"words": [
1849+
"aicc",
1850+
"AICC"
1851+
]
1852+
},
18431853
{
18441854
"filename": "sdk/personalizer/test-resources.json",
18451855
"words": [

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ You can find service libraries in the `/sdk` directory.
1212

1313
### Prerequisites
1414

15-
The client libraries are supported on Python 3.8 or later. For more details, please read our page on [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/wiki/Azure-SDKs-Python-version-support-policy).
15+
The client libraries are supported on Python 3.9 or later. For more details, please read our page on [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/wiki/Azure-SDKs-Python-version-support-policy).
1616

1717
## Packages available
1818

doc/analyze_check_versions.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ This table is to clarify the currently pinned version of tools we run in CI and
55

66
| Tool | Current Version | Next Version | Next Version Merge Date |
77
|------|-----------------|--------------|-------------------------|
8-
Pylint | 3.2.7 | 3.2.7 | 2025-04-14 |
9-
Pylint Guidelines Checker | 0.4.1 | 0.5.1 | 2025-04-14 |
10-
MyPy | 1.13.0 | 1.14.1 | 2025-04-14 |
11-
Pyright | 1.1.389 | 1.1.391 | 2025-04-14 |
8+
Pylint | 3.2.7 | 3.2.7 | 2025-07-21 |
9+
Pylint Guidelines Checker | 0.5.4 | 0.5.4 | 2025-07-21 |
10+
MyPy | 1.14.1 | 1.14.1 | 2025-07-21 |
11+
Pyright | 1.1.391 | 1.1.391 | 2025-07-21 |
1212
Sphinx | 8.2.0 | N/A | N/A |
1313
Black | 24.4.0 | N/A | N/A |

doc/dev/tests.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -174,15 +174,12 @@ Live Azure resources will be necessary in order to run live tests and produce re
174174
resource management commands, documented in [/eng/common/TestResources][test_resources], that streamline this process.
175175
Both pure ARM templates (`test-resources.json`) and BICEP files (`test-resources.bicep`) are supported.
176176

177-
User-based authentication is preferred when using test resources. To enable this:
178-
- Use the [`-UserAuth` command flag][user_auth_flag] when running the `New-TestResources` script.
177+
User-based authentication is preferred when using test resources. The `New-TestResources` script defaults to user-based authentication. To use it:
179178
- Choose a development tool to authenticate with by setting an `AZURE_TEST_USE_*_AUTH` environment variable to "true" (tests will authenticate as the tool's logged-in user). The following tools are supported, listed in the order that authentication will be attempted in if requested:
180179
1. Azure PowerShell: set `AZURE_TEST_USE_PWSH_AUTH`.
181180
2. Azure CLI (`az`): set `AZURE_TEST_USE_CLI_AUTH`.
182-
3. Visual Studio Code: set `AZURE_TEST_USE_VSCODE_AUTH`.
183181
4. Azure Developer CLI (`azd`): set `AZURE_TEST_USE_AZD_AUTH`.
184-
- Ensure you're logged into the tool you choose -- if
185-
you used `New-TestResources.ps1` to deploy resources, you'll already have logged in with Azure PowerShell.
182+
- Ensure you're logged into the tool you choose -- if you used `New-TestResources` to deploy resources, you'll already have logged in with Azure PowerShell.
186183

187184
**Important:** these environment variables will only be successfully used if test credentials are fetched with the
188185
[`AzureRecordedTestCase.get_credential`][get_credential] method. See [Write your tests](#write-your-tests) for details.
@@ -215,11 +212,10 @@ environment variables necessary to run live tests for the service. After storing
215212
-- formatted as `VARIABLE=value` on separate lines -- your credentials and test configuration variables will be set in
216213
our environment when running tests.
217214

218-
If you used the [`-UserAuth` command flag][user_auth_flag] to deploy test resources, choose a development tool to
215+
Since `New-TestResources` defaults to user-based authentication, choose a development tool to
219216
authenticate with by setting an `AZURE_TEST_USE_*_AUTH` environment variable to "true". The following tools are supported, listed in the order that authentication will be attempted in if requested:
220217
1. Azure PowerShell: set `AZURE_TEST_USE_PWSH_AUTH`.
221218
2. Azure CLI (`az`): set `AZURE_TEST_USE_CLI_AUTH`.
222-
3. Visual Studio Code: set `AZURE_TEST_USE_VSCODE_AUTH`.
223219
4. Azure Developer CLI (`azd`): set `AZURE_TEST_USE_AZD_AUTH`.
224220

225221
**Important:** these environment variables will only be successfully used if test credentials are fetched with the
@@ -611,4 +607,3 @@ For information about more advanced testing scenarios, refer to the [advanced te
611607
[test_proxy_startup]: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/test_proxy_migration_guide.md#start-the-proxy-server
612608
[test_resources]: https://github.com/Azure/azure-sdk-for-python/tree/main/eng/common/TestResources#readme
613609
[troubleshooting_guide]: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/test_proxy_troubleshooting.md
614-
[user_auth_flag]: https://github.com/Azure/azure-sdk-for-python/blob/main/eng/common/TestResources/New-TestResources.ps1.md#-userauth

eng/apiview_reqs.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ tomli==2.2.1
1414
tomlkit==0.13.2
1515
typing_extensions==4.12.2
1616
wrapt==1.17.2
17-
apiview-stub-generator==0.3.17
17+
apiview-stub-generator==0.3.18

eng/common/TestResources/New-TestResources.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -657,6 +657,7 @@ $serialized
657657
'`@ | ConvertFrom-Json -AsHashtable
658658
# Set global variables that aren't always passed as parameters
659659
`$ResourceGroupName = `$parameters.ResourceGroupName
660+
`$AdditionalParameters = `$parameters.AdditionalParameters
660661
`$DeploymentOutputs = `$parameters.DeploymentOutputs
661662
$postDeploymentScript `@parameters
662663
"@

eng/common/pipelines/templates/archetype-typespec-emitter.yml

Lines changed: 64 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,15 @@ parameters:
6767
type: object
6868
default: []
6969

70+
# The path to the emitter package json file.
71+
- name: EmitterPackageJsonOutputPath
72+
type: string
73+
default: "eng/emitter-package.json"
74+
75+
# The relative path to the emitter package.
76+
- name: EmitterPackagePath
77+
type: string
78+
7079
extends:
7180
template: /eng/pipelines/templates/stages/1es-redirect.yml
7281
parameters:
@@ -89,24 +98,34 @@ extends:
8998

9099
- ${{ parameters.InitializationSteps }}
91100

101+
# Initialize-WorkingDirectory.ps1 is responsible for setting the emitterVersion output variable.
92102
- task: PowerShell@2
93103
displayName: 'Run initialize script'
104+
name: initialize
94105
inputs:
95106
pwsh: true
96107
filePath: $(Build.SourcesDirectory)/eng/scripts/typespec/Initialize-WorkingDirectory.ps1
97-
arguments: -UseTypeSpecNext:$${{ parameters.UseTypeSpecNext }}
108+
${{ if parameters.BuildPrereleaseVersion }}:
109+
arguments: >
110+
-PrereleaseSuffix "-alpha.$(Build.BuildNumber)"
111+
-OutputDirectory "$(Build.ArtifactStagingDirectory)"
112+
-UseTypeSpecNext:$${{ parameters.UseTypeSpecNext }}
113+
-EmitterPackagePath:${{ parameters.EmitterPackagePath }}
114+
${{ else }}:
115+
arguments: >
116+
-OutputDirectory "$(Build.ArtifactStagingDirectory)"
117+
-UseTypeSpecNext:$${{ parameters.UseTypeSpecNext }}
118+
-EmitterPackagePath:${{ parameters.EmitterPackagePath }}
98119
99120
- task: PowerShell@2
100121
displayName: 'Run build script'
101-
name: ci_build
102122
inputs:
103123
pwsh: true
104124
filePath: $(Build.SourcesDirectory)/eng/scripts/typespec/Build-Emitter.ps1
105125
arguments: >
106-
-BuildNumber "$(Build.BuildNumber)"
107-
-OutputDirectory "$(Build.ArtifactStagingDirectory)"
126+
-OutputDirectory "$(Build.ArtifactStagingDirectory)/packages"
108127
-TargetNpmJsFeed:$${{ parameters.PublishPublic }}
109-
-Prerelease:$${{ parameters.BuildPrereleaseVersion }}
128+
-EmitterPackagePath:${{ parameters.EmitterPackagePath }}
110129
111130
- pwsh: |
112131
$sourceBranch = '$(Build.SourceBranch)'
@@ -132,10 +151,7 @@ extends:
132151
artifactPath: $(Build.ArtifactStagingDirectory)
133152

134153
# Publish stage
135-
# Responsible for publishing the packages in `build_artifacts/packages` and producing `emitter-package-lock.json`
136-
# Produces the artifact `publish_artifacts` which contains the following:
137-
# emitter-package.json: Created using the package json from the build step.
138-
# emitter-package-lock.json: Created by calling `npm install` using `emitter-package.json`
154+
# Responsible for publishing the packages in `build_artifacts/packages`
139155
- ${{ if parameters.ShouldPublish }}:
140156
- stage: Publish
141157
dependsOn:
@@ -189,32 +205,6 @@ extends:
189205
ServiceEndpointUrl: https://api.esrp.microsoft.com
190206
MainPublisher: ESRPRELPACMANTEST
191207

192-
- task: PowerShell@2
193-
displayName: Create emitter-package.json
194-
inputs:
195-
pwsh: true
196-
filePath: ./eng/common/scripts/typespec/New-EmitterPackageJson.ps1
197-
arguments: >
198-
-PackageJsonPath '$(buildArtifactsPath)/lock-files/package.json'
199-
-OverridesPath '$(buildArtifactsPath)/overrides.json'
200-
-OutputDirectory '$(Build.ArtifactStagingDirectory)'
201-
workingDirectory: $(Build.SourcesDirectory)
202-
203-
- task: PowerShell@2
204-
displayName: Create emitter-package-lock.json
205-
inputs:
206-
pwsh: true
207-
filePath: ./eng/common/scripts/typespec/New-EmitterPackageLock.ps1
208-
arguments: >
209-
-EmitterPackageJsonPath '$(Build.ArtifactStagingDirectory)/emitter-package.json'
210-
-OutputDirectory '$(Build.ArtifactStagingDirectory)'
211-
workingDirectory: $(Build.SourcesDirectory)
212-
213-
- template: /eng/common/pipelines/templates/steps/publish-1es-artifact.yml
214-
parameters:
215-
artifactName: publish_artifacts
216-
artifactPath: $(Build.ArtifactStagingDirectory)
217-
218208
# Regenerate stage
219209
# Responsible for regenerating the SDK code using the emitter package and the generation matrix.
220210
- ${{ if and(parameters.ShouldPublish, parameters.ShouldRegenerate) }}:
@@ -224,7 +214,7 @@ extends:
224214
- Publish
225215
variables:
226216
pullRequestTargetBranch: 'main'
227-
publishArtifactsPath: $(Pipeline.Workspace)/publish_artifacts
217+
buildArtifactsPath: $(Pipeline.Workspace)/build_artifacts
228218
branchName: $[stageDependencies.Build.Build.outputs['set_branch_name.branchName']]
229219
pool: ${{ parameters.Pool }}
230220
jobs:
@@ -240,12 +230,27 @@ extends:
240230
displayName: Download pipeline artifacts
241231

242232
- pwsh: |
243-
Write-Host "Copying emitter-package.json to $(Build.SourcesDirectory)/eng"
244-
Copy-Item $(publishArtifactsPath)/emitter-package.json $(Build.SourcesDirectory)/eng/ -Force
233+
npm install -g @azure-tools/typespec-client-generator-cli@latest
234+
displayName: Install tsp-client
245235
246-
Write-Host "Copying emitter-package-lock.json to $(Build.SourcesDirectory)/eng"
247-
Copy-Item $(publishArtifactsPath)/emitter-package-lock.json $(Build.SourcesDirectory)/eng/ -Force
248-
displayName: Copy emitter-package json files
236+
- pwsh: |
237+
Write-Host "Overrides location: $(buildArtifactsPath)/packages/overrides.json"
238+
239+
if (Test-Path -Path '$(buildArtifactsPath)/packages/overrides.json') {
240+
Write-Host "Using overrides.json to generate emitter-package.json"
241+
tsp-client generate-config-files `
242+
--package-json '$(buildArtifactsPath)/lock-files/package.json' `
243+
--emitter-package-json-path '${{ parameters.EmitterPackageJsonOutputPath }}' `
244+
--overrides '$(buildArtifactsPath)/packages/overrides.json'
245+
} else {
246+
Write-Host "No overrides.json found. Running tsp-client without overrides."
247+
248+
tsp-client generate-config-files `
249+
--package-json '$(buildArtifactsPath)/lock-files/package.json' `
250+
--emitter-package-json-path '${{ parameters.EmitterPackageJsonOutputPath }}'
251+
}
252+
displayName: Generate emitter-package.json and emitter-package-lock files
253+
workingDirectory: $(Build.SourcesDirectory)
249254
250255
- ${{ parameters.InitializationSteps }}
251256

@@ -291,7 +296,7 @@ extends:
291296
Paths:
292297
- "/*"
293298
- "!SessionRecords"
294-
299+
295300
- download: current
296301
displayName: Download pipeline artifacts
297302

@@ -322,7 +327,7 @@ extends:
322327
- Generate
323328
variables:
324329
generateJobResult: $[dependencies.Generate.result]
325-
emitterVersion: $[stageDependencies.Build.Build.outputs['ci_build.emitterVersion']]
330+
emitterVersion: $[stageDependencies.Build.Build.outputs['initialize.emitterVersion']]
326331
steps:
327332
- template: /eng/common/pipelines/templates/steps/sparse-checkout.yml
328333

@@ -382,6 +387,16 @@ extends:
382387
} else {
383388
Write-Error "Build.Repository.Name not in the expected {Owner}/{Name} format"
384389
}
390+
391+
$openAsDraft = -not ($reason -eq 'IndividualCI' -and $sourceBranch -eq 'refs/heads/main')
392+
Write-Host "Setting OpenAsDraftBool = $openAsDraft"
393+
Write-Host "##vso[task.setvariable variable=OpenAsDraft]$openAsDraft"
394+
if ($openAsDraft) {
395+
Write-Host "##vso[task.setvariable variable=PRLabels]Do Not Merge"
396+
} else {
397+
Write-Host "##vso[task.setvariable variable=PRLabels]"
398+
}
399+
385400
displayName: Get PR title and body
386401
387402
- task: PowerShell@2
@@ -398,8 +413,8 @@ extends:
398413
-AuthToken '$(azuresdk-github-pat)'
399414
-PRTitle '$(PullRequestTitle)'
400415
-PRBody '$(PullRequestBody)'
401-
-OpenAsDraft $true
402-
-PRLabels 'Do Not Merge'
416+
-OpenAsDraft $$(OpenAsDraft)
417+
-PRLabels '$(PRLabels)'
403418
workingDirectory: $(Build.SourcesDirectory)
404419

405420
# Test stage
@@ -432,7 +447,9 @@ extends:
432447
inputs:
433448
pwsh: true
434449
filePath: $(Build.SourcesDirectory)/eng/scripts/typespec/Initialize-WorkingDirectory.ps1
435-
arguments: -BuildArtifactsPath '$(buildArtifactsPath)'
450+
arguments: >
451+
-BuildArtifactsPath '$(buildArtifactsPath)/lock-files'
452+
-EmitterPackagePath: ${{ parameters.EmitterPackagePath }}
436453
437454
- task: PowerShell@2
438455
displayName: 'Run test script'
@@ -442,6 +459,7 @@ extends:
442459
arguments: >
443460
$(TestArguments)
444461
-OutputDirectory "$(Build.ArtifactStagingDirectory)"
462+
-EmitterPackagePath: ${{ parameters.EmitterPackagePath }}
445463
446464
- template: /eng/common/pipelines/templates/steps/publish-1es-artifact.yml
447465
parameters:

eng/common/pipelines/templates/jobs/prepare-pipelines.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ jobs:
110110
$generateUnifiedWeekly = 'true'
111111
}
112112
"net" {
113+
$generatePublicCIPipeline = 'false'
113114
$internalVariableGroups = '$(AzureSDK_Nuget_Release_Pipeline_Secrets) $(Release_Secrets_for_GitHub) $(APIReview_AutoCreate_Configurations)'
114115
$testVariableGroups = '$(Secrets_for_Resource_Provisioner)'
115116
$internalServiceConnections += ' "Azure SDK Symbols Publishing" Nuget.org'

eng/common/scripts/Helpers/ApiView-Helpers.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,14 +180,15 @@ function Set-ApiViewCommentForPR {
180180
$commentText += "APIView identified API level changes in this PR and created the following API reviews"
181181
$commentText += ""
182182

183+
$responseContent = $response.Content | ConvertFrom-Json
183184
if ($RepoName.StartsWith(("azure-sdk-for-"))) {
184-
$response | ForEach-Object {
185+
$responseContent | ForEach-Object {
185186
$commentText += "[$($_.packageName)]($($_.url))"
186187
}
187188
} else {
188189
$commentText += "| Language | API Review for Package |"
189190
$commentText += "|----------|---------|"
190-
$response | ForEach-Object {
191+
$responseContent | ForEach-Object {
191192
$commentText += "| $($_.language) | [$($_.packageName)]($($_.url)) |"
192193
}
193194
}

0 commit comments

Comments
 (0)