Skip to content

fix(aks-preview): allow longer node pool names - #10458

Merged
NoriZC merged 3 commits into
Azure:mainfrom
InduSridhar:aks-preview-allow-longer-node-pool-names
Oct 15, 2026
Merged

NoriZC merged 3 commits into
Azure:mainfrom
InduSridhar:aks-preview-allow-longer-node-pool-names

Conversation

@InduSridhar

@InduSridhar InduSridhar commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

🤖 PR Validation — ️✔️ All clear

Breaking Changes
️✔️ None

Allow longer node pool names; the service enforces the actual limit. Today, aks-preview rejects names longer than 12 characters locally, including on read and delete operations. This change raises the CLI's outer ceiling to 39 while leaving pool-type and subscription-specific limits to the service.

Related command

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

Changes

  • Raise the shared node pool name validator limit and error message from 12 to 39; preserve existing alphanumeric validation and empty-name handling.
  • Replace fixed-length help text with a link to AKS naming rules.
  • Cover 12-, 13-, and 39-character accepted names and 40-character rejection for both nodepool and agent pool validators; retain non-alphanumeric rejection tests.
  • Add a Pending release-history entry, following HISTORY.rst guidance; leave the release version unchanged.

Validation

  • All 266 tests in azext_aks_preview.tests.latest.test_validators passed using python -m unittest.
  • With the patched extension loaded, az aks nodepool show against a nonexistent resource group returned ResourceGroupNotFound for both 13- and 39-character names.
  • A 40-character name was rejected 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 for an overlength machines-pool name have not been independently tested. Terraform validation is outside this change.

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.

azdev style and index checks have not been run locally.

Copilot AI balanced review requested due to automatic review settings October 12, 2026 17:40
@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 change is consistent across affected commands and has adequate boundary coverage.

0 open findings

What changed in this PR

Raises AKS Preview’s client-side node pool name ceiling to 39 characters while delegating stricter limits to the service.

Changes:

  • Updates shared validation and help text.
  • Adds boundary tests for 12, 13, 39, and 40 characters.
  • Documents the change in pending release history.
File Description
src/​aks-preview/​HISTORY.rst Adds the pending release note.
src/​aks-preview/​azext_aks_preview/​tests/​latest/​test_validators.py Covers validation boundaries and empty names.
src/​aks-preview/​azext_aks_preview/​_validators.py Raises the maximum from 12 to 39.
src/​aks-preview/​azext_aks_preview/​_params.py Replaces fixed-limit help with naming-rule guidance.

🧠 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

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).

@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/azext_aks_preview/_validators.py
@InduSridhar InduSridhar changed the title fix(aks-preview): allow longer node pool names fix(aks-preview): allow node pool names up to 39 characters Oct 13, 2026
@InduSridhar InduSridhar changed the title fix(aks-preview): allow node pool names up to 39 characters fix(aks-preview): allow longer node pool names Oct 13, 2026
FumingZhang
FumingZhang previously approved these changes Oct 13, 2026
@FumingZhang

Copy link
Copy Markdown
Member

please resolve merge conflicts InduSridhar

@NoriZC
NoriZC merged commit ee0de09 into Azure:main Oct 15, 2026
24 checks passed
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants