Skip to content

[AKS] az aks update: Test stability fix for test_aks_update_with_enable_disable_azure_monitor_app_monitoring#33261

Open
tokaplan wants to merge 1 commit intoAzure:devfrom
tokaplan:dev
Open

[AKS] az aks update: Test stability fix for test_aks_update_with_enable_disable_azure_monitor_app_monitoring#33261
tokaplan wants to merge 1 commit intoAzure:devfrom
tokaplan:dev

Conversation

@tokaplan
Copy link
Copy Markdown
Contributor

@tokaplan tokaplan commented Apr 24, 2026

{AKS} az aks update: test stability fix for test_aks_update_with_enable_disable_azure_monitor_app_monitoring.

Passing run is here: passing run.

Making a test that involves creation and a subsequent update of a managed cluster live-only. Waiting for operation completions creates a lot of issues for VCR recording/playback due to unpredictability of the exact recording between runs, so we are moving this test to the same live-only pattern as test_aks_update_with_azuremonitormetrics.

Related command

Test stability fix only

This checklist is used to make sure that common guidelines for a pull request are followed.

@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd Bot commented Apr 24, 2026

️✔️AzureCLI-FullTest
️✔️acr
️✔️latest
️✔️3.12
️✔️3.13
️✔️acs
️✔️latest
️✔️3.12
️✔️3.13
️✔️advisor
️✔️latest
️✔️3.12
️✔️3.13
️✔️ams
️✔️latest
️✔️3.12
️✔️3.13
️✔️apim
️✔️latest
️✔️3.12
️✔️3.13
️✔️appconfig
️✔️latest
️✔️3.12
️✔️3.13
️✔️appservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️aro
️✔️latest
️✔️3.12
️✔️3.13
️✔️backup
️✔️latest
️✔️3.12
️✔️3.13
️✔️batch
️✔️latest
️✔️3.12
️✔️3.13
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.13
️✔️billing
️✔️latest
️✔️3.12
️✔️3.13
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️cdn
️✔️latest
️✔️3.12
️✔️3.13
️✔️cloud
️✔️latest
️✔️3.12
️✔️3.13
️✔️cognitiveservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.13
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.13
️✔️config
️✔️latest
️✔️3.12
️✔️3.13
️✔️configure
️✔️latest
️✔️3.12
️✔️3.13
️✔️consumption
️✔️latest
️✔️3.12
️✔️3.13
️✔️container
️✔️latest
️✔️3.12
️✔️3.13
️✔️containerapp
️✔️latest
️✔️3.12
️✔️3.13
️✔️core
️✔️latest
️✔️3.12
️✔️3.13
️✔️cosmosdb
️✔️latest
️✔️3.12
️✔️3.13
️✔️databoxedge
️✔️latest
️✔️3.12
️✔️3.13
️✔️dls
️✔️latest
️✔️3.12
️✔️3.13
️✔️dms
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventgrid
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventhubs
️✔️latest
️✔️3.12
️✔️3.13
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.13
️✔️find
️✔️latest
️✔️3.12
️✔️3.13
️✔️hdinsight
️✔️latest
️✔️3.12
️✔️3.13
️✔️identity
️✔️latest
️✔️3.12
️✔️3.13
️✔️iot
️✔️latest
️✔️3.12
️✔️3.13
️✔️keyvault
️✔️latest
️✔️3.12
️✔️3.13
️✔️lab
️✔️latest
️✔️3.12
️✔️3.13
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️maps
️✔️latest
️✔️3.12
️✔️3.13
️✔️marketplaceordering
️✔️latest
️✔️3.12
️✔️3.13
️✔️monitor
️✔️latest
️✔️3.12
️✔️3.13
️✔️mysql
️✔️latest
️✔️3.12
️✔️3.13
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.13
️✔️network
️✔️latest
️✔️3.12
️✔️3.13
️✔️policyinsights
️✔️latest
️✔️3.12
️✔️3.13
️✔️postgresql
️✔️latest
️✔️3.12
️✔️3.13
️✔️privatedns
️✔️latest
️✔️3.12
️✔️3.13
️✔️profile
️✔️latest
️✔️3.12
️✔️3.13
️✔️rdbms
️✔️latest
️✔️3.12
️✔️3.13
️✔️redis
️✔️latest
️✔️3.12
️✔️3.13
️✔️relay
️✔️latest
️✔️3.12
️✔️3.13
️✔️resource
️✔️latest
️✔️3.12
️✔️3.13
️✔️role
️✔️latest
️✔️3.12
️✔️3.13
️✔️search
️✔️latest
️✔️3.12
️✔️3.13
️✔️security
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.13
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.13
️✔️signalr
️✔️latest
️✔️3.12
️✔️3.13
️✔️sql
️✔️latest
️✔️3.12
️✔️3.13
️✔️sqlvm
️✔️latest
️✔️3.12
️✔️3.13
️✔️storage
️✔️latest
️✔️3.12
️✔️3.13
️✔️synapse
️✔️latest
️✔️3.12
️✔️3.13
️✔️telemetry
️✔️latest
️✔️3.12
️✔️3.13
️✔️util
️✔️latest
️✔️3.12
️✔️3.13
️✔️vm
️✔️latest
️✔️3.12
️✔️3.13

@azure-client-tools-bot-prd
Copy link
Copy Markdown

Hi @tokaplan,
Since the current milestone time is less than 7 days, this pr will be reviewed in the next milestone.

@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd Bot commented Apr 24, 2026

️✔️AzureCLI-BreakingChangeTest
️✔️Non Breaking Changes

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Apr 24, 2026

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link
Copy Markdown

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

@tokaplan tokaplan force-pushed the dev branch 2 times, most recently from a3590c5 to df405fb Compare April 24, 2026 04:40
@tokaplan tokaplan changed the title [AKS] az aks update: test stability fix for --enable-azure-monitor-app-monitoring [AKS] az aks update: test stability fix for test_aks_update_with_enable_disable_azure_monitor_app_monitoring Apr 24, 2026
@tokaplan tokaplan changed the title [AKS] az aks update: test stability fix for test_aks_update_with_enable_disable_azure_monitor_app_monitoring [AKS] az aks update: Test stability fix for test_aks_update_with_enable_disable_azure_monitor_app_monitoring Apr 24, 2026
@tokaplan
Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Commenter does not have sufficient privileges for PR 33261 in repo Azure/azure-cli

@tokaplan tokaplan marked this pull request as ready for review April 24, 2026 06:20
@tokaplan tokaplan requested a review from NoriZC as a code owner April 24, 2026 06:20
Copilot AI review requested due to automatic review settings April 24, 2026 06:20
@tokaplan tokaplan requested a review from teresaritorto as a code owner April 24, 2026 06:20
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR stabilizes AKS scenario testing by converting the flaky az aks update scenario for enabling/disabling Azure Monitor Application Monitoring to run only in live mode (bypassing VCR playback/recording issues).

Changes:

  • Mark test_aks_update_with_enable_disable_azure_monitor_app_monitoring as @live_only() to avoid VCR nondeterminism.
  • Replace the previous subprocess-based wait workaround with an in-test aks wait call and add a retry loop around the disable operation.
  • Remove the now-unused VCR recording YAML for the live-only test.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/azure-cli/azure/cli/command_modules/acs/tests/latest/test_aks_commands.py Makes the app-monitoring enable/disable update scenario live-only and adjusts wait/retry behavior to reduce transient failures.
src/azure-cli/azure/cli/command_modules/acs/tests/latest/recordings/test_aks_update_with_enable_disable_azure_monitor_app_monitoring.yaml Deletes the VCR recording since the test no longer runs under playback/recording.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/azure-cli/azure/cli/command_modules/acs/tests/latest/test_aks_commands.py Outdated
@FumingZhang
Copy link
Copy Markdown
Member

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

FumingZhang
FumingZhang previously approved these changes Apr 24, 2026
Copy link
Copy Markdown
Member

@FumingZhang FumingZhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

live test passed!

@tokaplan
Copy link
Copy Markdown
Contributor Author

@yanzhudd please merge, this has been approved and all checks have passed. Thank you!

Back-to-back AKS update tests are inherently incompatible with VCR
cassette recording — the CI runs against real Azure without setting
AZURE_TEST_RUN_LIVE, causing VCR to replay stale cassette responses
that don't match the actual cluster state.

Mark the test @live_only() to match the pattern used by the analogous
metrics enable/disable test, and simplify the wait to use self.cmd()
directly since VCR is no longer involved. Delete the recording file.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

act-observability-squad AKS az aks/acs/openshift Auto-Assign Auto assign by bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants