Skip to content

Azure Monitor Health Models extension#9944

Open
abossard wants to merge 11 commits into
Azure:mainfrom
abossard:feature/cloud-health-extension
Open

Azure Monitor Health Models extension#9944
abossard wants to merge 11 commits into
Azure:mainfrom
abossard:feature/cloud-health-extension

Conversation

@abossard

Copy link
Copy Markdown

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

Related command

new command:

az monitor health-models

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 wheel==0.30.0 required)
  • [✅ ] My extension version conforms to the Extension version schema

For new extensions:

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.

PR in AAZ:
Azure/aaz#1029

abossard and others added 7 commits April 25, 2026 20:45
Adds az cloud-health commands for the Microsoft.CloudHealth resource provider
(API version 2026-01-01-preview).

Commands:
- az cloud-health health-model (create/show/list/update/delete)
- az cloud-health entity (create/show/list/delete/get-history/get-signal-history/ingest)
- az cloud-health signal-definition (create/show/list/delete)
- az cloud-health relationship (create/show/list/delete)
- az cloud-health auth-setting (create/show/list/delete)
- az cloud-health discovery-rule (create/show/list/delete)

Hand-authored extension using azure-mgmt-cloudhealth SDK.
Standard CLI patterns: CliCommandType, sdk_no_wait, get_mgmt_service_client.
LRO support with --no-wait on all create/update/delete commands.
8 scenario tests passing via azdev test.
azdev style clean (pylint + flake8).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Extension renamed from cloud-health to healthmodel
- Health-model CRUD commands flattened to top level:
  az healthmodel create/show/list/update/delete
- Sub-resources remain as sub-groups:
  az healthmodel entity, signal-definition, relationship, etc.
- Package renamed: azext_cloud_health → azext_healthmodel
- CODEOWNERS updated
- All tests pass, azdev style clean

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Renamed HISTORY.md → HISTORY.rst (repo convention)
- Added tests/latest/recordings/.gitkeep for VCR cassette dir
- Added .pytest_cache/ to .gitignore
- Bumped minCliCoreVersion to 2.67.0 (matches python_requires>=3.10)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…h-extension

# Conflicts:
#	.github/CODEOWNERS
Signed-off-by: Andre Bossard <anbossar@microsoft.com>
Signed-off-by: Andre Bossard <anbossar@microsoft.com>
Signed-off-by: Andre Bossard <anbossar@microsoft.com>
Copilot AI review requested due to automatic review settings June 17, 2026 00:49
@azure-client-tools-bot-prd

Copy link
Copy Markdown
Validation for Breaking Change Starting...

Thanks for your contribution!

@azure-client-tools-bot-prd

Copy link
Copy Markdown

Hi @abossard,
Please write the description of changes which can be perceived by customers into HISTORY.rst.
If you want to release a new extension version, please update the version in setup.py as well.

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.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds a new Azure CLI extension for Azure Monitor Health Models (az monitor health-models) along with packaging, documentation, command discovery metadata, and scenario tests (including a recorded playback cassette).

Changes:

  • Register az monitor health-models in src/service_name.json for service discovery/docs linking.
  • Add the health-models extension package scaffolding (setup metadata, azext metadata, README/HISTORY).
  • Introduce CLI scenario tests (help-smoke, arg validation, loader checks, and recorded list/CRUD tests) plus a VCR recording.

Reviewed changes

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

Show a summary per file
File Description
src/service_name.json Adds service mapping entry for the new az monitor health-models command group.
src/health-models/setup.py Adds Python packaging metadata for the health-models extension.
src/health-models/setup.cfg Adds wheel build configuration.
src/health-models/azext_health_models/tests/latest/test_healthmodel_scenario.py Adds smoke + recorded scenario tests and a custom recording redaction processor.
src/health-models/azext_health_models/tests/latest/recordings/test_healthmodel_list_recorded.yaml Adds recorded HTTP interaction for monitor health-models list.
src/health-models/azext_health_models/tests/latest/init.py Initializes latest test package.
src/health-models/azext_health_models/tests/init.py Initializes test package.
src/health-models/azext_health_models/azext_metadata.json Declares preview status and minimum CLI core version.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/signal_definition/_wait.py Adds generated AAZ signal-definition wait command implementation.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/signal_definition/_show.py Adds generated AAZ signal-definition show command implementation.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/signal_definition/_list.py Adds generated AAZ signal-definition list command implementation (paging).
src/health-models/azext_health_models/aaz/latest/monitor/health_models/signal_definition/_delete.py Adds generated AAZ signal-definition delete command implementation (LRO/no-wait).
src/health-models/azext_health_models/aaz/latest/monitor/health_models/signal_definition/init.py Exports generated signal-definition commands/groups.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/signal_definition/__cmd_group.py Registers the monitor health-models signal-definition command group.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/relationship/_wait.py Adds generated AAZ relationship wait command implementation.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/relationship/_show.py Adds generated AAZ relationship show command implementation.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/relationship/_list.py Adds generated AAZ relationship list command implementation (paging).
src/health-models/azext_health_models/aaz/latest/monitor/health_models/relationship/_delete.py Adds generated AAZ relationship delete command implementation (LRO/no-wait).
src/health-models/azext_health_models/aaz/latest/monitor/health_models/relationship/_create.py Adds generated AAZ relationship create command implementation (LRO/no-wait).
src/health-models/azext_health_models/aaz/latest/monitor/health_models/relationship/init.py Exports generated relationship commands/groups.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/relationship/__cmd_group.py Registers the monitor health-models relationship command group.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/identity/_wait.py Adds generated AAZ identity wait command implementation.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/identity/_show.py Adds generated AAZ identity show command implementation (subresource selector).
src/health-models/azext_health_models/aaz/latest/monitor/health_models/identity/init.py Exports generated identity commands/groups.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/identity/__cmd_group.py Registers the monitor health-models identity command group.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/entity/_ingest_health_report.py Adds generated AAZ entity ingest-health-report command implementation.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/entity/_get_signal_history.py Adds generated AAZ entity get-signal-history command implementation.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/entity/_get_history.py Adds generated AAZ entity get-history command implementation.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/entity/_delete.py Adds generated AAZ entity delete command implementation (LRO/no-wait).
src/health-models/azext_health_models/aaz/latest/monitor/health_models/entity/init.py Exports generated entity commands/groups.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/entity/__cmd_group.py Registers the monitor health-models entity command group.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/discovery_rule/_wait.py Adds generated AAZ discovery-rule wait command implementation.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/discovery_rule/_show.py Adds generated AAZ discovery-rule show command implementation.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/discovery_rule/_list.py Adds generated AAZ discovery-rule list command implementation (paging).
src/health-models/azext_health_models/aaz/latest/monitor/health_models/discovery_rule/_delete.py Adds generated AAZ discovery-rule delete command implementation (LRO/no-wait).
src/health-models/azext_health_models/aaz/latest/monitor/health_models/discovery_rule/init.py Exports generated discovery-rule commands/groups.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/discovery_rule/__cmd_group.py Registers the monitor health-models discovery-rule command group.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/authentication_setting/_wait.py Adds generated AAZ authentication-setting wait command implementation.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/authentication_setting/_show.py Adds generated AAZ authentication-setting show command implementation.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/authentication_setting/_list.py Adds generated AAZ authentication-setting list command implementation (paging).
src/health-models/azext_health_models/aaz/latest/monitor/health_models/authentication_setting/_delete.py Adds generated AAZ authentication-setting delete command implementation (LRO/no-wait).
src/health-models/azext_health_models/aaz/latest/monitor/health_models/authentication_setting/_create.py Adds generated AAZ authentication-setting create command implementation (LRO/no-wait).
src/health-models/azext_health_models/aaz/latest/monitor/health_models/authentication_setting/init.py Exports generated authentication-setting commands/groups.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/authentication_setting/__cmd_group.py Registers the monitor health-models authentication-setting command group.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/_wait.py Adds generated AAZ monitor health-models wait command implementation.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/_show.py Adds generated AAZ monitor health-models show command implementation.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/_list.py Adds generated AAZ monitor health-models list command implementation (paging + RG/sub selection).
src/health-models/azext_health_models/aaz/latest/monitor/health_models/_delete.py Adds generated AAZ monitor health-models delete command implementation (LRO/no-wait).
src/health-models/azext_health_models/aaz/latest/monitor/health_models/_create.py Adds generated AAZ monitor health-models create command implementation (identity + tags + location).
src/health-models/azext_health_models/aaz/latest/monitor/health_models/init.py Exports generated health-models commands/groups.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/__cmd_group.py Registers the monitor health-models command group.
src/health-models/azext_health_models/aaz/latest/monitor/init.py Exports generated monitor command group for the extension’s AAZ tree.
src/health-models/azext_health_models/aaz/latest/monitor/__cmd_group.py Registers the monitor command group in the extension AAZ package.
src/health-models/azext_health_models/aaz/latest/init.py Initializes generated AAZ latest package.
src/health-models/azext_health_models/aaz/init.py Initializes generated AAZ package root.
src/health-models/azext_health_models/init.py Adds the extension command loader using load_aaz_command_table.
src/health-models/README.md Adds end-user extension documentation and usage examples.
src/health-models/HISTORY.rst Adds changelog for the initial preview release.
.gitignore Ignores .pytest_cache/.
.github/CODEOWNERS Adds code ownership for /src/health-models/.
Comments suppressed due to low confidence (3)

src/health-models/azext_health_models/tests/latest/recordings/test_healthmodel_list_recorded.yaml:1

  • The recorded response body embeds JSON inside a YAML string, but the JSON is invalid because it contains literal newlines inside a JSON string value (e.g., \"type\":\"SystemAssigned,\\n UserAssigned\"). This will fail JSON parsing during playback. Re-record the cassette or manually fix the JSON so string values do not contain unescaped newlines (e.g., keep type on one line as \"SystemAssigned,UserAssigned\" or escape the newline as \\n).
    src/health-models/azext_health_models/tests/latest/recordings/test_healthmodel_list_recorded.yaml:1
  • The recording’s CommandName header indicates healthmodel list, but the tests invoke monitor health-models list. If the VCR matching includes headers, playback can fail due to this mismatch. Re-record the cassette with the current command path (so CommandName aligns), or adjust the recording matcher configuration to ignore CommandName.
    src/health-models/setup.py:1
  • long_description concatenates a Markdown README with an RST HISTORY file, but long_description_content_type is set to text/markdown. This can break rendering/validation on package indexes. Fix by using a single format (e.g., convert HISTORY.rst to Markdown and read that, or change both to RST and set long_description_content_type accordingly).

Comment thread src/health-models/README.md Outdated
@abossard abossard changed the title Feature/cloud health extension Azure Monitor Health Models extension Jun 17, 2026
abossard added 3 commits June 17, 2026 02:52
Signed-off-by: Andre Bossard <anbossar@microsoft.com>
Signed-off-by: Andre Bossard <anbossar@microsoft.com>
Signed-off-by: Andre Bossard <anbossar@microsoft.com>
@yonzhan yonzhan requested a review from NoriZC June 17, 2026 01:17
@yonzhan

yonzhan commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

monitor

Signed-off-by: Andre Bossard <anbossar@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Auto-Assign Auto assign by bot Monitor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants