Azure Monitor Health Models extension#9944
Conversation
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>
|
Validation for Breaking Change Starting...
Thanks for your contribution! |
|
Hi @abossard, |
There was a problem hiding this comment.
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-modelsinsrc/service_name.jsonfor service discovery/docs linking. - Add the
health-modelsextension 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., keeptypeon 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
CommandNameheader indicateshealthmodel list, but the tests invokemonitor 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 (soCommandNamealigns), or adjust the recording matcher configuration to ignoreCommandName.
src/health-models/setup.py:1 long_descriptionconcatenates a Markdown README with an RST HISTORY file, butlong_description_content_typeis set totext/markdown. This can break rendering/validation on package indexes. Fix by using a single format (e.g., convertHISTORY.rstto Markdown and read that, or change both to RST and setlong_description_content_typeaccordingly).
Signed-off-by: Andre Bossard <anbossar@microsoft.com>
Signed-off-by: Andre Bossard <anbossar@microsoft.com>
|
monitor |
Signed-off-by: Andre Bossard <anbossar@microsoft.com>
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
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install wheel==0.30.0required)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.jsonautomatically.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