Skip to content

[AKS] az aks machine list/az aks machine show: Add zones to cli output#31668

Merged
yanzhudd merged 12 commits intoAzure:devfrom
skuchipudi295:dev
Jul 3, 2025
Merged

[AKS] az aks machine list/az aks machine show: Add zones to cli output#31668
yanzhudd merged 12 commits intoAzure:devfrom
skuchipudi295:dev

Conversation

@skuchipudi295
Copy link
Copy Markdown
Member

@skuchipudi295 skuchipudi295 commented Jun 18, 2025

Related command
az aks machine show
az aks machine list

Description
Adding zones to Machine api GA.

Testing Guide
az aks machine list should show node name, IP info {name, ipv4, ipv6 addresses, zones(if zonal)} for all nodes in an agentpool. az aks machine show should show specific machine info {name, ipv4, ipv6 addresses, zones(if zonal)} in an agentpool

History Notes

[AKS] az aks machine show/list: Add zones to table output


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

Copilot AI review requested due to automatic review settings June 18, 2025 18:28
@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd bot commented Jun 18, 2025

️✔️AzureCLI-FullTest
️✔️acr
️✔️latest
️✔️3.12
️✔️3.9
️✔️acs
️✔️latest
️✔️3.12
️✔️3.9
️✔️advisor
️✔️latest
️✔️3.12
️✔️3.9
️✔️ams
️✔️latest
️✔️3.12
️✔️3.9
️✔️apim
️✔️latest
️✔️3.12
️✔️3.9
️✔️appconfig
️✔️latest
️✔️3.12
️✔️3.9
️✔️appservice
️✔️latest
️✔️3.12
️✔️3.9
️✔️aro
️✔️latest
️✔️3.12
️✔️3.9
️✔️backup
️✔️latest
️✔️3.12
️✔️3.9
️✔️batch
️✔️latest
️✔️3.12
️✔️3.9
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.9
️✔️billing
️✔️latest
️✔️3.12
️✔️3.9
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.9
️✔️cdn
️✔️latest
️✔️3.12
️✔️3.9
️✔️cloud
️✔️latest
️✔️3.12
️✔️3.9
️✔️cognitiveservices
️✔️latest
️✔️3.12
️✔️3.9
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.9
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.9
️✔️config
️✔️latest
️✔️3.12
️✔️3.9
️✔️configure
️✔️latest
️✔️3.12
️✔️3.9
️✔️consumption
️✔️latest
️✔️3.12
️✔️3.9
️✔️container
️✔️latest
️✔️3.12
️✔️3.9
️✔️containerapp
️✔️latest
️✔️3.12
️✔️3.9
️✔️core
️✔️latest
️✔️3.12
️✔️3.9
️✔️cosmosdb
️✔️latest
️✔️3.12
️✔️3.9
️✔️databoxedge
️✔️latest
️✔️3.12
️✔️3.9
️✔️dls
️✔️latest
️✔️3.12
️✔️3.9
️✔️dms
️✔️latest
️✔️3.12
️✔️3.9
️✔️eventgrid
️✔️latest
️✔️3.12
️✔️3.9
️✔️eventhubs
️✔️latest
️✔️3.12
️✔️3.9
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.9
️✔️find
️✔️latest
️✔️3.12
️✔️3.9
️✔️hdinsight
️✔️latest
️✔️3.12
️✔️3.9
️✔️identity
️✔️latest
️✔️3.12
️✔️3.9
️✔️iot
️✔️latest
️✔️3.12
️✔️3.9
️✔️keyvault
️✔️latest
️✔️3.12
️✔️3.9
️✔️lab
️✔️latest
️✔️3.12
️✔️3.9
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.9
️✔️maps
️✔️latest
️✔️3.12
️✔️3.9
️✔️marketplaceordering
️✔️latest
️✔️3.12
️✔️3.9
️✔️monitor
️✔️latest
️✔️3.12
️✔️3.9
️✔️mysql
️✔️latest
️✔️3.12
️✔️3.9
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.9
️✔️network
️✔️latest
️✔️3.12
️✔️3.9
️✔️policyinsights
️✔️latest
️✔️3.12
️✔️3.9
️✔️privatedns
️✔️latest
️✔️3.12
️✔️3.9
️✔️profile
️✔️latest
️✔️3.12
️✔️3.9
️✔️rdbms
️✔️latest
️✔️3.12
️✔️3.9
️✔️redis
️✔️latest
️✔️3.12
️✔️3.9
️✔️relay
️✔️latest
️✔️3.12
️✔️3.9
️✔️resource
️✔️latest
️✔️3.12
️✔️3.9
️✔️role
️✔️latest
️✔️3.12
️✔️3.9
️✔️search
️✔️latest
️✔️3.12
️✔️3.9
️✔️security
️✔️latest
️✔️3.12
️✔️3.9
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.9
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.9
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.9
️✔️signalr
️✔️latest
️✔️3.12
️✔️3.9
️✔️sql
️✔️latest
️✔️3.12
️✔️3.9
️✔️sqlvm
️✔️latest
️✔️3.12
️✔️3.9
️✔️storage
️✔️latest
️✔️3.12
️✔️3.9
️✔️synapse
️✔️latest
️✔️3.12
️✔️3.9
️✔️telemetry
️✔️latest
️✔️3.12
️✔️3.9
️✔️util
️✔️latest
️✔️3.12
️✔️3.9
️✔️vm
️✔️latest
️✔️3.12
️✔️3.9

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

Hi @skuchipudi295,
Since the current milestone time is less than 7 days, this pr will be reviewed in the next milestone.

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

azure-client-tools-bot-prd bot commented Jun 18, 2025

️✔️AzureCLI-BreakingChangeTest
️✔️Non Breaking Changes

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Jun 18, 2025

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

@github-actions
Copy link
Copy Markdown

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>

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

This PR adds availability zones to the az aks machine list and az aks machine show commands by updating CLI help examples and table formatting.

  • Updated help examples to mention “Availability Zones” for both list and show commands
  • Extended the table formatter to include a new zones field in the output

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/azure-cli/azure/cli/command_modules/acs/_help.py Fixed help text examples to reference zones correctly
src/azure-cli/azure/cli/command_modules/acs/_format.py Added zones field to the table formatter for machine output
Comments suppressed due to low confidence (1)

src/azure-cli/azure/cli/command_modules/acs/_format.py:51

  • The new zones formatting logic is added here but there are no corresponding tests; consider adding unit tests for zonal and non-zonal entries.
        zones = ', '.join(part.strip() for part in entry["zones"] if entry["zones"].strip())

Comment thread src/azure-cli/azure/cli/command_modules/acs/_help.py Outdated
Comment thread src/azure-cli/azure/cli/command_modules/acs/_help.py
Comment thread src/azure-cli/azure/cli/command_modules/acs/_format.py Outdated
@FumingZhang
Copy link
Copy Markdown
Member

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

skuchipudi295 and others added 3 commits June 19, 2025 14:30
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@skuchipudi295
Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

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

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Jun 19, 2025

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

Comment thread src/azure-cli/azure/cli/command_modules/acs/_format.py Outdated
Copy link
Copy Markdown

@cceneag cceneag left a comment

Choose a reason for hiding this comment

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

已解決

@FumingZhang
Copy link
Copy Markdown
Member

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

Comment thread src/azure-cli/azure/cli/command_modules/acs/_format.py Outdated
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.

There's another failure in the CI check

E jmespath.exceptions.ParseError: Expecting: ['quoted_identifier', 'unquoted_identifier'], got: rbrace: Parse error at column 96, token "}" (RBRACE), for expression:
E "{
E name: name,
E ip: ip,
E zones: zones,
E }"
E ^

https://dev.azure.com/azclitools/public/_build/results?buildId=254136&view=logs&j=c4905e22-e505-5bfe-aa0a-49d3f9325fa2&t=cf247c3b-aad8-52b9-12ca-ceb3e5942fcf&l=3802

@FumingZhang
Copy link
Copy Markdown
Member

please fix style issue

src/azure-cli/azure/cli/command_modules/acs/_format.py:64:42: C0303: Trailing whitespace (trailing-whitespace)
src/azure-cli/azure/cli/command_modules/acs/_format.py:67:0: C0301: Line too long (135/120) (line-too-long)

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.

Queued live test to validate the change.

  • test_aks_machine_cmds

@FumingZhang
Copy link
Copy Markdown
Member

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

@FumingZhang
Copy link
Copy Markdown
Member

live test

failed with following error

      'machine_name': machine_name,
                        ^^^^^^^^^^^^
    })

E NameError: name 'machine_name' is not defined

azure-cli/src/azure-cli/azure/cli/command_modules/acs/tests/latest/test_aks_commands.py:2209: NameError

https://dev.azure.com/msazure/CloudNativeCompute/_build/results?buildId=128208339&view=logs&j=b162b355-d59d-5864-ce0f-0a70f12dd28b&t=dc59ccd1-231f-538b-777f-33a592c7ca57&l=2635

@FumingZhang
Copy link
Copy Markdown
Member

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

@FumingZhang
Copy link
Copy Markdown
Member

I suppose this is not a breaking change, please remove BREAKING CHANGE from notes.

History Notes
[AKS] BREAKING CHANGE: az aks machine list: Add zones to cli output
[AKS] BREAKING CHANGE: az aks machine show: Add zones to cli output

@FumingZhang
Copy link
Copy Markdown
Member

Re-queued live test

@FumingZhang
Copy link
Copy Markdown
Member

Please note that there's a code freeze until the latest version of azure-cli is officially released

@skuchipudi295 skuchipudi295 changed the title [AKS] az aks machine list/az aks machine show: Add zones to cli output {AKS} az aks machine list/az aks machine show: Add zones to cli output Jun 26, 2025
@skuchipudi295 skuchipudi295 changed the title {AKS} az aks machine list/az aks machine show: Add zones to cli output [AKS] az aks machine list/az aks machine show: Add zones to cli output Jun 26, 2025
@yanzhudd
Copy link
Copy Markdown
Contributor

yanzhudd commented Jul 2, 2025

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

@yanzhudd yanzhudd merged commit 8d8ad53 into Azure:dev Jul 3, 2025
48 checks passed
@yanzhudd
Copy link
Copy Markdown
Contributor

yanzhudd commented Jul 3, 2025

optimized the history notes:
image

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

Labels

AKS az aks/acs/openshift Auto-Assign Auto assign by bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants