Skip to content

add osdisk full cache feature#9875

Merged
yanzhudd merged 4 commits into
Azure:mainfrom
weiliu2dev:weiliu2/osdisk_fc
May 18, 2026
Merged

add osdisk full cache feature#9875
yanzhudd merged 4 commits into
Azure:mainfrom
weiliu2dev:weiliu2/osdisk_fc

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 15, 2026 04:01
Copilot AI review requested due to automatic review settings May 15, 2026 04:01
@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd Bot commented May 15, 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 15, 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

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 15, 2026

Hi @weiliu2dev

Release Suggestions

Module: aks-preview

  • Update VERSION to 21.0.0b2 in src/aks-preview/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 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) for az aks create and az aks nodepool add, wiring it into the agentpool decorator to set enable_os_disk_full_caching.
  • Adds CLI-side validation to reject the flag when --node-osdisk-type Managed is 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.py only registers --enable-os-disk-full-caching and --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=[

Comment thread src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.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

Please fix this error

  • FAIL - HIGH severity: missing_parameter_help
    Parameter: aks create, enable_os_disk_full_caching - Missing help
    Parameter: aks nodepool add, enable_os_disk_full_caching - Missing help

https://github.com/Azure/azure-cli-extensions/actions/runs/25900023873/job/76121212994?pr=9875

Comment thread src/aks-preview/azext_aks_preview/_help.py Outdated
Comment thread src/aks-preview/azext_aks_preview/_help.py Outdated
@yanzhudd
Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 2 pipeline(s).

Copy link
Copy Markdown
Member

@FumingZhang FumingZhang left a comment

Choose a reason for hiding this comment

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

lgtm

@weiliu2dev
Copy link
Copy Markdown
Contributor Author

image image

@yanzhudd yanzhudd merged commit 0ff4a5e into Azure:main May 18, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants