Add --enable-os-disk-full-caching for create/nodepool add#9841
Add --enable-os-disk-full-caching for create/nodepool add#9841weiliu2dev wants to merge 36 commits into
Conversation
❌Azure CLI Extensions Breaking Change Test
|
|
Hi @weiliu2dev, |
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
CodeGen Tools Feedback CollectionThank you for using our CodeGen tool. We value your feedback, and we would like to know how we can improve our product. Please take a few minutes to fill our codegen survey |
|
Hi @weiliu2dev
|
There was a problem hiding this comment.
Pull request overview
Adds support for enabling “full-cache ephemeral OS disk” on AKS nodepools (create + nodepool add) in the aks-preview extension.
Changes:
- Adds
--enable-os-disk-full-caching(preview) toaz aks createandaz aks nodepool add. - Wires the new flag through the agentpool decorator context and agentpool profile construction.
- Adds unit tests and help/changelog documentation for the new flag.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/aks-preview/azext_aks_preview/tests/latest/test_agentpool_decorator.py | Adds unit tests for new context getter and decorator setup behavior. |
| src/aks-preview/azext_aks_preview/custom.py | Adds enable_os_disk_full_caching param to command function signatures (but also drops control_plane_scaling_size). |
| src/aks-preview/azext_aks_preview/agentpool_decorator.py | Implements getter + agentpool field setup and plugs it into profile construction. |
| src/aks-preview/azext_aks_preview/_params.py | Adds CLI arguments for the new flag (but removes control_plane_scaling_size argument). |
| src/aks-preview/azext_aks_preview/_help.py | Documents the new flag (but removes --control-plane-scaling-size help/examples). |
| src/aks-preview/HISTORY.rst | Adds changelog entry for new flag; still mentions --control-plane-scaling-size. |
Comments suppressed due to low confidence (1)
src/aks-preview/azext_aks_preview/_params.py:1274
- The
aks createargument definition forcontrol_plane_scaling_sizewas removed here, butmanaged_cluster_decorator.pystill readsraw_param['control_plane_scaling_size']and there are existing tests and HISTORY entries for this flag. This looks like an accidental regression that will make--control-plane-scaling-size/--cp-scaling-sizeunavailable. Please restore thec.argument(...)block (or, if intentionally removed, also clean up the decorator/tests/HISTORY accordingly).
c.argument(
"enable_gateway_api",
action="store_true",
help="Enable managed installation of Gateway API CRDs from the standard release channel."
)
c.argument(
"enable_app_routing_istio",
options_list=["--enable-app-routing-istio", "--enable-ari"],
action="store_true",
is_preview=True,
help="Enable Gateway API based ingress on App Routing via Istio"
)
c.argument("enable_hosted_system", action="store_true", is_preview=True)
c.argument(
"enable_continuous_control_plane_and_addon_monitor",
action="store_true",
is_preview=True,
help="Enable continuous control plane and addon monitor for the cluster.",
)
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
highly recommend adding a scenario test to cover the change |
4256ea9 to
d97c877
Compare
Added in latest push (531dffb):
|
d97c877 to
531dffb
Compare
531dffb to
f97ce1f
Compare
|
/azp run |
|
Commenter does not have sufficient privileges for PR 9841 in repo Azure/azure-cli-extensions |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
… integrity-vhd (Azure#9838) * {confcom}: Simplify logic in map_image_from_tar(_compatibility)? The current code extracts an item in the tar based on a path controlled by the manifest within the tar, which is prone to path traversal on Linux and Windows, and potentially other path confusion attacks on Windows if the Config field in the manifest contains special names. This extraction is unnecessary as we can read the content of the config directly from the tar file using extractfile. This commit simplifies it to do that. Also, there are two versions of the map_image_from_tar function, with the second one introduced in Azure#7414. Later code changes in Azure#8238 means that these functions now do basically the same thing (with different clean up code). After this simplification, these two functions are exactly the same, so let's also remove the _compatibility one. Before: > az confcom acipolicygen --image mcr.microsoft.com/aci/skr:2.14 --tar image-docker-malformed.tar --outraw-pretty-print ... Pulling and hashing images...: 0%| | 0/2 [00:00<?, ?percent/s] ERROR: The command failed with an unexpected error. Here is the traceback: ERROR: [Errno 13] Permission denied: '../../../../../blobs' Traceback (most recent call last): File "/home/mao/.az-cli-newpy.venv/lib/python3.13/site-packages/knack/cli.py", line 233, in invoke cmd_result = self.invocation.execute(args) File "/home/mao/src/github.com/Microsoft/azure-cli/src/azure-cli-core/azure/cli/core/commands/__init__.py", line 677, in execute raise ex File "/home/mao/src/github.com/Microsoft/azure-cli/src/azure-cli-core/azure/cli/core/commands/__init__.py", line 820, in _run_jobs_serially results.append(self._run_job(expanded_arg, cmd_copy)) ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/mao/src/github.com/Microsoft/azure-cli/src/azure-cli-core/azure/cli/core/commands/__init__.py", line 789, in _run_job result = cmd_copy(params) File "/home/mao/src/github.com/Microsoft/azure-cli/src/azure-cli-core/azure/cli/core/commands/__init__.py", line 335, in __call__ return self.handler(*args, **kwargs) ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^ File "/home/mao/src/github.com/Microsoft/azure-cli/src/azure-cli-core/azure/cli/core/commands/command_operation.py", line 120, in handler return op(**command_args) File "/home/mao/.azure/cliextensions/confcom/azext_confcom/custom.py", line 197, in acipolicygen_confcom policy.populate_policy_content_for_all_images( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ individual_image=bool(image_name), tar_mapping=tar_mapping, faster_hashing=faster_hashing ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/home/mao/.azure/cliextensions/confcom/azext_confcom/security_policy.py", line 485, in populate_policy_content_for_all_images image_info, tar = get_image_info(progress, message_queue, tar_mapping, image) ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/mao/.azure/cliextensions/confcom/azext_confcom/template_util.py", line 111, in get_image_info image_info = os_util.map_image_from_tar_backwards_compatibility( image_name, tar_file, tar_location ) File "/home/mao/.azure/cliextensions/confcom/azext_confcom/os_util.py", line 190, in map_image_from_tar_backwards_compatibility tar.extract(info_file.name, path=tar_dir) ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/mao/.local/share/uv/python/cpython-3.13.12-linux-x86_64-gnu/lib/python3.13/tarfile.py", line 2416, in extract self._extract_one(tarinfo, path, set_attrs, numeric_owner) ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/mao/.local/share/uv/python/cpython-3.13.12-linux-x86_64-gnu/lib/python3.13/tarfile.py", line 2464, in _extract_one self._handle_fatal_error(e) ~~~~~~~~~~~~~~~~~~~~~~~~^^^ File "/home/mao/.local/share/uv/python/cpython-3.13.12-linux-x86_64-gnu/lib/python3.13/tarfile.py", line 2458, in _extract_one self._extract_member(tarinfo, os.path.join(path, tarinfo.name), ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ set_attrs=set_attrs, ^^^^^^^^^^^^^^^^^^^^ numeric_owner=numeric_owner, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ filter_function=filter_function, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ extraction_root=path) ^^^^^^^^^^^^^^^^^^^^^ File "/home/mao/.local/share/uv/python/cpython-3.13.12-linux-x86_64-gnu/lib/python3.13/tarfile.py", line 2539, in _extract_member os.makedirs(upperdirs, exist_ok=True) ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^ File "<frozen os>", line 218, in makedirs File "<frozen os>", line 228, in makedirs PermissionError: [Errno 13] Permission denied: '../../../../../blobs' To check existing issues, please visit: https://github.com/Azure/azure-cli/issues After: > az confcom acipolicygen --image mcr.microsoft.com/aci/skr:2.14 --tar image-docker-malformed.tar --outraw-pretty-print | grep -C10 layers ... Pulling and hashing images...: 100%|████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:01<00:00, 1.38percent/s] WARNING: mcr.microsoft.com/aci/skr:2.14 read from local tar file "strategy": "re2" }, { "pattern": "azurecontainerinstance_restarted_by=.+", "required": false, "strategy": "re2" } ], "exec_processes": [], "id": "mcr.microsoft.com/aci/skr:2.14", "layers": [ "a189b02d4858578459fda1dfbd7c6a4557c44208b9829e02b931771a6d611c39", "300f9661fb3d46c0f299ad6f552b7ad0c41ea5141755b0b3feaca3081a108f7a", "0afffca98bacf8e7b6e6f7982459a03219f60555523163c73c4b092e0a3deef2", "eefefd5009aed4ba4478876995d1a18aa3a670661fcc61d2e4cba6e2b79da0a1", "b868a7e1bebef40e5bf4d58fe271c0a10a351e68b12179ec019af9f6c75781ae", "8b4842f06982817534a75bcf71865213b09dfa8313229c384e5201dadbd75e25" ], ... (Validated that this matches the result of using the image reference directly without a tar, and also matches with the result of using the oci tar from `oras backup`) Signed-off-by: Tingmao Wang <tingmaowang@microsoft.com> * {confcom} Bump version to 2.0.0b3 * {confcom}: Fix type on load_json_from_str and read_file_from_tar * {confcom}: Release 2.0.0 (non-preview) * {confcom}: Bump integrity-vhd to v2.1 Take Windows version check for C-WCOW policy generation --------- Signed-off-by: Tingmao Wang <tingmaowang@microsoft.com>
Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/msazure/One/_build/results?buildId=163788277&view=results Last commit: Azure@f921179
…Azure#9820) * Add autoprotection support for blob backup instances - Bump API version to 2026-03-01 for backup-instance create, update, validate-for-backup, and validate-for-update commands - Add --auto-protection and --exclusion-prefixes parameters to initialize-backupconfig for AzureBlob and AzureDataLakeStorage - Add get_blob_autoprotection_config helper with support for BlobBackupDatasourceParametersForAutoProtection and AdlsBlobBackupDatasourceParametersForAutoProtection object types - Add validation: auto-protection is mutually exclusive with --container-list and --include-all-containers - Add 9 unit tests covering positive and negative scenarios - Bump extension version to 1.10.0 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Update src/dataprotection/HISTORY.rst Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fix three-state flag truthiness checks for AKS and mutual exclusion validation - Use 'is not None' instead of truthiness for auto_protection and auto_protection_exclusion_prefixes in AKS validation - Use 'is not None' for include_all_containers in auto-protection mutual exclusion check - Fix RST underline length for 1.10.0 in HISTORY.rst Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Skip autoprotection tests in CI due to client factory auth requirement The initialize-backupconfig command uses cf_blob_container_mgmt client factory which requires Azure login. This causes test failures in CI where no auth is available. Tests pass locally with az login. Same pattern as existing AKS config test. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Re-record VCR tests for API 2026-03-01 and skip AKS test - Re-recorded blob update_policy, disk create_backup_delete, and softdelete tests with new resources in subscription 59e574f1 (eastus) - Updated test files with new resource references (vault, storage, disk, BI names) - Added @unittest.skip to AKS update_aks_configuration test (BCDR tag policies prevent AKS cluster creation in available subscriptions) - All 64 tests pass, 23 skipped, 0 failures Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Selasie Mortey <smortey@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Zhiyi Huang <17182306+calvinhzy@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/msazure/One/_build/results?buildId=163816381&view=results Last commit: Azure@662f5f3
… Azure HorizonDB (Azure#9840) * init * Add test * PR comments Co-authored-by: Copilot <copilot@github.com> * PR comments * add service name * fix cluster list * feat(horizondb): Add list command and update version history - Register list command in cluster_commands.py to expose horizondb list operations - Add help text and usage examples in _help.py for both subscription and resource-group scopes - Add list assertions to scenario test (gated to live mode for cassette stability) - Update HISTORY.rst for version 1.0.0b1 with list command feature * fix HISTORY.rst * pr comments * fix lint errors * pr comments * test list with cluster group --------- Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Neha Rao <nehrao@microsoft.com>
Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/msazure/One/_build/results?buildId=163953408&view=results Last commit: Azure@44c03a8
Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/msazure/One/_build/results?buildId=164106879&view=results Last commit: Azure@d8cab27
…e#9863) * confcom: Remove docker dependency when tar is supplied * confcom: Remove tar check duplicacy * [confcom]: v2.0.1 * Fix lint --------- Co-authored-by: Mahati Chamarthy <mahati.chamarthy@gmail.com>
Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/msazure/One/_build/results?buildId=164107857&view=results Last commit: Azure@ee228ad
Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/msazure/One/_build/results?buildId=164108814&view=results Last commit: Azure@0445abb
Update the WAF custom rule create help to document the inline match condition arguments and replace the obsolete --defer guidance with direct create examples. Fixes Azure/azure-cli#32736 Co-authored-by: JingnanXu <jingnanxu@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/msazure/One/_build/results?buildId=164120837&view=results Last commit: Azure@2775f7a
|
please resolve the code conflicts |
| - mentionUsers: | ||
| mentionees: | ||
| - dkershaw10 | ||
| - baywet |
There was a problem hiding this comment.
may I ask why we need to modify this file?
| } | ||
| } | ||
|
|
||
|
|
There was a problem hiding this comment.
may I ask why we need to modify this file?
|
|
||
| """Fail CI if forbidden raw GitHub URL is introduced in new diff lines.""" | ||
|
|
||
| import argparse |
There was a problem hiding this comment.
may I ask why we need to modify this file?
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install wheel==0.30.0required)For new extensions:
About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update
src/index.jsonautomatically.You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify
src/index.json.