Add relationship CLI extension (Microsoft.Relationships)#9807
Add relationship CLI extension (Microsoft.Relationships)#9807necusjz merged 5 commits intoAzure:mainfrom
Conversation
…review) New extension with 6 commands across 2 subgroups: - az relationship dependency-of create/show/delete - az relationship service-group-member create/show/delete AAZ commands generated via aaz-dev-tools from TypeSpec. 7 live tests: 4 CRUD scenarios + 3 error cases. All passing. azdev style PASSED, azdev linter PASSED. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Developers can set AZURE_RELATIONSHIP_TEST_TARGET_SG to point to their own pre-existing Service Group. Defaults to SDKTestsSG. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Validation for Breaking Change Starting...
Thanks for your contribution! |
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
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). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
CodeGen Tools Feedback CollectionThank you for using our CodeGen tool. We value your feedback, and we would like to know how we can improve our product. Please take a few minutes to fill our codegen survey |
|
There was a problem hiding this comment.
Pull request overview
This PR introduces a new Azure CLI extension (relationship) for managing ARM extension resources under Microsoft.Relationships (2023-09-01-preview), exposing CRUD commands for dependencyOf and serviceGroupMember relationship types.
Changes:
- Added extension packaging scaffold (setup/manifest/README/history + azext metadata).
- Added AAZ-generated command implementation for
relationship dependency-ofandrelationship service-group-member(create/show/delete). - Added live-only scenario tests covering CRUD flows and negative cases.
Reviewed changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/relationship/setup.py | Extension packaging metadata for publishing/installing the relationship extension. |
| src/relationship/MANIFEST.in | Ensures extension sources/metadata are included in the package. |
| src/relationship/README.md | User-facing extension overview and command examples. |
| src/relationship/HISTORY.rst | Changelog for extension releases. |
| src/relationship/azext_relationship/azext_metadata.json | CLI core compatibility + preview flag. |
| src/relationship/azext_relationship/init.py | Command loader wiring (loads AAZ command table + args). |
| src/relationship/azext_relationship/_help.py | Help text for command groups and commands. |
| src/relationship/azext_relationship/_params.py | Placeholder for argument customization hook. |
| src/relationship/azext_relationship/commands.py | Placeholder for non-AAZ command table hook. |
| src/relationship/azext_relationship/custom.py | Placeholder for custom (non-generated) operations. |
| src/relationship/azext_relationship/aaz/init.py | AAZ package root for generated commands. |
| src/relationship/azext_relationship/aaz/latest/init.py | AAZ “latest” version namespace marker. |
| src/relationship/azext_relationship/aaz/latest/relationship/init.py | Registers top-level relationship command group. |
| src/relationship/azext_relationship/aaz/latest/relationship/__cmd_group.py | AAZ command-group registration for relationship. |
| src/relationship/azext_relationship/aaz/latest/relationship/dependency_of/init.py | Registers relationship dependency-of subgroup and commands. |
| src/relationship/azext_relationship/aaz/latest/relationship/dependency_of/__cmd_group.py | AAZ command-group registration for relationship dependency-of. |
| src/relationship/azext_relationship/aaz/latest/relationship/dependency_of/_create.py | AAZ implementation for relationship dependency-of create. |
| src/relationship/azext_relationship/aaz/latest/relationship/dependency_of/_show.py | AAZ implementation for relationship dependency-of show. |
| src/relationship/azext_relationship/aaz/latest/relationship/dependency_of/_delete.py | AAZ implementation for relationship dependency-of delete. |
| src/relationship/azext_relationship/aaz/latest/relationship/service_group_member/init.py | Registers relationship service-group-member subgroup and commands. |
| src/relationship/azext_relationship/aaz/latest/relationship/service_group_member/__cmd_group.py | AAZ command-group registration for relationship service-group-member. |
| src/relationship/azext_relationship/aaz/latest/relationship/service_group_member/_create.py | AAZ implementation for relationship service-group-member create. |
| src/relationship/azext_relationship/aaz/latest/relationship/service_group_member/_show.py | AAZ implementation for relationship service-group-member show. |
| src/relationship/azext_relationship/aaz/latest/relationship/service_group_member/_delete.py | AAZ implementation for relationship service-group-member delete. |
| src/relationship/azext_relationship/tests/init.py | Test package marker. |
| src/relationship/azext_relationship/tests/latest/init.py | Latest test namespace marker. |
| src/relationship/azext_relationship/tests/latest/test_relationship_scenario.py | Live-only scenario coverage for CRUD + negative validation cases. |
The CI linter cannot resolve help examples from _help.py during diff-based checks. Add missing_command_example exclusions for the two create commands that already have examples defined in _help.py. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- setup.py: Add long_description_content_type='text/markdown' - HISTORY.rst: Fix RST underline length for 1.0.0b1 - dependency_of/service_group_member _create.py: Mark --target-id as required - test_relationship_scenario.py: Skip tests when AZURE_RELATIONSHIP_TEST_TARGET_SG is not set instead of using a hard-coded default Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
…tension The CI pipeline's service_name.check() requires every extension's top-level command group to have an entry in src/service_name.json. The 'relationship' entry was missing, causing the azdev linter and azdev style CI jobs to fail. Also adds the conventional setup.cfg with [bdist_wheel] universal=1, which 196 out of 200 extensions in the repo include. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Hi @necusjz could you help run the pipeline again? Also, is it possible to get write access to this repo so that I don't have to wait for someone else to run it? |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
[Release] Update index.json for extension [ relationship-1.0.0b1 ] : https://dev.azure.com/msazure/One/_build/results?buildId=161470336&view=results |
Description
New Azure CLI extension for managing relationship resources (Microsoft.Relationships, API version 2023-09-01-preview).
Commands (6 total)
az relationship dependency-of create/show/deleteaz relationship service-group-member create/show/deleteWhat are Relationships?
Relationships are ARM extension resources that create semantic associations between a source resource and a target resource:
Testing
azdev stylePASSED,azdev linterPASSEDAZURE_RELATIONSHIP_TEST_TARGET_SGenv varRelated
specification/relationships/Relationships.Management/main.tsp