Skip to content

[Monitor] Fix #32631: az monitor log-analytics query: Add AzureChinaCloud/sovereign cloud Log Analytics query endpoint mapping - #34052

Open
Aditya Pujara (a0x1ab) wants to merge 3 commits into
Azure:devfrom
a0x1ab:agent-assist/azure-azure-cli-issue-32631-c647035957fe
Open

[Monitor] Fix #32631: az monitor log-analytics query: Add AzureChinaCloud/sovereign cloud Log Analytics query endpoint mapping#34052
Aditya Pujara (a0x1ab) wants to merge 3 commits into
Azure:devfrom
a0x1ab:agent-assist/azure-azure-cli-issue-32631-c647035957fe

Conversation

@a0x1ab

@a0x1ab Aditya Pujara (a0x1ab) commented Sep 10, 2026

Copy link
Copy Markdown
Member

🤖 PR Validation — ️✔️ All clear

Breaking Changes Tests
️✔️ None ️✔️ 130/130

Description

Fixes #32631.

Related command
az vm monitor log show

Description

cf_log_analytics_data_plane accessed endpoints.log_analytics_resource_id directly, surfacing the opaque CloudEndpointNotSetException for any cloud where the endpoint isn't defined. The three production sovereign clouds (AzureCloud, AzureChinaCloud, AzureUSGovernment) already carry the correct values in cloud.py; clouds that don't (e.g. custom or future sovereign clouds) previously gave no actionable guidance.

Changes:

  • vm/_client_factory.py — Guard cf_log_analytics_data_plane with has_endpoint_set() before accessing the endpoint. On failure, raise a CLIError that names the active cloud and tells the user exactly how to configure the missing value:
    The Log Analytics query data-plane endpoint is not configured for cloud 'AzureCustomCloud'.
    This feature may not be available in 'AzureCustomCloud'.
    If you believe this is an error, configure the endpoint with:
    az cloud update --endpoint-log-analytics-resource-id <endpoint-url>
    
  • test_cloud.py — Regression test asserting log_analytics_resource_id is set to the expected URL for all three production sovereign clouds.
  • test_vm_actions.py — Unit tests for cf_log_analytics_data_plane: verifies correct LogsQueryClient construction for Public / China / USGov clouds, and that a cloud without the endpoint raises a CLIError containing the cloud name and remediation hint.

Testing Guide

# Unit tests (no live service required)
python -m unittest azure.cli.core.tests.test_cloud.TestCloud.test_log_analytics_resource_id_sovereign_clouds
python -m unittest azure.cli.command_modules.vm.tests.latest.test_vm_actions.TestLogAnalyticsDataPlaneClient

History Notes

[Monitor] az vm monitor log show: Surface actionable error when the Log Analytics data-plane endpoint is not configured for the active cloud

…eChinaCloud/sovereign cloud Log Analytics query endpoint mapping

* Initial plan

* fix: add clear error message for Log Analytics endpoint in sovereign clouds and regression tests

Co-authored-by: a0x1ab <59631311+a0x1ab@users.noreply.github.com>

* fix: rename test cloud name to AzureCustomCloud for clarity

Co-authored-by: a0x1ab <59631311+a0x1ab@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: a0x1ab <59631311+a0x1ab@users.noreply.github.com>
@x-engineering-agent x-engineering-agent Bot added the Request X Engineering Agent Request X Engineering Agent testing and review label Sep 10, 2026
@microsoft-github-policy-service microsoft-github-policy-service Bot added the Auto-Assign Auto assign by bot label Sep 10, 2026
@microsoft-github-policy-service microsoft-github-policy-service Bot added Compute az vm/vmss/image/disk/snapshot act-observability-squad Monitor az monitor labels Sep 10, 2026
@x-engineering-agent
x-engineering-agent Bot marked this pull request as ready for review September 10, 2026 04:17
@x-engineering-agent
x-engineering-agent Bot requested a review from a team as a code owner September 10, 2026 04:17
Copilot AI lite review requested due to automatic review settings September 10, 2026 04:17
@x-engineering-agent
x-engineering-agent Bot requested review from a team as code owners September 10, 2026 04:17
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The new error message remediation guidance references a az cloud update flag that is not actually supported, making the guidance misleading and not actionable.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR improves sovereign-cloud support for Log Analytics query by ensuring the Log Analytics data-plane endpoint is properly defined/validated and by adding regression coverage for endpoint values across public and sovereign clouds.

Changes:

  • Add an explicit has_endpoint_set('log_analytics_resource_id') guard in cf_log_analytics_data_plane and raise a user-facing error when missing.
  • Add core regression tests asserting log_analytics_resource_id values for Azure Public, China, and US Gov clouds.
  • Add VM module unit tests covering cf_log_analytics_data_plane behavior across Public/China/USGov clouds and missing-endpoint scenarios.
File summaries
File Description
src/azure-cli/azure/cli/command_modules/vm/_client_factory.py Adds endpoint presence guard and constructs LogsQueryClient using the cloud’s Log Analytics endpoint.
src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py Adds unit tests validating Log Analytics endpoint resolution and missing-endpoint error handling.
src/azure-cli-core/azure/cli/core/tests/test_cloud.py Adds regression test ensuring Log Analytics endpoint values are set for public + sovereign clouds.
Review details

Suppressed comments (1)

src/azure-cli/azure/cli/command_modules/vm/_client_factory.py:56

  • log_analytics_resource_id is user-configurable (custom clouds) and may include a trailing slash. Concatenating endpoint + '/' + api_version can produce a double-slash path (e.g., ...//v1), which can break some HTTP stacks or signing logic. Normalizing the endpoint before appending the API version avoids this edge case.
    api_version = 'v1'
    endpoint = cli_ctx.cloud.endpoints.log_analytics_resource_id
    return LogsQueryClient(cred, endpoint=endpoint + '/' + api_version, audience=endpoint)
  • Files reviewed: 3/3 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.

Comment on lines +42 to +50
if not cli_ctx.cloud.endpoints.has_endpoint_set('log_analytics_resource_id'):
raise CLIError(
"The Log Analytics query data-plane endpoint is not configured for cloud '{cloud}'. "
"This feature may not be available in '{cloud}'. "
"If you believe this is an error, configure the endpoint with: "
"az cloud update --endpoint-log-analytics-resource-id <endpoint-url>".format(
cloud=cli_ctx.cloud.name
)
)
Comment on lines +25 to 28
AZURE_US_GOV_CLOUD,
KNOWN_CLOUDS,
update_cloud,
CloudEndpointNotSetException,
@yonzhan

Copy link
Copy Markdown
Collaborator

Monitor

@x-engineering-agent

Copy link
Copy Markdown
Contributor

Live test results — azdev test --live --series (changed test files only)

PASS

Selectors: test_cloud test_vm_actions (module)
PR head ref: agent-assist/azure-azure-cli-issue-32631-c647035957fe
PR head sha: 2e3422fa8872e740d81a9b3e14b92ac68dfb8dcf
PR base ref: dev
New test files in PR: false

Changed test files run
src/azure-cli-core/azure/cli/core/tests/test_cloud.py
src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py

Workflow run: https://github.com/Azure/issue-sentinel/actions/runs/34438067240

Last 80 lines of azdev output

=============
| Run Tests |
=============


=====================
| Discovering Tests |
=====================

/home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:13887: SyntaxWarning: invalid escape sequence '\]'
  self.cmd('vmss application set -g {rg} -n {vmss} --app-version-ids {vid1} {vid2} --enable-automatic-upgrade True\]', checks=[
/home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli/azure/cli/command_modules/identity/tests/latest/test_identity.py:18: SyntaxWarning: invalid escape sequence '\{'
  'resource_restriction_compute': '\{"providers":\["Microsoft.Compute"\]\}',
/home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli/azure/cli/command_modules/identity/tests/latest/test_identity.py:19: SyntaxWarning: invalid escape sequence '\{'
  'resource_restriction_empty': '\{"providers":\[\]\}'
WARNING: 'test_cloud' exists in both 'cloud' and 'core'. Resolve using `cloud.test_cloud` or `core.test_cloud`Duplication exists in: 
	/home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli/azure/cli/command_modules/cloud/tests/latest/test_cloud.py
	/home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli-core/azure/cli/core/tests/test_cloud.py


test index updated: /home/runner/.azdev/env_config/home/runner/work/issue-sentinel/issue-sentinel/.venv/test_index/latest.json

Test on modules: test_cloud, test_vm_actions

WARNING: RUNNING TESTS LIVE
WARNING: 'test_cloud' not found. If newly added, re-run with --discover
The tests are set to run against current profile "latest"
============================= test session starts ==============================
platform linux -- Python 3.12.14, pytest-9.1.1, pluggy-1.6.0 -- /home/runner/work/issue-sentinel/issue-sentinel/.venv/bin/python
cachedir: .pytest_cache
rootdir: /home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli
plugins: forked-1.7.5, xdist-3.8.0
collecting ... collected 20 items

azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestActions::test_figure_out_storage_source PASSED [  5%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestActions::test_generate_specfied_ssh_key_files PASSED [ 10%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestActions::test_get_next_subnet_addr_suffix PASSED [ 15%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestActions::test_normalize_disk_info PASSED [ 20%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestActions::test_normalize_disk_info_from_images PASSED [ 25%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestActions::test_parse_managed_image_argument PASSED [ 30%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestActions::test_parse_unmanaged_image_argument PASSED [ 35%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestActions::test_process_gallery_image_version_namespace PASSED [ 40%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestActions::test_source_storage_account_err_case PASSED [ 45%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestActions::test_update_sku_from_dict PASSED [ 50%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestActions::test_validate_admin_password_linux PASSED [ 55%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestActions::test_validate_admin_password_windows PASSED [ 60%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestActions::test_validate_admin_username_linux PASSED [ 65%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestActions::test_validate_admin_username_windows PASSED [ 70%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestActions::test_validate_msi_on_assign_identity_command PASSED [ 75%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestActions::test_validate_msi_on_create PASSED [ 80%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestLogAnalyticsDataPlaneClient::test_cf_log_analytics_data_plane_china_cloud PASSED [ 85%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestLogAnalyticsDataPlaneClient::test_cf_log_analytics_data_plane_missing_endpoint_raises_clear_error PASSED [ 90%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestLogAnalyticsDataPlaneClient::test_cf_log_analytics_data_plane_public_cloud PASSED [ 95%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestLogAnalyticsDataPlaneClient::test_cf_log_analytics_data_plane_usgov_cloud PASSED [100%]

- generated xml file: /home/runner/work/issue-sentinel/issue-sentinel/test-output/results.xml -
============================== 20 passed in 0.72s ==============================

Posted by the Azure Client Tools Agent live-test workflow.

@x-engineering-agent

Copy link
Copy Markdown
Contributor

Live test results — azdev test --live --series (changed test files only)

PASS

Selectors: test_cloud test_vm_actions (module)
PR head ref: agent-assist/azure-azure-cli-issue-32631-c647035957fe
PR head sha: c3688ba1ab846d482354c5c63c78bf9de5d30a8f
PR base ref: dev
New test files in PR: false

Changed test files run
src/azure-cli-core/azure/cli/core/tests/test_cloud.py
src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py

Workflow run: https://github.com/Azure/issue-sentinel/actions/runs/34439768295

Last 80 lines of azdev output

=============
| Run Tests |
=============


=====================
| Discovering Tests |
=====================

/home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:13887: SyntaxWarning: invalid escape sequence '\]'
  self.cmd('vmss application set -g {rg} -n {vmss} --app-version-ids {vid1} {vid2} --enable-automatic-upgrade True\]', checks=[
/home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli/azure/cli/command_modules/identity/tests/latest/test_identity.py:18: SyntaxWarning: invalid escape sequence '\{'
  'resource_restriction_compute': '\{"providers":\["Microsoft.Compute"\]\}',
/home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli/azure/cli/command_modules/identity/tests/latest/test_identity.py:19: SyntaxWarning: invalid escape sequence '\{'
  'resource_restriction_empty': '\{"providers":\[\]\}'
WARNING: 'test_cloud' exists in both 'cloud' and 'core'. Resolve using `cloud.test_cloud` or `core.test_cloud`Duplication exists in: 
	/home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli/azure/cli/command_modules/cloud/tests/latest/test_cloud.py
	/home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli-core/azure/cli/core/tests/test_cloud.py


test index updated: /home/runner/.azdev/env_config/home/runner/work/issue-sentinel/issue-sentinel/.venv/test_index/latest.json

Test on modules: test_cloud, test_vm_actions

WARNING: RUNNING TESTS LIVE
WARNING: 'test_cloud' not found. If newly added, re-run with --discover
The tests are set to run against current profile "latest"
============================= test session starts ==============================
platform linux -- Python 3.12.14, pytest-9.1.1, pluggy-1.6.0 -- /home/runner/work/issue-sentinel/issue-sentinel/.venv/bin/python
cachedir: .pytest_cache
rootdir: /home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli
plugins: forked-1.7.5, xdist-3.8.0
collecting ... collected 20 items

azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestActions::test_figure_out_storage_source PASSED [  5%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestActions::test_generate_specfied_ssh_key_files PASSED [ 10%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestActions::test_get_next_subnet_addr_suffix PASSED [ 15%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestActions::test_normalize_disk_info PASSED [ 20%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestActions::test_normalize_disk_info_from_images PASSED [ 25%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestActions::test_parse_managed_image_argument PASSED [ 30%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestActions::test_parse_unmanaged_image_argument PASSED [ 35%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestActions::test_process_gallery_image_version_namespace PASSED [ 40%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestActions::test_source_storage_account_err_case PASSED [ 45%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestActions::test_update_sku_from_dict PASSED [ 50%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestActions::test_validate_admin_password_linux PASSED [ 55%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestActions::test_validate_admin_password_windows PASSED [ 60%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestActions::test_validate_admin_username_linux PASSED [ 65%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestActions::test_validate_admin_username_windows PASSED [ 70%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestActions::test_validate_msi_on_assign_identity_command PASSED [ 75%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestActions::test_validate_msi_on_create PASSED [ 80%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestLogAnalyticsDataPlaneClient::test_cf_log_analytics_data_plane_china_cloud PASSED [ 85%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestLogAnalyticsDataPlaneClient::test_cf_log_analytics_data_plane_missing_endpoint_raises_clear_error PASSED [ 90%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestLogAnalyticsDataPlaneClient::test_cf_log_analytics_data_plane_public_cloud PASSED [ 95%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestLogAnalyticsDataPlaneClient::test_cf_log_analytics_data_plane_usgov_cloud PASSED [100%]

- generated xml file: /home/runner/work/issue-sentinel/issue-sentinel/test-output/results.xml -
============================== 20 passed in 0.77s ==============================

Posted by the Azure Client Tools Agent live-test workflow.

@x-engineering-agent

Copy link
Copy Markdown
Contributor

Live test results — azdev test --live --series (changed test files only)

PASS

Selectors: test_cloud test_vm_actions (module)
PR head ref: agent-assist/azure-azure-cli-issue-32631-c647035957fe
PR head sha: 5055a434b836c4ea82beb03951ddb26013329e93
PR base ref: dev
New test files in PR: false

Changed test files run
src/azure-cli-core/azure/cli/core/tests/test_cloud.py
src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py

Workflow run: https://github.com/Azure/issue-sentinel/actions/runs/34442926612

Last 80 lines of azdev output

=============
| Run Tests |
=============


=====================
| Discovering Tests |
=====================

/home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:13887: SyntaxWarning: invalid escape sequence '\]'
  self.cmd('vmss application set -g {rg} -n {vmss} --app-version-ids {vid1} {vid2} --enable-automatic-upgrade True\]', checks=[
/home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli/azure/cli/command_modules/identity/tests/latest/test_identity.py:18: SyntaxWarning: invalid escape sequence '\{'
  'resource_restriction_compute': '\{"providers":\["Microsoft.Compute"\]\}',
/home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli/azure/cli/command_modules/identity/tests/latest/test_identity.py:19: SyntaxWarning: invalid escape sequence '\{'
  'resource_restriction_empty': '\{"providers":\[\]\}'
WARNING: 'test_cloud' exists in both 'cloud' and 'core'. Resolve using `cloud.test_cloud` or `core.test_cloud`Duplication exists in: 
	/home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli/azure/cli/command_modules/cloud/tests/latest/test_cloud.py
	/home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli-core/azure/cli/core/tests/test_cloud.py


test index updated: /home/runner/.azdev/env_config/home/runner/work/issue-sentinel/issue-sentinel/.venv/test_index/latest.json

Test on modules: test_cloud, test_vm_actions

WARNING: RUNNING TESTS LIVE
WARNING: 'test_cloud' not found. If newly added, re-run with --discover
The tests are set to run against current profile "latest"
============================= test session starts ==============================
platform linux -- Python 3.12.14, pytest-9.1.1, pluggy-1.6.0 -- /home/runner/work/issue-sentinel/issue-sentinel/.venv/bin/python
cachedir: .pytest_cache
rootdir: /home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli
plugins: forked-1.7.5, xdist-3.8.0
collecting ... collected 20 items

azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestActions::test_figure_out_storage_source PASSED [  5%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestActions::test_generate_specfied_ssh_key_files PASSED [ 10%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestActions::test_get_next_subnet_addr_suffix PASSED [ 15%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestActions::test_normalize_disk_info PASSED [ 20%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestActions::test_normalize_disk_info_from_images PASSED [ 25%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestActions::test_parse_managed_image_argument PASSED [ 30%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestActions::test_parse_unmanaged_image_argument PASSED [ 35%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestActions::test_process_gallery_image_version_namespace PASSED [ 40%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestActions::test_source_storage_account_err_case PASSED [ 45%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestActions::test_update_sku_from_dict PASSED [ 50%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestActions::test_validate_admin_password_linux PASSED [ 55%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestActions::test_validate_admin_password_windows PASSED [ 60%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestActions::test_validate_admin_username_linux PASSED [ 65%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestActions::test_validate_admin_username_windows PASSED [ 70%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestActions::test_validate_msi_on_assign_identity_command PASSED [ 75%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestActions::test_validate_msi_on_create PASSED [ 80%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestLogAnalyticsDataPlaneClient::test_cf_log_analytics_data_plane_china_cloud PASSED [ 85%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestLogAnalyticsDataPlaneClient::test_cf_log_analytics_data_plane_missing_endpoint_raises_clear_error PASSED [ 90%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestLogAnalyticsDataPlaneClient::test_cf_log_analytics_data_plane_public_cloud PASSED [ 95%]
azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py::TestLogAnalyticsDataPlaneClient::test_cf_log_analytics_data_plane_usgov_cloud PASSED [100%]

- generated xml file: /home/runner/work/issue-sentinel/issue-sentinel/test-output/results.xml -
============================== 20 passed in 0.79s ==============================

Posted by the Azure Client Tools Agent live-test workflow.

@x-engineering-agent x-engineering-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Aditya Pujara (@a0x1ab)

Automated review summary

All checks passed:

  • Upstream CI: 50/50 checks passed, 0 pending, 0 failed.
  • Live test: azdev test completed successfully for the changed test files (test_cloud.py, test_vm_actions.py).
  • Regression coverage: The production change in vm/_client_factory.py is covered by new/updated unit tests in the same PR (test_cloud.py::test_log_analytics_resource_id_sovereign_clouds and the new TestLogAnalyticsDataPlaneClient cases), including a negative-path test for the missing-endpoint CLIError. No coverage gap detected.

No blocking issues found by automated review skills (release-artifact, test-strength, scope-consistency, domain-edge-cases).

Risk assessment

16/100 · Low · High confidence

The Low rating is driven by public CLI behavior.

  • Change scope: 3 changed files, 108 changed lines (+106 / -2), including 1 production file.
  • Affected components: vm
  • Risk drivers: public CLI behavior (+18)
  • Regression evidence: Changed regression tests are included, reducing risk.
  • Confidence: High because changed-line patches were available for every production file.
  • Required review: Owning-squad review is recommended for vm before merge.

@x-engineering-agent x-engineering-agent Bot added X Engineering Agent Reviewed Pull request reviewed by X Engineering Agent and removed Request X Engineering Agent Request X Engineering Agent testing and review labels Sep 10, 2026
@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

🔔 Routing this PR to @Azure/act-observability-squad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

act-observability-squad Auto-Assign Auto assign by bot Compute az vm/vmss/image/disk/snapshot Monitor az monitor X Engineering Agent Reviewed Pull request reviewed by X Engineering Agent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

az monitor log-analytics query fails in AzureChinaCloud with CloudEndpointNotSetException

5 participants