{AKS} Stabilize remaining aks-preview live tests - #10308
Conversation
|
Hi FumingZhang, |
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
|
AKS |
46cdbc1 to
af3bb08
Compare
There was a problem hiding this comment.
🟡 Changes recommended
The new _cmd_or_skip_if_feature_unavailable skip detection is case-sensitive and can fail to trigger in practice, causing avoidable live-test failures.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Stabilizes aks-preview live tests by making them more resilient to service-side gating/propagation behavior and region constraints, without changing extension product code.
Changes:
- Add a targeted helper (
skip_test_if_location_unsupported) and unit tests to precisely skip region-gated scenarios when forced RG locations are unsupported. - Improve live-test robustness by adding targeted waits and adjusting assertions to match current/consistent RP response shapes.
- Refactor several scenarios (notably the HTTP proxy scenario) to reduce flakiness/timeouts and apply more precise skip behavior for subscription-gated preview features.
File summaries
| File | Description |
|---|---|
src/aks-preview/azext_aks_preview/tests/latest/test_custom_preparers.py |
Adds unit coverage for the new precise location-skip helper. |
src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py |
Updates/reshapes multiple live scenarios with precise skips, waits, and assertion fixes to reduce flakes. |
src/aks-preview/azext_aks_preview/tests/latest/custom_preparers.py |
Introduces skip_test_if_location_unsupported to avoid broad decorators and keep skips scoped. |
Review details
- Files reviewed: 3/4 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Address the post-merge runner failures with precise feature and location skips, corrected assertions and operation ordering, bounded service-readiness waits, and independent HTTP proxy scenarios. Keep the change test-only so no extension release note or version bump is required.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Preview feature names in service errors are free-form and may use different casing. Normalize both values so precise enrollment skips remain reliable without masking unrelated failures. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The preparers inject the location into each scenario, but shared proxy setup does not consume it. Prefix the helper parameter so the intentional API shape is explicit without triggering unused-argument checks. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
af3bb08 to
b944827
Compare
🤖 PR Validation — ️✔️ All clear
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
az aks *(aks-previewlive tests only)What / Why
Fixes CLI-side test and scenario issues identified in the post-merge AKS runner logs without changing extension product code or AKS RP:
RP-only issues remain intentionally visible and are not masked by this PR.
Validation
pytest src/aks-preview/azext_aks_preview/tests/latest/test_custom_preparers.py -q- 7 passed.pytest --collect-only src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py -q- 388 tests collected.python -m py_compilefor all changed Python files - passed.git diff --check upstream/main...HEAD- passed.Scope / Index / History
src/aks-preview/azext_aks_preview/tests/latest.HISTORY.rst, orsrc/index.jsonchange is needed for this test-only PR.General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired) -azdevis unavailable locally; the PR's style workflow provides this check.python scripts/ci/test_index.py -qlocally? (pip install azdevrequired) - N/A,src/index.jsonis unchanged.For new extensions: