Skip to content

Add --enable-os-disk-full-caching for create/nodepool add#9841

Closed
weiliu2dev wants to merge 36 commits into
Azure:mainfrom
weiliu2dev:weiliu2/osdisk_fullcache
Closed

Add --enable-os-disk-full-caching for create/nodepool add#9841
weiliu2dev wants to merge 36 commits into
Azure:mainfrom
weiliu2dev:weiliu2/osdisk_fullcache

Conversation

@weiliu2dev
Copy link
Copy Markdown
Contributor


This checklist is used to make sure that common guidelines for a pull request are followed.

Related command

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (pip install wheel==0.30.0 required)
  • My extension version conforms to the Extension version schema

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.json automatically.
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.

@weiliu2dev weiliu2dev requested a review from FumingZhang as a code owner May 1, 2026 02:41
Copilot AI review requested due to automatic review settings May 1, 2026 02:41
@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd Bot commented May 1, 2026

❌Azure CLI Extensions Breaking Change Test
❌aks-preview
rule cmd_name rule_message suggest_message
1010 - ParaPropUpdate aks nodepool add cmd aks nodepool add update parameter spot_max_price: updated property default from nan to nan please change property default from nan to nan for parameter spot_max_price of cmd aks nodepool add
⚠️ 1006 - ParaAdd aks create cmd aks create added parameter enable_os_disk_full_caching
⚠️ 1006 - ParaAdd aks nodepool add cmd aks nodepool add added parameter enable_os_disk_full_caching

@azure-client-tools-bot-prd
Copy link
Copy Markdown

Hi @weiliu2dev,
Please write the description of changes which can be perceived by customers into HISTORY.rst.
If you want to release a new extension version, please update the version in setup.py as well.

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented May 1, 2026

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

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).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

CodeGen Tools Feedback Collection

Thank 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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

Hi @weiliu2dev

⚠️ Release Requirements

Module: aks-agent

  • ⚠️ Please update VERSION to be 1.0.0b24 in src/aks-agent/setup.py

Module: aks-preview

  • ⚠️ Please update VERSION to be 20.0.0b9 in src/aks-preview/setup.py

Module: azure-firewall

  • ⚠️ Please update VERSION to be 2.2.1 in src/azure-firewall/setup.py

Module: cdn

  • ⚠️ Please update VERSION to be 1.0.0b2 in src/cdn/setup.py

Module: confcom

  • ⚠️ Please update VERSION to be 2.0.2 in src/confcom/setup.py

Module: dataprotection

  • ⚠️ Please update VERSION to be 1.10.1 in src/dataprotection/setup.py

Module: fleet

  • ⚠️ Please update VERSION to be 1.10.1 in src/fleet/setup.py

Module: front-door

  • Please log updates into to src/front-door/HISTORY.rst
  • Update VERSION to 2.2.1 in src/front-door/setup.py

Module: horizondb

  • ⚠️ Please update VERSION to be 1.0.0b2 in src/horizondb/setup.py

Module: maintenance

  • ⚠️ Please update VERSION to be 2.0.0b2 in src/maintenance/setup.py

Module: managedcleanroom

  • ⚠️ Please update VERSION to be 1.0.0b8 in src/managedcleanroom/setup.py

Module: managednetworkfabric

  • ⚠️ Please update VERSION to be 10.0.0b2 in src/managednetworkfabric/setup.py

Module: sftp

  • ⚠️ Please update VERSION to be 1.0.0b4 in src/sftp/setup.py

Module: workload-orchestration

  • ⚠️ Please update VERSION to be 5.2.1 in src/workload-orchestration/setup.py

Notes

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) to az aks create and az 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 create argument definition for control_plane_scaling_size was removed here, but managed_cluster_decorator.py still reads raw_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-size unavailable. Please restore the c.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.",
        )

Comment thread src/aks-preview/HISTORY.rst
Comment thread src/aks-preview/azext_aks_preview/custom.py
Comment thread src/aks-preview/azext_aks_preview/_help.py
Comment thread src/aks-preview/azext_aks_preview/_help.py
Comment thread src/aks-preview/HISTORY.rst Outdated
@FumingZhang
Copy link
Copy Markdown
Member

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 2 pipeline(s).

@FumingZhang
Copy link
Copy Markdown
Member

highly recommend adding a scenario test to cover the change

@yonzhan yonzhan requested a review from yanzhudd May 1, 2026 07:12
@weiliu2dev weiliu2dev force-pushed the weiliu2/osdisk_fullcache branch 3 times, most recently from 4256ea9 to d97c877 Compare May 4, 2026 02:09
@weiliu2dev
Copy link
Copy Markdown
Contributor Author

highly recommend adding a scenario test to cover the change

Added in latest push (531dffb):

  • test_aks_create_with_os_disk_full_caching and test_aks_nodepool_add_with_os_disk_full_caching
    in tests/latest/test_aks_commands.py
  • Used @live_only() decorator following the enable_artifact_streaming pattern, since the feature
    is gated by Microsoft.ContainerService/FullCachePreview AFEC and an RP-side toggle
  • Removed the missing_parameter_test_coverage linter exclusions — no longer needed

@weiliu2dev weiliu2dev force-pushed the weiliu2/osdisk_fullcache branch from d97c877 to 531dffb Compare May 4, 2026 02:28
@weiliu2dev weiliu2dev force-pushed the weiliu2/osdisk_fullcache branch from 531dffb to f97ce1f Compare May 4, 2026 03:15
Comment thread src/aks-preview/HISTORY.rst
@elvazhu521
Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines
Copy link
Copy Markdown

Commenter does not have sufficient privileges for PR 9841 in repo Azure/azure-cli-extensions

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented May 12, 2026

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 2 pipeline(s).

micromaomao and others added 15 commits May 15, 2026 14:19
… 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>
…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>
… 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>
…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>
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>
@github-actions github-actions Bot added the release-version-block Updates do not qualify release version rules. NOTE: please do not edit it manually. label May 15, 2026
@yanzhudd
Copy link
Copy Markdown
Contributor

please resolve the code conflicts

- mentionUsers:
mentionees:
- dkershaw10
- baywet
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may I ask why we need to modify this file?

}
}


Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may I ask why we need to modify this file?

@weiliu2dev weiliu2dev closed this May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-version-block Updates do not qualify release version rules. NOTE: please do not edit it manually.

Projects

None yet

Development

Successfully merging this pull request may close these issues.