Skip to content

Commit 0f1a401

Browse files
author
Matthew Boentoro
committed
Merge branch 'dev' of https://github.com/mattboentoro/azure-cli into mattboentoro/add-user-confirmation
2 parents 4247084 + 3a2c33a commit 0f1a401

File tree

1,187 files changed

+411781
-403373
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,187 files changed

+411781
-403373
lines changed

.githooks/pre-commit

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,24 @@
11
#!/usr/bin/env sh
2-
":" //; if command -v pwsh >/dev/null 2>&1; then pwsh -ExecutionPolicy Bypass -File .githooks/pre-commit.ps1; else sh .githooks/pre-commit.sh; fi; exit $? # Try PowerShell Core first, then sh on Unix
3-
":" //; exit # Skip rest on Unix
42

5-
@echo off
6-
powershell -NoProfile -Command "if (Get-Command powershell -ErrorAction SilentlyContinue) { exit 0 } else { exit 1 }"
7-
if %errorlevel% equ 0 (
8-
powershell -ExecutionPolicy Bypass -File .githooks\pre-commit.ps1
9-
) else (
10-
echo Error: PowerShell is not available. Please install PowerShell.
11-
exit /b 1
12-
)
13-
exit /b %errorlevel%
3+
# Check if running in Windows
4+
if [ -n "$COMSPEC" ]; then
5+
# Windows section - Execute directly with PowerShell
6+
powershell -NoProfile -Command "
7+
if (Get-Command powershell -ErrorAction SilentlyContinue) {
8+
Write-Host 'PowerShell found, executing pre-commit.ps1...'
9+
powershell -ExecutionPolicy Bypass -File '.githooks\pre-commit.ps1'
10+
exit $LASTEXITCODE
11+
} else {
12+
Write-Host 'Error: PowerShell is not available. Please install PowerShell.'
13+
exit 1
14+
}
15+
"
16+
echo "Exiting with status $?"
17+
exit $?
18+
else
19+
# Unix-like system section
20+
echo "Unix-like system found, executing pre-commit.sh..."
21+
sh .githooks/pre-commit.sh
22+
echo "Exiting with status $?"
23+
exit $?
24+
fi

.githooks/pre-push

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,24 @@
11
#!/usr/bin/env sh
2-
":" //; if command -v pwsh >/dev/null 2>&1; then pwsh -ExecutionPolicy Bypass -File .githooks/pre-push.ps1; else sh .githooks/pre-push.sh; fi; exit $? # Try PowerShell Core first, then sh on Unix
3-
":" //; exit # Skip rest on Unix
42

5-
@echo off
6-
powershell -NoProfile -Command "if (Get-Command powershell -ErrorAction SilentlyContinue) { exit 0 } else { exit 1 }"
7-
if %errorlevel% equ 0 (
8-
powershell -ExecutionPolicy Bypass -File .githooks\pre-push.ps1
9-
) else (
10-
echo Error: PowerShell is not available. Please install PowerShell.
11-
exit /b 1
12-
)
13-
exit /b %errorlevel%
3+
# Check if running in Windows
4+
if [ -n "$COMSPEC" ]; then
5+
# Windows section - Execute directly with PowerShell
6+
powershell -NoProfile -Command "
7+
if (Get-Command powershell -ErrorAction SilentlyContinue) {
8+
Write-Host 'PowerShell found, executing pre-push.ps1...'
9+
powershell -ExecutionPolicy Bypass -File '.githooks\pre-push.ps1'
10+
exit $LASTEXITCODE
11+
} else {
12+
Write-Host 'Error: PowerShell is not available. Please install PowerShell.'
13+
exit 1
14+
}
15+
"
16+
echo "Exiting with status $?"
17+
exit $?
18+
else
19+
# Unix-like system section
20+
echo "Unix-like system found, executing pre-push.sh..."
21+
sh .githooks/pre-push.sh
22+
echo "Exiting with status $?"
23+
exit $?
24+
fi

.githooks/pre-push.ps1

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,10 @@ if ($mergeBase -ne $upstreamHead) {
4545
Write-Host "Would you like to automatically rebase and setup? [Y/n]" -ForegroundColor Yellow
4646

4747
try {
48-
$reader = [System.IO.StreamReader]::new("CON")
49-
$input = $reader.ReadLine()
48+
$input = Read-Host
49+
if ([string]::IsNullOrEmpty($input)) {
50+
$input = "Y"
51+
}
5052
} catch {
5153
Write-Host "Error reading input. Aborting push..." -ForegroundColor Red
5254
exit 1

.github/CODEOWNERS

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
/linter_exclusions.yml @jsntcy @kairu-ms @zhoxing-ms
88

99
/doc/ @jiasli @kairu-ms @jsntcy
10-
/tools/ @kairu-ms @jiasli @wangzelin007 @calvinhzy
10+
/tools/ @kairu-ms @jiasli @wangzelin007 @calvinhzy @bebound
1111
/scripts/ @kairu-ms @jiasli @wangzelin007 @calvinhzy @bebound
1212
/scripts/live_test @kairu-ms @wangzelin007
13-
/src/azure-cli-testsdk/ @jsntcy @jiasli @kairu-ms @wangzelin007
13+
/src/azure-cli-testsdk/ @jsntcy @jiasli @kairu-ms @wangzelin007 @bebound
1414

1515
/src/azure-cli-core/ @jiasli @evelyn-ys @jsntcy @kairu-ms @zhoxing-ms @calvinhzy @necusjz @bebound
16-
/src/azure-cli-core/azure/cli/core/_profile.py @jiasli @evelyn-ys @calvinhzy @bebound
17-
/src/azure-cli-core/azure/cli/core/auth/ @jiasli @evelyn-ys @calvinhzy @bebound
16+
/src/azure-cli-core/azure/cli/core/_profile.py @jiasli @evelyn-ys @bebound
17+
/src/azure-cli-core/azure/cli/core/auth/ @jiasli @evelyn-ys @bebound
1818
/src/azure-cli-core/azure/cli/core/extension/ @jsntcy @kairu-ms
1919
/src/azure-cli-core/azure/cli/core/style.py @jiasli @evelyn-ys @zhoxing-ms
2020
/src/azure-cli-core/azure/cli/core/aaz/ @kairu-ms @necusjz @calvinhzy @jsntcy
@@ -52,10 +52,10 @@
5252
/src/azure-cli/azure/cli/command_modules/network/ @jsntcy @kairu-ms @wangzelin007 @necusjz
5353
/src/azure-cli/azure/cli/command_modules/policyinsights/ @cheggert
5454
/src/azure-cli/azure/cli/command_modules/privatedns/ @jsntcy @kairu-ms @necusjz
55-
/src/azure-cli/azure/cli/command_modules/profile/ @jiasli @evelyn-ys @calvinhzy @bebound
55+
/src/azure-cli/azure/cli/command_modules/profile/ @jiasli @evelyn-ys @bebound
5656
/src/azure-cli/azure/cli/command_modules/rdbms/ @arde0708 @evelyn-ys @calvinhzy @alanenriqueo
5757
/src/azure-cli/azure/cli/command_modules/resource/ @zhoxing-ms @jsntcy @yanzhudd
58-
/src/azure-cli/azure/cli/command_modules/role/ @jiasli @evelyn-ys @calvinhzy @bebound
58+
/src/azure-cli/azure/cli/command_modules/role/ @jiasli @evelyn-ys @bebound
5959
/src/azure-cli/azure/cli/command_modules/search/ @huangbolun @kairu-ms
6060
/src/azure-cli/azure/cli/command_modules/servicebus/ @v-ajnava @zhoxing-ms @jsntcy @evelyn-ys
6161
/src/azure-cli/azure/cli/command_modules/serviceconnector/ @yungezz @houk-ms @xfz11 @yanzhudd @kairu-ms
@@ -65,4 +65,4 @@
6565
/src/azure-cli/azure/cli/command_modules/synapse/ @jsntcy @idear1203 @zesluo @evelyn-ys
6666
/src/azure-cli/azure/cli/command_modules/util/ @jiasli @zhoxing-ms @evelyn-ys
6767
/src/azure-cli/azure/cli/command_modules/vm/ @zhoxing-ms @jsntcy @wangzelin007 @yanzhudd @Drewm3 @TravisCragg-MSFT @nikhilpatel909 @sandeepraichura @hilaryw29 @GabstaMSFT @ramankumarlive @ushnaarshadkhan
68-
/src/azure-cli/azure/cli/command_modules/containerapp/ @ruslany @sanchitmehta @ebencarek @JennyLawrance @howang-ms @vinisoto @chinadragon0515 @vturecek @torosent @pagariyaalok @Juliehzl @jijohn14 @Greedygre
68+
/src/azure-cli/azure/cli/command_modules/containerapp/ @ruslany @sanchitmehta @ebencarek @JennyLawrance @howang-ms @vinisoto @chinadragon0515 @vturecek @torosent @pagariyaalok @Juliehzl @jijohn14 @Greedygre @zhoxing-ms @yanzhudd @ShichaoQiu

.github/policies/resourceManagement.yml

Lines changed: 52 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,18 @@ configuration:
692692
- bberera
693693
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
694694
assignMentionees: False
695+
- if:
696+
- hasLabel:
697+
label: Service Attention
698+
- hasLabel:
699+
label: CodeSigning
700+
then:
701+
- mentionUsers:
702+
mentionees:
703+
- Jaxelr
704+
- DawnWang17
705+
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
706+
assignMentionees: False
695707
- if:
696708
- hasLabel:
697709
label: Service Attention
@@ -1419,8 +1431,8 @@ configuration:
14191431
then:
14201432
- mentionUsers:
14211433
mentionees:
1422-
- raedJarrar
1423-
- jifems
1434+
- dlacy7
1435+
- NateB2
14241436
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
14251437
assignMentionees: False
14261438
- if:
@@ -1576,7 +1588,9 @@ configuration:
15761588
then:
15771589
- mentionUsers:
15781590
mentionees:
1579-
- jfggdl
1591+
- Kishp01
1592+
- veyaddan
1593+
- santoshallumicrosoft
15801594
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
15811595
assignMentionees: False
15821596
- if:
@@ -1624,6 +1638,7 @@ configuration:
16241638
mentionees:
16251639
- dkershaw10
16261640
- baywet
1641+
- SteveMutungi254
16271642
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
16281643
assignMentionees: False
16291644
- if:
@@ -2125,7 +2140,6 @@ configuration:
21252140
then:
21262141
- mentionUsers:
21272142
mentionees:
2128-
- SameergMS
21292143
- yairgil
21302144
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
21312145
assignMentionees: False
@@ -3094,6 +3108,7 @@ configuration:
30943108
mentionees:
30953109
- AzureAppServiceCLI
30963110
- antcp
3111+
- yutanglin16
30973112
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
30983113
assignMentionees: False
30993114
- if:
@@ -3108,6 +3123,19 @@ configuration:
31083123
- vicancy
31093124
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
31103125
assignMentionees: False
3126+
- if:
3127+
- hasLabel:
3128+
label: Service Attention
3129+
- hasLabel:
3130+
label: Workloads
3131+
then:
3132+
- mentionUsers:
3133+
mentionees:
3134+
- jaskisin
3135+
- ajaygit158
3136+
- praveennet
3137+
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
3138+
assignMentionees: False
31113139
description: Triage issues to the service team
31123140
- if:
31133141
- payloadType: Pull_Request
@@ -6370,5 +6398,25 @@ configuration:
63706398
users:
63716399
- ReaNAiveD
63726400
description: '[SecurityInsights] Auto assign labels and reviewers based on PR title/description.'
6401+
- if:
6402+
- payloadType: Issues
6403+
- or:
6404+
- titleContains:
6405+
pattern: '[Aa]z [Qq]uantum'
6406+
isRegex: True
6407+
- bodyContains:
6408+
pattern: '[Aa]z [Qq]uantum'
6409+
isRegex: True
6410+
- or:
6411+
- isAction:
6412+
action: Opened
6413+
then:
6414+
- addLabel:
6415+
label: Auto-Assign
6416+
- addLabel:
6417+
label: Quantum
6418+
- addLabel:
6419+
label: Service Attention
6420+
description: '[Quantum] auto assign labels and users based on issue description.'
63736421
onFailure:
63746422
onSuccess:

.github/workflows/AddIssueComment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44

55
jobs:
66
thank-user:
7-
runs-on: ubuntu-20.04
7+
runs-on: ubuntu-latest
88
permissions:
99
issues: write
1010
name: Say thanks for the Issue

.github/workflows/AddIssueCommentWithLabel.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
jobs:
77
comment-non-security:
88
if: contains(github.event.issue.labels.*.name, 'non-security')
9-
runs-on: ubuntu-20.04
9+
runs-on: ubuntu-latest
1010
permissions:
1111
issues: write
1212
name: Comment on issue

azure-pipelines.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ trigger:
77
include:
88
- '*'
99
exclude:
10-
- 'release'
10+
- 'release*'
1111

1212
pr:
1313
branches:
@@ -210,7 +210,7 @@ jobs:
210210
artifactName: metadata
211211

212212
- task: PipAuthenticate@1
213-
condition: eq(variables['Build.SourceBranch'], 'refs/heads/release')
213+
condition: startsWith(variables['Build.SourceBranch'], 'refs/heads/release')
214214
displayName: 'Pip Authenticate'
215215
inputs:
216216
artifactFeeds: $(AZURE_ARTIFACTS_FEEDS)
@@ -254,7 +254,7 @@ jobs:
254254
artifactName: metadata
255255

256256
- task: PipAuthenticate@1
257-
condition: eq(variables['Build.SourceBranch'], 'refs/heads/release')
257+
condition: startsWith(variables['Build.SourceBranch'], 'refs/heads/release')
258258
displayName: 'Pip Authenticate'
259259
inputs:
260260
artifactFeeds: $(AZURE_ARTIFACTS_FEEDS)
@@ -444,7 +444,7 @@ jobs:
444444
versionSpec: 3.12
445445

446446
- task: PipAuthenticate@1
447-
condition: eq(variables['Build.SourceBranch'], 'refs/heads/release')
447+
condition: startsWith(variables['Build.SourceBranch'], 'refs/heads/release')
448448
displayName: 'Pip Authenticate'
449449
inputs:
450450
artifactFeeds: $(AZURE_ARTIFACTS_FEEDS)
@@ -732,7 +732,7 @@ jobs:
732732
displayName: Install Docker
733733

734734
- task: PipAuthenticate@1
735-
condition: eq(variables['Build.SourceBranch'], 'refs/heads/release')
735+
condition: startsWith(variables['Build.SourceBranch'], 'refs/heads/release')
736736
displayName: 'Pip Authenticate'
737737
inputs:
738738
artifactFeeds: $(AZURE_ARTIFACTS_FEEDS)
@@ -828,7 +828,7 @@ jobs:
828828
- bash: ./scripts/ci/install_docker.sh
829829
displayName: Install Docker
830830
- task: PipAuthenticate@1
831-
condition: eq(variables['Build.SourceBranch'], 'refs/heads/release')
831+
condition: startsWith(variables['Build.SourceBranch'], 'refs/heads/release')
832832
displayName: 'Pip Authenticate'
833833
inputs:
834834
artifactFeeds: $(AZURE_ARTIFACTS_FEEDS)
@@ -950,7 +950,7 @@ jobs:
950950
- bash: ./scripts/ci/install_docker.sh
951951
displayName: Install Docker
952952
- task: PipAuthenticate@1
953-
condition: eq(variables['Build.SourceBranch'], 'refs/heads/release')
953+
condition: startsWith(variables['Build.SourceBranch'], 'refs/heads/release')
954954
displayName: 'Pip Authenticate'
955955
inputs:
956956
artifactFeeds: $(AZURE_ARTIFACTS_FEEDS)
@@ -1056,7 +1056,7 @@ jobs:
10561056
10571057
- job: CheckHeaders
10581058
displayName: "Check License, History, and DocMap"
1059-
1059+
condition: and(not(contains(variables['Build.SourceBranch'], 'lts')), not(contains(variables['System.PullRequest.TargetBranch'], 'lts')))
10601060
pool:
10611061
name: ${{ variables.ubuntu_pool }}
10621062
steps:

build_scripts/windows/scripts/build.cmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,9 @@ for /f %%f in ('dir /b /s *.pyc') do (
205205
)
206206
popd
207207

208-
REM Remove __pycache__
208+
REM Remove empty __pycache__ directories because .pyc files are already moved to parent directories
209209
echo remove pycache
210-
for /d /r %BUILDING_DIR%\Lib\site-packages\pip %%d in (__pycache__) do (
210+
for /d /r %BUILDING_DIR%\Lib\site-packages\ %%d in (__pycache__) do (
211211
if exist %%d rmdir /s /q "%%d"
212212
)
213213

scripts/release/debian/test_deb_package.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
mod_list = [mod for mod in sorted(os.listdir(root_dir)) if os.path.isdir(os.path.join(root_dir, mod)) and mod != '__pycache__']
1313

1414
pytest_base_cmd = '/opt/az/bin/python3 -m pytest -v --forked -p no:warnings --log-level=WARN'
15-
pytest_parallel_cmd = '{} -n auto'.format(pytest_base_cmd)
15+
pytest_parallel_cmd = '{} -n logical'.format(pytest_base_cmd)
1616

1717
# cloud: https://github.com/Azure/azure-cli/pull/14994
1818
# appservice: https://github.com/Azure/azure-cli/pull/19810

0 commit comments

Comments
 (0)