Skip to content

[AKS] Allow longer node pool names - #34216

Merged
JaysonTaiMicrosoft merged 1 commit into
Azure:devfrom
InduSridhar:aks-allow-longer-node-pool-names
Oct 15, 2026
Merged

JaysonTaiMicrosoft merged 1 commit into
Azure:devfrom
InduSridhar:aks-allow-longer-node-pool-names

Conversation

@InduSridhar

@InduSridhar InduSridhar commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Related command

az aks nodepool, az aks create --nodepool-name, az aks scale --nodepool-name, and az aks machine --nodepool-name.

Description

Allow longer node pool names; the service enforces the actual limit. The CLI currently rejects names longer than 12 characters before calling Azure, including on read and delete operations. Raise its outer ceiling to 39 while leaving pool-type and subscription-specific limits to the service.

  • Update the shared validator, error message, and docstrings; preserve existing alphanumeric validation and empty-name handling.
  • Replace fixed-length help text with a link to AKS naming rules.
  • Add boundary coverage for both nodepool and agent pool validators: 12, 13, and 39 accepted; 40 rejected. Preserve non-alphanumeric rejection tests and cover empty names.

The matching aks-preview change is in Azure/azure-cli-extensions#10458.

Testing Guide

  • All 213 tests in azure.cli.command_modules.acs.tests.latest.test_validators passed using python -m unittest with the modified source.
  • Command smoke tests loaded the modified core AKS module using installed CLI dependencies, with all extensions disabled. az aks nodepool show -g <nonexistent-rg> --cluster-name x -n <name> returned ResourceGroupNotFound for both 13- and 39-character names.
  • A 40-character name failed locally with the updated 39-character error.
  • git diff --check passed.

The smoke tests establish that requests pass CLI validation. ARM enforcement of name-length constraints on actual pool operations and the service rejection of an overlength machines-pool name have not been independently tested. Local azdev style checks were not run.

History Notes

[AKS] az aks: Allow longer node pool names; the service enforces the actual limit.


  • The PR title and description follow the submitting-pull-requests guidelines.
  • I adhere to the Command Guidelines.
  • I adhere to the Error Handling Guidelines.

Copilot AI balanced review requested due to automatic review settings October 12, 2026 17:52
@InduSridhar
InduSridhar requested review from a team and FumingZhang as code owners October 12, 2026 17:52
@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 Oct 12, 2026
@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

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

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 focused validator, help, and test changes are consistent and adequately cover the intended boundaries.

0 open findings

What changed in this PR

Raises the AKS node pool name validation ceiling while delegating stricter pool-specific limits to the service.

Changes:

  • Raises the shared maximum from 12 to 39 characters.
  • Updates CLI help text with AKS naming guidance.
  • Adds validator boundary and empty-name tests.
File Description
acs/​_validators.py Updates shared node pool validation.
acs/​_params.py Revises node pool argument help.
acs/​tests/​latest/​test_validators.py Adds boundary and empty-name coverage.

🧠 Review effort: Balanced


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

@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/azure-cli/azure/cli/command_modules/acs/_validators.py
@InduSridhar InduSridhar changed the title [AKS] Allow longer node pool names; the service enforces the actual limit [AKS] Allow node pool names up to 39 characters Oct 13, 2026
@InduSridhar InduSridhar changed the title [AKS] Allow node pool names up to 39 characters [AKS] Allow longer node pool names Oct 13, 2026
@JaysonTaiMicrosoft JaysonTaiMicrosoft added the Request X Engineering Agent Ask the agent to triage this issue or review this PR label Oct 14, 2026
@x-engineering-agent

x-engineering-agent Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

X Engineering Agent Report

Review — Comments

InduSridhar

Review

Upstream CI passed. The shared validator consistently admits 12-, 13- and 39-character names and rejects 40 characters for both nodepool and agent-pool entry points; existing alphanumeric validation and empty-name handling are preserved. No confirmed source defect was found in these changes.

Regression coverage for an actual service operation with a long pool name is not verified. The author reports 213 validator tests and request-reaching smoke tests against a nonexistent resource group; those establish local validation, not ARM acceptance or the service error/output for each pool type and subscription. No Agent live test ran.

Test validation

  • Agent live test: Not run; this is a review-only PR. Check author-provided test evidence and upstream CI separately.
  • Regression coverage: For acs: 1 focused test file(s) changed. Scenario coverage is unverified; review the issue's required conditions, test setup, and assertions before approval. No linked issue was found in the PR timeline; inspect the source issue and its required scenario manually.

src/azure-cli/azure/cli/command_modules/acs/tests/latest/test_validators.py asserts both boundaries, but it does not exercise command request/response behavior. No recordings changed. The wire shape and API version are unchanged; the risk is that newly accepted long names reach service validation, where limits can differ. Before merge, verify a supported long-name az aks nodepool show/create scenario and a service-rejected name for a pool with a tighter limit, asserting the returned resource or actionable error. Rerun azdev test test_validators; use a focused scenario and recording under acs/tests/latest/ for service-backed evidence rather than treating a nonexistent-RG error as success. Owning-squad review should confirm the intended service-owned limits across the listed commands.

Risk assessment

16/100 · Low · High confidence

The Low rating is driven by public CLI behavior.

  • Change scope: 3 changed files, 43 changed lines (+32 / -11), including 2 production files.
  • Affected components: acs
  • Risk drivers: public CLI behavior (+18)
  • Regression evidence: Changed regression tests are included, reducing risk.
  • Confidence: High because changed-line patches were available for every production file.
  • Required review: Owning-squad review is recommended for acs before merge.

Posted by x-engineering-agent (Reviewer)

@JaysonTaiMicrosoft
JaysonTaiMicrosoft merged commit 1f190ee into Azure:dev Oct 15, 2026
60 checks passed
@x-engineering-agent x-engineering-agent Bot added the X Engineering Agent Reviewed Agent reviewed this PR label Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

customer-reported Issues that are reported by GitHub users external to the Azure organization. Request X Engineering Agent Ask the agent to triage this issue or review this PR X Engineering Agent Reviewed Agent reviewed this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants