Skip to content

[ACS] az aks create: Make --no-ssh-key default behaviour#32115

Merged
a0x1ab merged 33 commits intoAzure:devfrom
a0x1ab:dev
Oct 3, 2025
Merged

[ACS] az aks create: Make --no-ssh-key default behaviour#32115
a0x1ab merged 33 commits intoAzure:devfrom
a0x1ab:dev

Conversation

@a0x1ab
Copy link
Copy Markdown
Member

@a0x1ab a0x1ab commented Sep 14, 2025

Related command
aks

Description

Testing Guide

  • Can be tested using az aks create with the required parameters and omitting all ssh related parameters
  • Added new test and recording to assess this functionality

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

a0x1ab added 23 commits July 29, 2025 22:45
Update template spec operations to extract and use the subscription ID from the resource ID if provided. Add tests to verify correct handling of subscription IDs in show, update, delete, and export commands for template specs.
Deleted test cases and YAML recordings related to template spec operations using a fake subscription ID. These tests were unnecessary as the functionality is already tested in other tests.
Removed redundant subscription_id variable assignments in template spec-related functions. Now, subscription_id is passed directly from parsed resource ID when template_spec is provided, improving code clarity and reducing duplication.
Introduces new test cases to validate update, show, delete and export operations for template specs using an auxiliary subscription.
Introduces the 'tags' argument to SQL server creation commands in _params.py. Adds a new test and recording to verify server creation with tags in test_sql_commands.py and corresponding YAML recording.
Added a new usage example to the SQL server create command help, demonstrating how to specify tags during server creation.
Refreshed test recording for SQL server creation with tags to reflect new API versions, updated timestamps, and changed response metadata. Ensures test compatibility with latest Azure CLI and service API updates.
Enhanced the logic for SSH key validation in AKS cluster creation to default to server-side generated keys if no local public key is found and no value is provided. Updated help documentation to clarify SSH key behavior. Added a test and recording for AKS creation without an SSH key.
Copilot AI review requested due to automatic review settings September 14, 2025 11:36
@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd bot commented Sep 14, 2025

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

@a0x1ab a0x1ab linked an issue Sep 14, 2025 that may be closed by this pull request
1 task
Simplified the assignment of the SSH key path in validate_ssh_key by improving readability.
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.

Per discussion in the issue, this should be regarded as a breaking change, could you please follow the guidance to send out the notification first?

Comment thread src/azure-cli/azure/cli/command_modules/acs/_validators.py Outdated
Refactored the SSH key validation in _validators.py to handle empty or invalid SSH key values more robustly and provide clearer error messages. Updated test recordings to reflect changes in AKS creation without an SSH key.
@FumingZhang
Copy link
Copy Markdown
Member

Per discussion in the issue, this should be regarded as a breaking change, could you please follow the guidance to send out the notification first?

please also fix failed CI checks

Simplified the validate_ssh_key function by removing an unnecessary else block before raising a CLIError for invalid SSH keys.
Adjusted the error message in validate_ssh_key to properly break lines for improved readability and consistency.
@yanzhudd
Copy link
Copy Markdown
Contributor

please fix the live test failure.
please note that we'll be starting the release process at 09/30/2025 07:00 UTC. If you want to catch this release train, please resolve it asap, otherwise it'll be postponed to next sprint.

@a0x1ab
Copy link
Copy Markdown
Member Author

a0x1ab commented Oct 1, 2025

please fix the live test failure. please note that we'll be starting the release process at 09/30/2025 07:00 UTC. If you want to catch this release train, please resolve it asap, otherwise it'll be postponed to next sprint.

Due to the breaking change, this PR will need to be merged in the following sprint.

Comment thread src/azure-cli/azure/cli/command_modules/acs/_validators.py Outdated
FumingZhang
FumingZhang previously approved these changes Oct 2, 2025
@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Oct 2, 2025

Please fix CI issues

@a0x1ab
Copy link
Copy Markdown
Member Author

a0x1ab commented Oct 3, 2025

Please fix CI issues

Thank you @yonzhan, I have fixed the linting errors

@a0x1ab a0x1ab requested a review from FumingZhang October 3, 2025 06:29
@a0x1ab a0x1ab merged commit f04a19f into Azure:dev Oct 3, 2025
48 checks passed
@jiasli
Copy link
Copy Markdown
Member

jiasli commented Oct 9, 2025

No breaking change is allowed in a normal release. Please revert this PR.

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

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set '--no-ssh-key' as default bahavior for 'az aks create' in CLI

7 participants