Skip to content

Conversation

@xmzhao0822
Copy link
Contributor

Refactor code to suppress ssh access warning message when creating an automatic cluster

Related command

az aks create -g xm-rg -n xmmc --sku automatic

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.

Copilot AI review requested due to automatic review settings August 26, 2025 17:27
@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Aug 26, 2025

️✔️Azure CLI Extensions Breaking Change Test
️✔️Non Breaking Changes

@yonzhan
Copy link
Collaborator

yonzhan commented Aug 26, 2025

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

@github-actions
Copy link

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
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 refactors the SSH access warning logic to suppress warning messages when creating an automatic cluster. The change ensures that SSH access warnings are not displayed for automatic SKU clusters while maintaining warnings for base SKU clusters.

Key changes:

  • Modified SSH access setup logic to conditionally show warnings based on cluster SKU type
  • Updated test to reflect the new behavior where automatic clusters don't trigger SSH access warnings
  • Added fallback logic for SKU name retrieval

Reviewed Changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
setup.py Version bump from 18.0.0b28 to 18.0.0b29
test_aks_commands.py Changed test location from eastus2 to eastasia
test_agentpool_decorator.py Updated test to verify automatic clusters don't show SSH warnings
agentpool_decorator.py Core logic changes to suppress SSH warnings for automatic clusters
HISTORY.rst Added changelog entry for the refactoring

@github-actions
Copy link

@xmzhao0822 xmzhao0822 changed the title Refactor code to suppress ssh access warning message when creating an automatic cluster {AKS} Refactor code to suppress ssh access warning message when creating an automatic cluster Aug 26, 2025
@xmzhao0822
Copy link
Contributor Author

The queued test passed, some warning messages but I think it's not related to my change. Queued

@yanzhudd
Copy link
Contributor

Hi @FumingZhang could you please help to review the business logic? Thank you

@yanzhudd yanzhudd merged commit 6c21ed9 into Azure:main Aug 29, 2025
25 checks passed
@azclibot
Copy link
Collaborator

[Release] Update index.json for extension [ aks-preview-18.0.0b29 ] : https://dev.azure.com/msazure/One/_build/results?buildId=135432248&view=results

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

Labels

AKS Auto-Assign Auto assign by bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants