Repository navigation
{AKS} Fix empty alert configuration name validation - #10352
Merged
Julie Zhu (yanzhudd) merged 1 commit intoSep 17, 2026
Merged
Conversation
Validate the name before duplicate detection so an empty name cannot resolve to the collection endpoint and report a false duplicate. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Matheus Mortatti (mamortat)
requested a review
from FumingZhang
as a code owner
September 16, 2026 19:01
|
Hi Matheus Mortatti (@mamortat), |
microsoft-github-policy-service
Bot
requested review from
Julie Zhu (yanzhudd) and
Yong Zhang (yonzhan)
September 16, 2026 19:02
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The fix is covered by regression tests and no unresolved issues remain.
Pull request overview
Fixes az aks alert-config add to reject empty or missing names before SDK calls.
Changes:
- Moves duplicate detection after name validation.
- Adds regression coverage for invalid and valid names.
- Documents the fix in pending release notes.
File summaries
| File | Summary |
|---|---|
src/aks-preview/HISTORY.rst |
Documents the validation fix. |
src/aks-preview/azext_aks_preview/tests/latest/test_alert_configuration.py |
Adds validation and name-boundary tests. |
src/aks-preview/azext_aks_preview/custom.py |
Delegates duplicate detection to the internal helper. |
src/aks-preview/azext_aks_preview/alertconfiguration.py |
Validates names before lookup and preserves duplicate protection. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Collaborator
|
AKS |
FumingZhang
approved these changes
Sep 17, 2026
Julie Zhu (yanzhudd)
approved these changes
Sep 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 PR Validation — ️✔️ All clear
Summary
az aks alert-config add --name ''currently performs its duplicate-resource lookup before checking the name. The empty name resolves to the collection endpoint; its response can deserialize into a truthyAlertConfiguration, producing a misleading "already exists" error.Please specify --name for the alert configuration.before any client call.{"value": []}, asserting zero client calls; cover valid 1-character, 63-character, and internal separator names.Related command
az aks alert-config addValidation
PYTHONPATH=src/aks-preview python -m unittest azext_aks_preview.tests.latest.test_alert_configuration -q(27 tests pass on the current upstream base).git diff --cached --check.General Guidelines
azdev style aks-previewlocally? (azdevis not installed; local commit/push hooks also reported a missing virtualenv activation script.)python scripts/ci/test_index.py -qlocally? (Not run; no index or metadata changes.)