Skip to content

Zoe/sync main #28116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
28cd9bf
[skip ci] Archive 8aeb2ac397c1f88633467431820b7e12b8c15735 (#28011)
azure-powershell-bot Jun 24, 2025
ade0c5d
Revert "[HDInsight] Update api version to 2025-01-15-preview" (#28012)
vidai-msft Jun 24, 2025
39ba4b7
Fix ComputeSchedule folder name (#28010)
Pan-Qi Jun 24, 2025
fa94f8a
[skip ci] Archive 39ba4b736195c15937bf0ec2d001127ba357f889 (#28015)
azure-powershell-bot Jun 24, 2025
3bb1042
Fix batch generation build artifact (#27945)
Pan-Qi Jun 24, 2025
ad7bf1c
General availability of module Az.StorageAction. (#28017)
vidai-msft Jun 24, 2025
4b2ad68
Create Az.CloudHsm Module for 2025-03-31 (#27947)
emmeliaAra Jun 24, 2025
5bf484e
[skip ci] Archive 4b2ad6806dc1042134ff78e2cd4d8890109bf21d (#28018)
azure-powershell-bot Jun 24, 2025
eefa4bb
Delete .github/workflows/clean-branches.yml (#28025)
YanaXu Jun 26, 2025
c4f8749
Bump Version for 14.2.0
azure-powershell-bot Jun 25, 2025
d8de79b
Release Az 14.2.0 (#28029)
YanaXu Jun 26, 2025
eb1f793
[Eng] Fix AutoRest suffix (#28038)
VeryEarly Jun 27, 2025
b776eb8
Live test update & issue fix (#28040)
vidai-msft Jun 27, 2025
0efe3de
Spelling Fixes (#28058)
ArieHein Jun 30, 2025
4de1345
Spelling Fixes (#28057)
ArieHein Jun 30, 2025
289bfbb
Spelling Fixes (#28054)
ArieHein Jun 30, 2025
cde7047
Spelling Fixes (#28053)
ArieHein Jun 30, 2025
f4a9320
Spelling Fixes (#28049)
ArieHein Jun 30, 2025
3809019
Spelling Fixes (#28043)
ArieHein Jun 30, 2025
66ee171
Spelling Fixes (#28048)
ArieHein Jun 30, 2025
1c4a3d6
Spelling Fixes (#28055)
ArieHein Jun 30, 2025
e2285c8
Spelling Fixes (#28046)
ArieHein Jun 30, 2025
4fd0043
Spelling Fixes (#28044)
ArieHein Jun 30, 2025
ff5bd22
Spelling Fixes (#28047)
ArieHein Jun 30, 2025
4540d40
[Eng] Fix pattern in when matching *.Autorest (#28059)
VeryEarly Jun 30, 2025
661dc9b
Skip TSP modules and skipped modules (#28037)
Pan-Qi Jun 30, 2025
a1c22d2
Improving Test-AzMySqlFlexibleServerConnect (#28039)
ShawnXxy Jun 30, 2025
957c62e
[skip ci] Archive Schedule (#28065)
azure-powershell-bot Jul 1, 2025
a301248
[skip ci] Archive a1c22d2800597d3a243d0329ff9c67fd4c1f9a01 (#28061)
azure-powershell-bot Jul 1, 2025
d9e2bdb
Spelling Fixes (#28075)
ArieHein Jul 1, 2025
af73943
Spelling Fixes (#28072)
ArieHein Jul 1, 2025
b43e4f0
Spelling Fixes (#28071)
ArieHein Jul 1, 2025
3727599
Spelling Fixes (#28070)
ArieHein Jul 1, 2025
772ee6e
Spelling Fixes (#28069)
ArieHein Jul 1, 2025
423a24f
Spelling Fixes (#28068)
ArieHein Jul 1, 2025
6448588
Spelling Fixes (#28067)
ArieHein Jul 1, 2025
0f31606
[NetAppFiles] bump to 2025-03-01 (#28042)
audunn Jul 1, 2025
50df838
Udpate example docs - CloudHsm (#28033)
emmeliaAra Jul 1, 2025
8a62ec4
[skip ci] Archive 50df838d81e01f1c1b71063eedf7968a32ce7b20 (#28076)
azure-powershell-bot Jul 1, 2025
5418017
[CI] always publish test result (#28078)
YanaXu Jul 1, 2025
02f92f5
Updated New-AzFirewallPolicyApplicationRule to only use HTTPS as the …
ajtms Jul 1, 2025
4637215
Az.Migrate - New-AzMigrateServerReplication - Minor change to switch …
ChristopherGLewis Jul 1, 2025
971a7b2
[PS] Fix too long output in example of MetricData module (#28062)
JoyerJin Jul 1, 2025
2b16d26
Update ChangeLog.md for Network (#28082)
YanaXu Jul 1, 2025
d673a3a
Improving Test-AzPostgreSqlFlexibleServerConnect (#28077)
ShawnXxy Jul 1, 2025
cc50cfb
[skip ci] Archive d673a3ade4c4205a5b7f24127ebd530f8ab33f90 (#28083)
azure-powershell-bot Jul 1, 2025
818fc50
Sync resourceManagement.yml according To ADO Wiki Page - Service Cont…
azure-powershell-bot Jul 2, 2025
ab80f18
Oracle database powershell for new version 2025-03-01 (#27895)
mihretkidane-OCI Jul 2, 2025
359f969
NetworkCloud 2025-02-01 Stable API : powershell updates (#27724)
mfoster58 Jul 2, 2025
576e828
[skip ci] Archive ab80f189b2c24c247497fbf3ada5f497afe013db (#28097)
azure-powershell-bot Jul 2, 2025
f572653
[skip ci] Archive 359f9690ff88e8ca95d5bacf795b76c5273b593b (#28098)
azure-powershell-bot Jul 2, 2025
06618c8
Merge remote-tracking branch 'Azure/main' into zoe/sync-main
Jul 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,10 @@ foreach ($moduleName in $moduleGroup) {
$result.Status = "Failed"
$result.Error = $_.Exception.Message
} finally {
$endTine = Get-Date
$result.DurationSeconds = ($endTine - $startTime).TotalSeconds
$endTime = Get-Date
$result.DurationSeconds = ($endTime - $startTime).TotalSeconds
$results += $result
$result | ConvertTo-Json -Depth 5 | Write-Output
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ foreach ($moduleName in $sortedModuleNames) {
$moduleEndTime = Get-Date
$moduleResult.DurationSeconds = ($moduleEndTime - $moduleStartTime).TotalSeconds
$results += $moduleResult
$moduleResult | ConvertTo-Json -Depth 5 | Write-Output
}

$ArtifactOutputDir = Join-Path $RepoRoot "artifacts"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ foreach ($moduleName in $moduleGroup) {
$result.Status = "Failed"
$result.Error = $_.Exception.Message
} finally {
$endTine = Get-Date
$result.DurationSeconds = ($endTine - $startTime).TotalSeconds
$endTime = Get-Date
$result.DurationSeconds = ($endTime - $startTime).TotalSeconds
$results += $result
$result | ConvertTo-Json -Depth 5 | Write-Output
}
}

Expand Down
35 changes: 20 additions & 15 deletions .azure-pipelines/PipelineSteps/BatchGeneration/filter.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,21 @@ $artifactsDir = Join-Path $RepoRoot 'artifacts'

$changedModulesDict = @{}
$changedSubModulesDict = @{}
if ($env:RUN_TEST_ON_ALL_MODULES -eq "True") {
if ($env:TEST_CHANGED_MODULES_ONLY -eq "True") {
Write-Host "Run test on generated folder changed modules"
# Only generated folder change should trigger the test
for ($i = 0; $i -lt $ChangedFiles.Count; $i++) {
if ($ChangedFiles[$i] -match '^generated/([^/]+)/([^/]+\.Autorest)/') {
$moduleName = $Matches[1]
$subModuleName = $Matches[2]
$subModule = "$moduleName/$subModuleName"

$changedModulesDict[$moduleName] = $true
$changedSubModulesDict[$subModule] = $true
}
}
}
else {
Write-Host "Run test on all modules"
$V4ModulesFile = Join-Path $artifactsDir "generationTargets.json"
$V4ModuleMaps = Get-Content -Raw -Path $V4ModulesFile | ConvertFrom-Json
Expand All @@ -31,20 +45,6 @@ if ($env:RUN_TEST_ON_ALL_MODULES -eq "True") {
}
}
}
else {
Write-Host "Run test on generated folder changed modules"
# Only generated folder change should trigger the test
for ($i = 0; $i -lt $ChangedFiles.Count; $i++) {
if ($ChangedFiles[$i] -match '^generated/([^/]+)/([^/]+\.autorest)/') {
$moduleName = $Matches[2]
$subModuleName = $Matches[3]
$subModule = "$moduleName/$subModuleName"

$changedModulesDict[$moduleName] = $true
$changedSubModulesDict[$subModule] = $true
}
}
}

$changedModules = $changedModulesDict.Keys | Sort-Object
$changedSubModules = $changedSubModulesDict.Keys | Sort-Object
Expand All @@ -63,6 +63,11 @@ foreach ($subModule in $changedSubModules) {
Write-Host "##[endgroup]"
Write-Host

$changedModulesRecordFile = Join-Path $artifactsDir 'filteredChangedModules.txt'
$changedModules | Set-Content -Path $changedModulesRecordFile -Encoding UTF8
$changedSubModulesRecordFile = Join-Path $artifactsDir 'filteredChangedSubModules.txt'
$changedSubModules | Set-Content -Path $changedSubModulesRecordFile -Encoding UTF8

$groupedBuildModules = Group-Modules -Modules $changedModules -MaxParallelJobs $MaxParallelBuildJobs
Write-Matrix -GroupedModules $groupedBuildModules -VariableName 'buildTargets' -RepoRoot $RepoRoot

Expand Down
13 changes: 8 additions & 5 deletions .azure-pipelines/PipelineSteps/BatchGeneration/prepare.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ $utilFilePath = Join-Path $RepoRoot '.azure-pipelines' 'PipelineSteps' 'BatchGen
Import-Module $utilFilePath -Force

$srcPath = Join-Path $RepoRoot 'src'
$moduleMap = Get-AutorestV4ModuleMap -srcPath $srcPath
$moduleMap = Get-BatchGenerationModuleMap -srcPath $srcPath
Write-Host "Total matched modules: $($moduleMap.Count)"

$modules = @($moduleMap.Keys | Sort-Object)
Expand All @@ -34,14 +34,17 @@ foreach ($moduleGroup in $groupedModules) {
$index++
}

$generationTargetsOutputDir = Join-Path $RepoRoot "artifacts"
if (-not (Test-Path -Path $generationTargetsOutputDir)) {
New-Item -ItemType Directory -Path $generationTargetsOutputDir
$artifactsDir = Join-Path $RepoRoot "artifacts"
if (-not (Test-Path -Path $artifactsDir)) {
New-Item -ItemType Directory -Path $artifactsDir
}
$generationTargetsOutputFile = Join-Path $generationTargetsOutputDir "generationTargets.json"
$generationTargetsOutputFile = Join-Path $artifactsDir "generationTargets.json"
$generationTargets | ConvertTo-Json -Depth 5 | Out-File -FilePath $generationTargetsOutputFile -Encoding utf8

if ($MatrixStr -and $MatrixStr.Length -gt 1) {
$MatrixStr = $MatrixStr.Substring(1)
}
Write-Host "##vso[task.setVariable variable=generationTargets;isOutput=true]{$MatrixStr}"

$V4ModulesRecordFile = Join-Path $artifactsDir 'preparedV4Modules.txt'
$modules | Set-Content -Path $V4ModulesRecordFile -Encoding UTF8
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ foreach ($subModule in $subModuleGroup) {
$endTime = Get-Date
$result.DurationSeconds = ($endTime - $startTime).TotalSeconds
$results += $result
$result | ConvertTo-Json -Depth 5 | Write-Output
}
}

Expand Down
34 changes: 22 additions & 12 deletions .azure-pipelines/PipelineSteps/BatchGeneration/util.psm1
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
function Get-AutorestV4ModuleMap {
function Get-BatchGenerationModuleMap {
param (
[string]$srcPath
)

$skippedModules = $env:SKIPPED_MODULES -split ',' | ForEach-Object { $_.Trim() }
$result = @{}
$modules = Get-ChildItem -Path $srcPath -Directory

Get-ChildItem -Path $srcPath -Directory | ForEach-Object {
$module = $_

Get-ChildItem -Path $module.FullName -Directory | Where-Object {
foreach($module in $modules) {
if ($skippedModules -contains $module.Name) {
Write-Warning "Skipping module: $($module.Name) as it is in the skipped modules list."
continue
}
$subModules = Get-ChildItem -Path $module.FullName -Directory | Where-Object {
$_.Name -like '*.autorest'
} | ForEach-Object {
$subModule = $_

}
foreach ($subModule in $subModules) {
$tspPath = Join-Path $subModule.FullName 'tsp-location.yaml'
if (Test-Path $tspPath){
Write-Warning "tsp-location.yaml found in $($subModule.FullName), skipping."
continue
}

$readmePath = Join-Path $subModule.FullName 'README.md'

if (Test-Path $readmePath) {
Expand Down Expand Up @@ -66,18 +74,19 @@ function Write-Matrix {
[string]$RepoRoot
)

Write-Host "$VariableName module groups: $($GroupedModules.Count)"
$GroupedModules | ForEach-Object { $_ -join ', ' } | ForEach-Object { Write-Host $_ }

Write-Host "##[group]$VariableName module groups: $($GroupedModules.Count)"
$targets = @{}
$MatrixStr = ""
$index = 0
foreach ($modules in $GroupedModules) {
$key = ($index + 1).ToString() + "-" + $modules.Count
$MatrixStr = "$MatrixStr,'$key':{'MatrixKey':'$key'}"
$targets[$key] = $modules
$moduleNamesStr = $modules -join ', '
Write-Host "$key : $moduleNamesStr"
$index++
}
Write-Host "##[endgroup]"

if ($MatrixStr -and $MatrixStr.Length -gt 1) {
$MatrixStr = $MatrixStr.Substring(1)
Expand All @@ -91,6 +100,7 @@ function Write-Matrix {
}
$targetsOutputFile = Join-Path $targetsOutputDir "$VariableName.json"
$targets | ConvertTo-Json -Depth 5 | Out-File -FilePath $targetsOutputFile -Encoding utf8
Write-Host
}

function Get-Targets {
Expand Down
10 changes: 9 additions & 1 deletion .azure-pipelines/batch-generation.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
parameters:
- name: TestChangedModulesOnly
displayName: 'Only run tests on modules that are changed by regeneration'
type: string
default: 'True'

variables:
IntermediateStepTimeoutInMinutes: 30
GenerateTimeoutInMinutes: 120
Expand Down Expand Up @@ -78,6 +84,8 @@ stages:
script: |
$prepareModulesPath = Join-Path "$(Build.SourcesDirectory)" '.azure-pipelines' 'PipelineSteps' 'BatchGeneration' 'prepare.ps1'
& $prepareModulesPath -RepoRoot "$(Build.SourcesDirectory)" -MaxParallelJobs "${{ variables.MaxParallelGenerateJobs }}"
env:
SKIPPED_MODULES: $(SkippedModules)

- task: PublishPipelineArtifact@1
displayName: 'Upload generated targets'
Expand Down Expand Up @@ -212,7 +220,7 @@ stages:
-ChangedFiles $changedFiles `
-RepoRoot "$(Build.SourcesDirectory)"
env:
RUN_TEST_ON_ALL_MODULES: $(RUN_TEST_ON_ALL_MODULES)
TEST_CHANGED_MODULES_ONLY: ${{ parameters.TestChangedModulesOnly }}

- task: PublishPipelineArtifact@1
displayName: 'Upload filtered targets'
Expand Down
89 changes: 27 additions & 62 deletions .azure-pipelines/live-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ parameters:
default: ' '

variables:
os_windows_2019: windows-2019
os_windows_2022: windows-2022
os_windows: windows-latest
os_linux: ubuntu-latest
os_macos: macOS-latest
win_ps_5_1: 5.1
Expand All @@ -36,8 +35,8 @@ stages:
jobs:
- template: util/live-test-steps.yml
parameters:
name: 'win_ps_5_1_win_2019'
vmImage: ${{ variables.os_windows_2019 }}
name: 'ps_5_1_windows'
vmImage: ${{ variables.os_windows }}
osType: 'Windows'
psVersion: ${{ variables.win_ps_5_1 }}
dotnetVersion: ${{ variables.dotnet_sdk_8 }}
Expand All @@ -46,18 +45,8 @@ stages:

- template: util/live-test-steps.yml
parameters:
name: 'win_ps_5_1_win_2022'
vmImage: ${{ variables.os_windows_2022 }}
osType: 'Windows'
psVersion: ${{ variables.win_ps_5_1 }}
dotnetVersion: ${{ variables.dotnet_sdk_8 }}
galleryName: ${{ parameters.GalleryName }}
pipelineBuildId: ${{ parameters.PipelineBuildId }}

- template: util/live-test-steps.yml
parameters:
name: 'ps_7_4_x_win_2019'
vmImage: ${{ variables.os_windows_2019 }}
name: 'ps_7_4_x_windows'
vmImage: ${{ variables.os_windows }}
osType: 'Windows'
psVersion: ${{ variables.ps_7_4_x }}
dotnetVersion: ${{ variables.dotnet_sdk_8 }}
Expand All @@ -66,8 +55,8 @@ stages:

- template: util/live-test-steps.yml
parameters:
name: 'ps_7_5_x_win_2019'
vmImage: ${{ variables.os_windows_2019 }}
name: 'ps_7_5_x_windows'
vmImage: ${{ variables.os_windows }}
osType: 'Windows'
psVersion: ${{ variables.ps_7_5_x }}
dotnetVersion: ${{ variables.dotnet_sdk_9 }}
Expand All @@ -76,8 +65,8 @@ stages:

- template: util/live-test-steps.yml
parameters:
name: 'ps_latest_win_2019'
vmImage: ${{ variables.os_windows_2019 }}
name: 'ps_latest_windows'
vmImage: ${{ variables.os_windows }}
osType: 'Windows'
psVersion: ${{ variables.ps_latest }}
dotnetVersion: ${{ variables.dotnet_sdk_9 }}
Expand All @@ -86,88 +75,64 @@ stages:

- template: util/live-test-steps.yml
parameters:
name: 'ps_7_4_x_win_2022'
vmImage: ${{ variables.os_windows_2022 }}
osType: 'Windows'
name: 'ps_7_4_x_linux'
vmImage: ${{ variables.os_linux }}
osType: 'Linux'
psVersion: ${{ variables.ps_7_4_x }}
dotnetVersion: ${{ variables.dotnet_sdk_8 }}
galleryName: ${{ parameters.GalleryName }}
pipelineBuildId: ${{ parameters.PipelineBuildId }}

- template: util/live-test-steps.yml
parameters:
name: 'ps_7_5_x_win_2022'
vmImage: ${{ variables.os_windows_2022 }}
osType: 'Windows'
name: 'ps_7_5_x_linux'
vmImage: ${{ variables.os_linux }}
osType: 'Linux'
psVersion: ${{ variables.ps_7_5_x }}
dotnetVersion: ${{ variables.dotnet_sdk_9 }}
galleryName: ${{ parameters.GalleryName }}
pipelineBuildId: ${{ parameters.PipelineBuildId }}

- template: util/live-test-steps.yml
parameters:
name: 'ps_latest_win_2022'
vmImage: ${{ variables.os_windows_2022 }}
osType: 'Windows'
name: 'ps_latest_linux'
vmImage: ${{ variables.os_linux }}
osType: 'Linux'
psVersion: ${{ variables.ps_latest }}
dotnetVersion: ${{ variables.dotnet_sdk_9 }}
galleryName: ${{ parameters.GalleryName }}
pipelineBuildId: ${{ parameters.PipelineBuildId }}

- template: util/live-test-steps.yml
parameters:
name: 'ps_7_4_x_linux'
vmImage: ${{ variables.os_linux }}
osType: 'Linux'
name: 'ps_7_4_x_macos'
vmImage: ${{ variables.os_macos }}
osType: 'MacOS'
psVersion: ${{ variables.ps_7_4_x }}
dotnetVersion: ${{ variables.dotnet_sdk_8 }}
galleryName: ${{ parameters.GalleryName }}
pipelineBuildId: ${{ parameters.PipelineBuildId }}

- template: util/live-test-steps.yml
parameters:
name: 'ps_7_5_x_linux'
vmImage: ${{ variables.os_linux }}
osType: 'Linux'
name: 'ps_7_5_x_macos'
vmImage: ${{ variables.os_macos }}
osType: 'MacOS'
psVersion: ${{ variables.ps_7_5_x }}
dotnetVersion: ${{ variables.dotnet_sdk_9 }}
galleryName: ${{ parameters.GalleryName }}
pipelineBuildId: ${{ parameters.PipelineBuildId }}

- template: util/live-test-steps.yml
parameters:
name: 'ps_latest_linux'
vmImage: ${{ variables.os_linux }}
osType: 'Linux'
name: 'ps_latest_macos'
vmImage: ${{ variables.os_macos }}
osType: 'MacOS'
psVersion: ${{ variables.ps_latest }}
dotnetVersion: ${{ variables.dotnet_sdk_9 }}
galleryName: ${{ parameters.GalleryName }}
pipelineBuildId: ${{ parameters.PipelineBuildId }}

# - template: util/live-test-steps.yml
# parameters:
# name: 'ps_7_4_x_macOS'
# vmImage: ${{ variables.os_macos }}
# osType: 'MacOS'
# psVersion: ${{ variables.ps_7_4_x }}
# dotnetVersion: ${{ variables.dotnet_sdk_8 }}

# - template: util/live-test-steps.yml
# parameters:
# name: 'ps_7_5_x_macOS'
# vmImage: ${{ variables.os_macos }}
# osType: 'MacOS'
# psVersion: ${{ variables.ps_7_5_x }}
# dotnetVersion: ${{ variables.dotnet_sdk_9 }}

# - template: util/live-test-steps.yml
# parameters:
# name: 'ps_latest_macOS'
# vmImage: ${{ variables.os_macos }}
# osType: 'MacOS'
# psVersion: ${{ variables.ps_latest }}
# dotnetVersion: ${{ variables.dotnet_sdk_9 }}

- stage: Report
displayName: Send Report
condition: always()
Expand Down
Loading
Loading