Skip to content

{AKS} Add az aks operation list - #10286

Open
Shaoru Hu (HuShaoRu) wants to merge 3 commits into
Azure:mainfrom
HuShaoRu:operations
Open

{AKS} Add az aks operation list#10286
Shaoru Hu (HuShaoRu) wants to merge 3 commits into
Azure:mainfrom
HuShaoRu:operations

Conversation

@HuShaoRu

@HuShaoRu Shaoru Hu (HuShaoRu) commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

🤖 PR Validation — ⚠️ Review suggested

Breaking Changes
⚠️ None
⚠️Azure CLI Extensions Breaking Change Test
⚠️aks-preview
rule cmd_name rule_message suggest_message
⚠️ 1001 - CmdAdd aks operation list cmd aks operation list added

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

Related command

az aks operation list

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 azdev 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.

Copilot AI lite review requested due to automatic review settings September 1, 2026 20:27
@azure-client-tools-bot-prd

Copy link
Copy Markdown

Hi Shaoru Hu (@HuShaoRu),
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 pyproject.toml (or setup.py, if the extension has not migrated yet) as well.

Copilot AI left a comment

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.

🟢 Approval recommended

The new command is fully wired through commands/params/help, includes both unit and scenario coverage, and the implementation matches the documented behavior.

Pull request overview

This PR adds a new AKS-preview CLI surface area for enumerating cluster/nodepool operations, complementing the existing aks operation show / show-latest commands and making it easier to inspect historical vs active operations.

Changes:

  • Introduces az aks operation list with optional --nodepool-name scope and --active-only filtering (client-side for cluster scope; server-side for nodepool scope).
  • Wires up command registration, argument plumbing, and help content for the new command.
  • Adds unit + scenario coverage (including updated test recording) and extends table formatting to support list output.
File summaries
File Description
src/aks-preview/HISTORY.rst Documents the new az aks operation list command and its key parameters.
src/aks-preview/azext_aks_preview/custom.py Implements aks_operation_list, including local filtering for cluster-scope --active-only.
src/aks-preview/azext_aks_preview/commands.py Registers the new aks operation list command and connects its table transformer.
src/aks-preview/azext_aks_preview/_params.py Adds the active_only flag argument for aks operation list and reuses the shared nodepool_name argument.
src/aks-preview/azext_aks_preview/_help.py Adds user-facing help + examples for aks operation list.
src/aks-preview/azext_aks_preview/_format.py Adds list table formatting and refactors show formatting to share a common helper.
src/aks-preview/azext_aks_preview/tests/latest/test_custom.py Adds unit tests for list/show/show-latest behavior across cluster and nodepool scopes.
src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py Adds scenario coverage exercising the new list command variants.
src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_operations_cmds.yaml Updates the recorded HTTP interactions to include the new list calls.
Review details
  • Files reviewed: 8/9 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@microsoft-github-policy-service microsoft-github-policy-service Bot added the customer-reported Issues that are reported by GitHub users external to the Azure organization. label Sep 1, 2026
@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

Thank you for your contribution Shaoru Hu (@HuShaoRu)! We will review the pull request and get back to you soon.

@yonzhan

Copy link
Copy Markdown
Collaborator

AKS

@FumingZhang FumingZhang left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

Comment thread src/aks-preview/HISTORY.rst Outdated
@yanzhudd

Copy link
Copy Markdown
Contributor

please resolve the code conflicts.

@FumingZhang

Copy link
Copy Markdown
Member

Shaoru Hu (@HuShaoRu) please resolve merge conflicts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

act-observability-squad AKS Auto-Assign Auto assign by bot customer-reported Issues that are reported by GitHub users external to the Azure organization.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants