[AKS] Stabilize live tests and preserve IPv4 outbound default - #33886
Draft
FumingZhang wants to merge 8 commits into
Draft
[AKS] Stabilize live tests and preserve IPv4 outbound default#33886FumingZhang wants to merge 8 commits into
FumingZhang wants to merge 8 commits into
Conversation
Avoid retry formatting of inline JSON, initialize Container Insights workspaces before AKS creation, wait between sequential VMS pool operations, and skip live scenarios whose service toggles are unavailable in the runner subscription. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Artifact Streaming is GA and Control Plane Metrics is on the GA rollout path, so retain their live coverage instead of masking API-version and toggle-rollout failures. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Gate the VMS autoscaler settle checks to live and recording runs so existing replay cassettes do not issue unrecorded GET requests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Preserve the historical IPv4 managed outbound IP default when only the IPv6 count is supplied. Keep explicit and existing IPv4 values unchanged, and cover create and update behavior with focused tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
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)
August 13, 2026 00:43
Member
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
Retry polling and refetch requests cannot replay through the normal scenario path. Disable recording for these live runs and discard any temporary cassette traffic captured while preparers override the recording flag.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Member
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
Pulls in upstream fixes (including AKS rollback warning and CLI Runner test stabilization) with no conflicts against the live-test stability work in this branch.
Addresses 9 AKS live-test failures reported from core AKS live runner
run 0cb53881, following the established patterns already used in this
branch (dedicated workspace pre-creation, settle waits, precise
skip/gating, proven-good VM sizes/regions):
- test_aks_automatic_sku: be explicit about --enable-managed-identity
on the Automatic-SKU create command instead of relying on implicit
client-side backfill, since Automatic + RP-managed VNet requires a
System-Assigned Managed Identity.
- test_aks_create_acns_with_flow_logs: pre-create a dedicated Log
Analytics workspace (via --workspace-resource-id) instead of the
RP's shared default workspace, and add a settle wait after create
so the Microsoft-ContainerNetworkLogs custom table finishes
provisioning before toggling container network logs (avoids the
InvalidOutputTable race).
- test_aks_create_default_service_with_monitoring_addon_msi: fix the
stale post-create assertion that still expected the RP's
DefaultResourceGroup/DefaultWorkspace naming even though the test
now creates its own dedicated workspace; assert against the actual
workspace id instead.
- test_aks_create_with_azuremonitormetrics /
test_aks_update_with_azuremonitormetrics /
test_aks_create_with_control_plane_metrics /
test_aks_update_with_control_plane_metrics: add a
_create_azure_monitor_workspace helper (mirrors
_create_container_insights_workspace) and pass a dedicated, per-test
Azure Monitor Workspace id via --azure-monitor-workspace-resource-id
instead of letting all of these westus2 tests race on the RP's
single shared default AMW ("already exists"/state-collision).
- test_aks_create_with_control_plane_metrics /
test_aks_update_with_control_plane_metrics: add a narrow
_cmd_or_skip_if_unsupported helper that skips (rather than fails)
only when the service reports the Control Plane Metrics
toggle/feature itself as unsupported, since its rollout is still in
progress; any other failure still fails the test loudly.
- test_aks_kubenet_to_cni_overlay_migration: move from eastus2 (known
AKSCapacityHeavyUsage errors) to eastus, matching neighboring
network-plugin migration tests in this file; update the checked-in
VCR recording's region strings to match so replay-mode CI keeps
passing.
- test_aks_nodepool_add_with_artifact_streaming: pin --node-vm-size to
the already-proven Standard_D2s_v3 (used across dozens of other
tests in this suite) instead of relying on the RP's default VM size,
which can hit "VM sizes not allowed" quota/allow-list errors.
- test_aks_network_isolated_cluster: raise the post-node-image-upgrade
nodepool wait timeout from 3600s to 5400s, since cache-based
bootstrap on a network-isolated/private cluster adds real extra
latency to the node image rollout.
No custom AKS feature-gate header strings were invented; only headers
already used elsewhere in this test file are reused (e.g.
AzureOverlayPreview). Neither the SAMI requirement nor Control Plane
Metrics has an associated preview header anywhere in the codebase, so
none was added.
Adds focused unit tests in test_aks_provisioning_retry.py for the two
new helpers (_create_azure_monitor_workspace,
_cmd_or_skip_if_unsupported), covering the happy path, the
skip-on-known-marker path, and the re-raise-on-unrelated-error path.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Address review feedback on _cmd_or_skip_if_unsupported: the previous marker set (e.g. "is not supported", "unsupported") was broad enough that an unrelated failure containing the same generic phrasing (for example an invalid/unsupported VM size or SKU) could be mistaken for Control Plane Metrics being unavailable and incorrectly skipped instead of failing loudly. Split the marker set into two independent groups that must BOTH match before a skip is allowed: - _CONTROL_PLANE_METRICS_CONTEXT_MARKERS: substrings confirming the failure text is actually about the Control Plane Metrics feature. - _UNSUPPORTED_CONDITION_MARKERS: substrings confirming the failure is an availability/support condition (renamed from the old, single _FEATURE_TOGGLE_UNAVAILABLE_MARKERS). _cmd_or_skip_if_unsupported now only skips when the caught error text contains at least one marker from each group; any other failure (including one that only matches the generic condition markers) re-raises unchanged. Both marker groups are still overridable via optional context_markers/condition_markers parameters if a future caller needs a different feature-specific context. Added two negative unit tests proving unrelated "not supported" failures are re-raised rather than skipped: one with an unrelated but recognizable resource-type context (VMSizeNotSupported), and one with no feature-specific context at all. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Member
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
Collaborator
|
AKS |
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 aks create,az aks update,az aks nodepool add,az aks nodepool update,az aks nodepool auto-scaleDescription
This PR fixes actionable failures from the AKS CLI live-test runner and restores the historical managed outbound IPv4 default.
managedOutboundIPs.count=1when only IPv6 is supplied, without overriding explicit or existing IPv4 values.Testing Guide
python -m pytest -q test_aks_provisioning_retry.py test_loadbalancer.py— 43 passed, 5 subtests passed.python -m py_compilefor changed Python files — passed.git diff --check— passed.History Notes
[AKS]
az aks create,az aks update: Preserve the default managed outbound IPv4 count when only the IPv6 count is providedThis checklist is used to make sure that common guidelines for a pull request are followed.