{AKS} Stabilize AKS live test scenarios - #33805
Merged
Julie Zhu (yanzhudd) merged 3 commits intoAug 4, 2026
Merged
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
microsoft-github-policy-service
Bot
requested review from
elvazhu521,
Julie Zhu (yanzhudd) and
Yong Zhang (yonzhan)
July 28, 2026 05:57
Member
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
FumingZhang
force-pushed
the
fix/aks-live-test-stability
branch
from
July 28, 2026 06:32
94f4e95 to
fed9ff5
Compare
Member
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
Member
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
Use the settled resource response after provisioning retries and treat quoted-empty injected service principal credentials as missing. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Retry only known transient AKS operation conflicts, preserve required test regions, select supported Kubernetes versions, and retire Basic Load Balancer scenarios. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Distinguish transient operation-conflict retries from the native settled-resource refetch used after provisioning polling. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
FumingZhang
force-pushed
the
fix/aks-live-test-stability
branch
from
August 4, 2026 03:24
67f9357 to
33bb099
Compare
FumingZhang
marked this pull request as ready for review
August 4, 2026 03:45
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR strengthens the AKS command module’s live-test scaffolding to reduce flaky failures in CI runners by normalizing missing credential inputs, adding bounded retries for known transient AKS conflicts, and ensuring assertions run against “settled” AKS resources re-fetched via native aks show/aks nodepool show.
Changes:
- Add normalization for optional live-test environment settings (including quoted-empty placeholders) and ensure SP-dependent scenarios are skipped when credentials are unavailable.
- Enhance the live-only
ScenarioTest.cmd()adapter to retry known transient AKS operation conflicts and, after polling toSucceeded, re-fetch the exact cluster/agentpool resource for stable checks/return values. - Add/extend unit tests covering the new normalization behavior, cmd dispatch behavior when
checks=None, transient-conflict retry behavior, and settled-result re-fetch behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/azure-cli/azure/cli/command_modules/acs/tests/latest/test_custom_preparers.py |
Adds unit tests validating normalization of optional settings and SP preparer skipping when credentials are quoted-empty. |
src/azure-cli/azure/cli/command_modules/acs/tests/latest/test_aks_provisioning_retry.py |
Expands unit coverage for live retry dispatch, settled-result refetching, and transient conflict retry logic. |
src/azure-cli/azure/cli/command_modules/acs/tests/latest/test_aks_commands.py |
Updates the live-only cmd adapter to include transient conflict retries and to re-fetch settled AKS resources after polling. |
src/azure-cli/azure/cli/command_modules/acs/tests/latest/custom_preparers.py |
Introduces _normalize_optional_live_test_setting and applies it to SP preparer settings to avoid false “present” credentials. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Member
Author
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
Julie Zhu (yanzhudd)
approved these changes
Aug 4, 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
Related command
az aksDescription
Harden AKS live tests against the failure modes observed in CLI Runner:
aks showcommands before running checks.Another operation is in progressandPutExtensionAddonHandler.PUT) with bounded exponential backoff. Other errors and expected-failure scenarios still fail immediately.Current
devalso contains the newer AKS SDK/API version that resolves the maintenance and artifact-streaming payload mismatches seen in the original run. Azure Monitor LRO poller leaks are handled separately by #33734.This PR changes test infrastructure only; customer-facing command behavior is unchanged.
Testing Guide
Result:
27 passed, 7 subtests passed.Focused scenario replay validation:
The skips are the intentionally live-only or retired scenarios. All changed files also pass
python -m py_compileandgit diff --check.History Notes
None (test infrastructure only).
This checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.