add osdisk full cache feature#9875
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>
|
|
Hi @weiliu2dev Release SuggestionsModule: aks-preview
Notes
|
There was a problem hiding this comment.
Pull request overview
Adds support in aks-preview for enabling the full-cache ephemeral OS disk feature on AKS node pools via a new preview flag, including argument plumbing, validation, help text, and test coverage updates.
Changes:
- Introduces
--enable-os-disk-full-caching(preview) foraz aks createandaz aks nodepool add, wiring it into the agentpool decorator to setenable_os_disk_full_caching. - Adds CLI-side validation to reject the flag when
--node-osdisk-type Managedis specified. - Updates help/history and adds unit + live-only scenario tests for the new behavior.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/aks-preview/HISTORY.rst | Documents the new preview flag and its prerequisites/immutability notes. |
| src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py | Adds live-only end-to-end scenarios for create/nodepool add using the new flag. |
| src/aks-preview/azext_aks_preview/tests/latest/test_agentpool_decorator.py | Adds unit tests for context getter + decorator setup logic for the new property. |
| src/aks-preview/azext_aks_preview/custom.py | Adds the new argument to aks_create and aks_agentpool_add function signatures so it flows via raw_parameters. |
| src/aks-preview/azext_aks_preview/agentpool_decorator.py | Implements getter + setup method to apply enable_os_disk_full_caching onto the AgentPool model. |
| src/aks-preview/azext_aks_preview/_validators.py | Adds validation preventing use with Managed OS disks. |
| src/aks-preview/azext_aks_preview/_params.py | Registers the new CLI arguments for create/nodepool add and wires the validator. |
| src/aks-preview/azext_aks_preview/_help.py | Documents the new flag in command help for create/nodepool add. |
Comments suppressed due to low confidence (1)
src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py:7282
- This command also uses
--enable-osdisk-full-caching, but_params.pyonly registers--enable-os-disk-full-cachingand--enable-osdisk-fc. The live-only test will fail unless the option name is corrected (or an alias is added).
"aks nodepool add --resource-group={resource_group} --cluster-name={name} --name={nodepool2_name} "
"--node-vm-size Standard_D8ds_v5 --node-osdisk-type Ephemeral "
"--enable-osdisk-full-caching "
"--aks-custom-headers=AKSHTTPCustomFeatures=Microsoft.ContainerService/FullCachePreview",
checks=[
|
Please fix this error
https://github.com/Azure/azure-cli-extensions/actions/runs/25900023873/job/76121212994?pr=9875 |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |


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.