Skip to content

Commit 0f5d84d

Browse files
Merge remote-tracking branch 'upstream/main'
2 parents 69ef803 + dfd6e4c commit 0f5d84d

File tree

520 files changed

+130962
-84295
lines changed

Some content is hidden

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

520 files changed

+130962
-84295
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
@@ -66,8 +66,10 @@ if ($AZURE_CLI_FOLDER) {
6666
Write-Host "Would you like to automatically rebase and setup? [Y/n]" -ForegroundColor Yellow
6767

6868
try {
69-
$reader = [System.IO.StreamReader]::new("CON")
70-
$input = $reader.ReadLine()
69+
$input = Read-Host
70+
if ([string]::IsNullOrEmpty($input)) {
71+
$input = "Y"
72+
}
7173
} catch {
7274
Write-Host "Error reading input. Aborting push..." -ForegroundColor Red
7375
exit 1

linter_exclusions.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,11 @@ aks update:
207207
cluster_service_load_balancer_health_probe_mode:
208208
rule_exclusions:
209209
- option_length_too_long
210+
arcdata dc config init:
211+
parameters:
212+
path:
213+
rule_exclusions:
214+
- disallowed_html_tag_from_parameter
210215
arcdata dc create:
211216
parameters:
212217
logs_ui_private_key_file:
@@ -221,6 +226,12 @@ arcdata dc create:
221226
metrics_ui_public_key_file:
222227
rule_exclusions:
223228
- option_length_too_long
229+
arcdata dc:
230+
rule_exclusions:
231+
- require_wait_command_if_no_wait
232+
arcdata ad-connector:
233+
rule_exclusions:
234+
- require_wait_command_if_no_wait
224235
arcdata ad-connector create:
225236
parameters:
226237
domain_service_account_secret:
@@ -237,6 +248,17 @@ arcdata ad-connector update:
237248
secondary_domain_controllers:
238249
rule_exclusions:
239250
- option_length_too_long
251+
sql instance-failover-group-arc:
252+
rule_exclusions:
253+
- require_wait_command_if_no_wait
254+
sql instance-failover-group-arc create:
255+
parameters:
256+
partner_resource_group:
257+
rule_exclusions:
258+
- parameter_should_not_end_in_resource_group
259+
sql server-arc availability-group:
260+
rule_exclusions:
261+
- require_wait_command_if_no_wait
240262
sql server-arc availability-group create:
241263
parameters:
242264
automated_backup_preference:
@@ -268,6 +290,9 @@ sql mi-arc update:
268290
tde_protector_public_key_file:
269291
rule_exclusions:
270292
- option_length_too_long
293+
sql mi-arc:
294+
rule_exclusions:
295+
- require_wait_command_if_no_wait
271296
sql mi-arc create:
272297
parameters:
273298
sync_secondary_to_commit:

scripts/ci/avail-ext-doc/list-template.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,9 @@ author: haroldrandom
55
ms.author: jianzen
66
manager: yonzhan,yungezz
77
ms.date: {{ date }}
8-
ms.topic: article
8+
ms.topic: generated-reference
99
ms.service: azure-cli
10-
ms.devlang: azure-cli
11-
ms.tool: azure-cli
1210
ms.custom: devx-track-azurecli
13-
keywords: az extension, azure cli extensions, azure extensions
1411
---
1512

1613
# Available Azure CLI extensions

src/aks-preview/HISTORY.rst

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,37 @@ If there is no rush to release a new version, please just add a description of t
99

1010
To release a new version, please select a new version number (usually plus 1 to last patch version, X.Y.Z -> Major.Minor.Patch, more details in `\doc <https://semver.org/>`_), and then add a new section named as the new version number in this file, the content should include the new modifications and everything from the *Pending* section. Finally, update the `VERSION` variable in `setup.py` with this new version number.
1111

12+
Pending
13+
+++++++
14+
* Vendor new SDK and bump API version to 2024-10-02-preview.
15+
16+
13.0.0b8
17+
+++++++
18+
* `az aks create/update``: Update recording rule group create logic for managed prometheus addon
19+
20+
13.0.0b7
21+
+++++++
22+
* Add `--max-unavailable` to the `az aks nodepool add/update/upgrade` commands.
23+
24+
13.0.0b6
25+
+++++++
26+
* `az aks create/update`: Update parameter description of `--custom-ca-certificates`.
27+
28+
13.0.0b5
29+
+++++++
30+
* `az aks create/az aks nodepool add`: Emit error message when using `--asg-ids` alone without `--allowed-host-ports`.
31+
32+
13.0.0b4
33+
+++++++
34+
* `az aks nodepool upgrade`: Fix `--node-soak-duration` cannot be specified as 0
35+
1236
13.0.0b3
1337
+++++++
1438
* `az aks create`: Update outbound type selection logic for automatic cluster when customer brings BYO Vnet.
1539

1640
13.0.0b2
1741
+++++++
1842
* `az aks create/update`: Update advanced container networking service (acns) with 2024-09-02-preview API version enablement.
19-
20-
Pending
21-
+++++++
2243
* Vendor new SDK and bump API version to 2024-09-02-preview.
2344

2445
13.0.0b1

src/aks-preview/README.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,9 @@ Released version and adopted API version
181181
* - 9.0.0b2 ~ 13.0.0b1
182182
- 2024-07-02-preview
183183
-
184-
* - 13.0.0b2 ~ latest
184+
* - 13.0.0b2 ~ 13.0.0b7
185185
- 2024-09-02-preview
186186
-
187+
* - 13.0.0b8 ~ latest
188+
- 2024-10-02-preview
189+
-

src/aks-preview/azext_aks_preview/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def register_aks_preview_resource_type():
1616
register_resource_type(
1717
"latest",
1818
CUSTOM_MGMT_AKS_PREVIEW,
19-
SDKProfile("2024-09-02-preview", {"container_services": "2017-07-01"}),
19+
SDKProfile("2024-10-02-preview", {"container_services": "2017-07-01"}),
2020
)
2121

2222

src/aks-preview/azext_aks_preview/_help.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@
515515
- name: --ca-certs --custom-ca-trust-certificates
516516
type: string
517517
short-summary: Path to a file containing up to 10 blank line separated certificates. Only valid for linux nodes.
518-
long-summary: These certificates are used by Custom CA Trust features and will be added to trust stores of nodes. Requires Custom CA Trust to be enabled on the node.
518+
long-summary: These certificates are used by Custom CA Trust features and will be added to trust stores of nodes.
519519
- name: --enable-keda
520520
type: bool
521521
short-summary: Enable KEDA workload auto-scaler.
@@ -1186,7 +1186,7 @@
11861186
- name: --ca-certs --custom-ca-trust-certificates
11871187
type: string
11881188
short-summary: Path to a file containing up to 10 blank line separated certificates. Only valid for linux nodes.
1189-
long-summary: These certificates are used by Custom CA Trust features and will be added to trust stores of nodes. Requires Custom CA Trust to be enabled on the node.
1189+
long-summary: These certificates are used by Custom CA Trust features and will be added to trust stores of nodes.
11901190
- name: --safeguards-level
11911191
type: string
11921192
short-summary: The deployment safeguards Level. Accepted Values are [Off, Warning, Enforcement]. Requires azure policy addon to be enabled
@@ -1775,6 +1775,9 @@
17751775
- name: --node-soak-duration
17761776
type: int
17771777
short-summary: The amount of time (in minutes) to wait after draining a node and before reimaging it and moving on to next node.
1778+
- name: --max-unavailable
1779+
type: string
1780+
short-summary: The maximum number or percentage of nodes that can be simultaneously unavailable during upgrade. When specified, it represents the number or percent used, eg. 1 or 5%
17781781
- name: --kubelet-config
17791782
type: string
17801783
short-summary: Kubelet configurations for agent nodes.
@@ -1911,6 +1914,9 @@
19111914
- name: --node-soak-duration
19121915
type: int
19131916
short-summary: The amount of time (in minutes) to wait after draining a node and before reimaging it and moving on to next node.
1917+
- name: --max-unavailable
1918+
type: string
1919+
short-summary: The maximum number or percentage of nodes that can be simultaneously unavailable during upgrade. When specified, it represents the number or percent used, eg. 1 or 5%
19141920
- name: --aks-custom-headers
19151921
type: string
19161922
short-summary: Send custom headers. When specified, format should be Key1=Value1,Key2=Value2
@@ -1960,6 +1966,9 @@
19601966
- name: --node-soak-duration
19611967
type: int
19621968
short-summary: The amount of time (in minutes) to wait after draining a node and before reimaging it and moving on to next node.
1969+
- name: --max-unavailable
1970+
type: string
1971+
short-summary: The maximum number or percentage of nodes that can be simultaneously unavailable during upgrade. When specified, it represents the number or percent used, eg. 1 or 5%
19631972
- name: --mode
19641973
type: string
19651974
short-summary: The mode for a node pool which defines a node pool's primary function. If set as "System", AKS prefers system pods scheduling to node pools with mode `System`. Learn more at https://aka.ms/aks/nodepool/mode.

src/aks-preview/azext_aks_preview/_params.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@
194194
validate_custom_endpoints,
195195
validate_bootstrap_container_registry_resource_id,
196196
validate_gateway_prefix_size,
197+
validate_max_unavailable,
197198
)
198199
from azext_aks_preview.azurecontainerstorage._consts import (
199200
CONST_ACSTOR_ALL,
@@ -1469,6 +1470,7 @@ def load_arguments(self, _):
14691470
c.argument("drain_timeout", type=int)
14701471
c.argument("node_soak_duration", type=int)
14711472
c.argument("undrainable_node_behavior")
1473+
c.argument("max_unavailable", validator=validate_max_unavailable)
14721474
c.argument("mode", arg_type=get_enum_type(node_mode_types))
14731475
c.argument("scale_down_mode", arg_type=get_enum_type(scale_down_modes))
14741476
c.argument("max_pods", type=int, options_list=["--max-pods", "-m"])
@@ -1587,6 +1589,7 @@ def load_arguments(self, _):
15871589
c.argument("drain_timeout", type=int)
15881590
c.argument("node_soak_duration", type=int)
15891591
c.argument("undrainable_node_behavior")
1592+
c.argument("max_unavailable", validator=validate_max_unavailable)
15901593
c.argument("mode", arg_type=get_enum_type(node_mode_types))
15911594
c.argument("scale_down_mode", arg_type=get_enum_type(scale_down_modes))
15921595
# extensions
@@ -1657,6 +1660,7 @@ def load_arguments(self, _):
16571660
c.argument("drain_timeout", type=int)
16581661
c.argument("node_soak_duration", type=int)
16591662
c.argument("undrainable_node_behavior")
1663+
c.argument("max_unavailable", validator=validate_max_unavailable)
16601664
c.argument("snapshot_id", validator=validate_snapshot_id)
16611665
c.argument(
16621666
"yes",

0 commit comments

Comments
 (0)