Skip to content

[Log Analytics] Fix #10318: az monitor log-analytics query: Add AzureChinaCloud host template for log-analytics data-plane client - #2

Merged
a0x1ab merged 2 commits into
agent-assist/azure-azure-cli-extensions-issue-10318-d548602a3e3cfrom
copilot/fix-log-analytics-cloud-support
Sep 10, 2026
Merged

[Log Analytics] Fix #10318: az monitor log-analytics query: Add AzureChinaCloud host template for log-analytics data-plane client#2
a0x1ab merged 2 commits into
agent-assist/azure-azure-cli-extensions-issue-10318-d548602a3e3cfrom
copilot/fix-log-analytics-cloud-support

Conversation

Copilot AI commented Sep 10, 2026

Copy link
Copy Markdown

Description

Fixes Azure#10318.

az monitor log-analytics query fails in AzureChinaCloud (and AzureUSGovernment) with CloudEndpointNotSetException because _CLOUD_HOST_TEMPLATES only contained an entry for AzureCloud, causing _build_base_url to return None.

Changes

  • azext_loganalytics/aaz/latest/_clients.py: Add AzureChinaCloud and AzureUSGovernment entries to _CLOUD_HOST_TEMPLATES:
    _CLOUD_HOST_TEMPLATES = {
        CloudNameEnum.AzureCloud: "https://api.loganalytics.io",
        CloudNameEnum.AzureChinaCloud: "https://api.loganalytics.azure.cn",
        CloudNameEnum.AzureUSGovernment: "https://api.loganalytics.us",
    }
  • setup.py: Bump version 1.0.0b11.0.0b2
  • HISTORY.rst: Add changelog entry

Related command

az monitor log-analytics query

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (pip install azdev required)
  • My extension version conforms to the Extension version schema

About Extension Publish

There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update src/index.json automatically.
You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify src/index.json.

Generation source

Azure/aaz#1085

…tes to log-analytics data-plane client

Co-authored-by: a0x1ab <59631311+a0x1ab@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix log analytics base URL for AzureChinaCloud [Log Analytics] az monitor log-analytics query: Add AzureChinaCloud host template for log-analytics data-plane client Sep 10, 2026
Copilot AI requested a review from a0x1ab September 10, 2026 03:13
@a0x1ab

a0x1ab commented Sep 10, 2026

Copy link
Copy Markdown
Owner

Started the required durable Azure/aaz source task: https://github.com/a0x1ab/aaz/tasks/d003a0e6-1781-4700-b884-f448b3b49563

@a0x1ab a0x1ab changed the title [Log Analytics] az monitor log-analytics query: Add AzureChinaCloud host template for log-analytics data-plane client [Log Analytics] Fix #10318: az monitor log-analytics query: Add AzureChinaCloud host template for log-analytics data-plane client Sep 10, 2026
@a0x1ab
a0x1ab marked this pull request as ready for review September 10, 2026 04:04
@a0x1ab
a0x1ab merged commit 1d1e2e9 into agent-assist/azure-azure-cli-extensions-issue-10318-d548602a3e3c Sep 10, 2026
@a0x1ab
a0x1ab deleted the copilot/fix-log-analytics-cloud-support branch September 10, 2026 04:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants