Conversation
|
Validation for Breaking Change Starting...
Thanks for your contribution! |
|
Hi @thisisdevanshu, |
db78d69 to
1e77591
Compare
|
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 |
|
- AAZ-based extension for Microsoft.Orbital/geoCatalogs (API version 2026-04-15) - Commands: planetarycomputer geocatalog create/show/list/update/delete/wait - Identity commands: geocatalog identity assign/show/remove/wait - Short alias --scope for --auto-generated-domain-name-label-scope - Command examples for create, update, and identity assign - Help text for all command groups - 10 scenario tests with playback recordings - Version 1.0.0b1 (preview)
3efdc0f to
ad26d3e
Compare
There was a problem hiding this comment.
Pull request overview
Introduces a new Azure CLI extension (planetarycomputer) for managing Planetary Computer GeoCatalog resources, including AAZ-generated command implementations and scenario tests with VCR recordings.
Changes:
- Adds extension packaging metadata and documentation (setup files, README, history).
- Adds AAZ-generated command groups/commands for GeoCatalog CRUD, identity management, and wait operations.
- Adds ScenarioTest coverage with recordings for the new commands.
Reviewed changes
Copilot reviewed 38 out of 41 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/planetarycomputer/setup.py | Adds packaging metadata and setuptools configuration for the new extension. |
| src/planetarycomputer/setup.cfg | Adds placeholder setup.cfg file (repo-standard pattern). |
| src/planetarycomputer/README.md | Adds user-facing usage docs and command examples for the extension. |
| src/planetarycomputer/HISTORY.rst | Adds initial release notes for version 1.0.0b1. |
| src/planetarycomputer/azext_planetarycomputer/init.py | Registers the extension command loader and wires AAZ command table loading. |
| src/planetarycomputer/azext_planetarycomputer/_help.py | Defines CLI help entries for command groups and key commands. |
| src/planetarycomputer/azext_planetarycomputer/_params.py | Stub for non-AAZ argument loading (currently no custom args). |
| src/planetarycomputer/azext_planetarycomputer/commands.py | Stub for non-AAZ command table loading (AAZ is the primary command source). |
| src/planetarycomputer/azext_planetarycomputer/custom.py | Placeholder module for future customizations (currently logger only). |
| src/planetarycomputer/azext_planetarycomputer/azext_metadata.json | Declares extension preview status and minimum CLI core version. |
| src/planetarycomputer/azext_planetarycomputer/aaz/init.py | Initializes the AAZ package for the extension. |
| src/planetarycomputer/azext_planetarycomputer/aaz/latest/init.py | Initializes the latest AAZ profile package. |
| src/planetarycomputer/azext_planetarycomputer/aaz/latest/spatio/init.py | Initializes the top-level AAZ command group package. |
| src/planetarycomputer/azext_planetarycomputer/aaz/latest/spatio/__cmd_group.py | Defines the top-level AAZ command group registration for planetarycomputer. |
| src/planetarycomputer/azext_planetarycomputer/aaz/latest/spatio/geo_catalog/init.py | Exposes GeoCatalog commands in the AAZ module. |
| src/planetarycomputer/azext_planetarycomputer/aaz/latest/spatio/geo_catalog/__cmd_group.py | Registers the planetarycomputer geocatalog command group. |
| src/planetarycomputer/azext_planetarycomputer/aaz/latest/spatio/geo_catalog/_create.py | Implements az planetarycomputer geocatalog create (AAZ). |
| src/planetarycomputer/azext_planetarycomputer/aaz/latest/spatio/geo_catalog/_delete.py | Implements az planetarycomputer geocatalog delete (AAZ). |
| src/planetarycomputer/azext_planetarycomputer/aaz/latest/spatio/geo_catalog/_list.py | Implements az planetarycomputer geocatalog list with paging (AAZ). |
| src/planetarycomputer/azext_planetarycomputer/aaz/latest/spatio/geo_catalog/_show.py | Implements az planetarycomputer geocatalog show (AAZ). |
| src/planetarycomputer/azext_planetarycomputer/aaz/latest/spatio/geo_catalog/_update.py | Implements az planetarycomputer geocatalog update incl. generic update (AAZ). |
| src/planetarycomputer/azext_planetarycomputer/aaz/latest/spatio/geo_catalog/_wait.py | Implements az planetarycomputer geocatalog wait (AAZ). |
| src/planetarycomputer/azext_planetarycomputer/aaz/latest/spatio/geo_catalog/identity/init.py | Exposes GeoCatalog identity subcommands in the AAZ module. |
| src/planetarycomputer/azext_planetarycomputer/aaz/latest/spatio/geo_catalog/identity/__cmd_group.py | Registers the planetarycomputer geocatalog identity command group. |
| src/planetarycomputer/azext_planetarycomputer/aaz/latest/spatio/geo_catalog/identity/_assign.py | Implements az planetarycomputer geocatalog identity assign (AAZ). |
| src/planetarycomputer/azext_planetarycomputer/aaz/latest/spatio/geo_catalog/identity/_remove.py | Implements az planetarycomputer geocatalog identity remove (AAZ). |
| src/planetarycomputer/azext_planetarycomputer/aaz/latest/spatio/geo_catalog/identity/_show.py | Implements az planetarycomputer geocatalog identity show (AAZ). |
| src/planetarycomputer/azext_planetarycomputer/aaz/latest/spatio/geo_catalog/identity/_wait.py | Implements az planetarycomputer geocatalog identity wait (AAZ). |
| src/planetarycomputer/azext_planetarycomputer/tests/init.py | Initializes the tests package. |
| src/planetarycomputer/azext_planetarycomputer/tests/latest/init.py | Initializes the latest tests package. |
| src/planetarycomputer/azext_planetarycomputer/tests/latest/test_planetarycomputer.py | Adds scenario tests for GeoCatalog and identity workflows. |
| src/planetarycomputer/azext_planetarycomputer/tests/latest/recordings/test_geocatalog_show.yaml | Adds VCR recording for geocatalog show. |
| src/planetarycomputer/azext_planetarycomputer/tests/latest/recordings/test_geocatalog_list_by_resource_group.yaml | Adds VCR recording for geocatalog list -g. |
| src/planetarycomputer/azext_planetarycomputer/tests/latest/recordings/test_geocatalog_list_by_subscription.yaml | Adds VCR recording for geocatalog list (subscription scope). |
| src/planetarycomputer/azext_planetarycomputer/tests/latest/recordings/test_geocatalog_update_tags.yaml | Adds VCR recording for geocatalog update --tags (including clearing tags). |
| src/planetarycomputer/azext_planetarycomputer/tests/latest/recordings/test_geocatalog_wait.yaml | Adds VCR recording for geocatalog wait. |
| src/planetarycomputer/azext_planetarycomputer/tests/latest/recordings/test_geocatalog_identity_assign_user.yaml | Adds VCR recording for identity assign and subsequent identity show. |
| src/planetarycomputer/azext_planetarycomputer/tests/latest/recordings/test_geocatalog_identity_remove_user.yaml | Adds VCR recording for identity remove flow. |
| src/planetarycomputer/azext_planetarycomputer/tests/latest/recordings/test_geocatalog_crud.yaml | Adds VCR recording for create/show/list/update/delete end-to-end CRUD. |
| src/planetarycomputer/azext_planetarycomputer/tests/latest/recordings/test_geocatalog_create_with_options.yaml | Adds VCR recording for create with explicit options and identity. |
| src/planetarycomputer/azext_planetarycomputer/tests/latest/recordings/test_geocatalog_create_and_delete_no_wait.yaml | Adds VCR recording for --no-wait create/delete + wait assertions. |
| @@ -0,0 +1,47 @@ | |||
| # Azure CLI Planetarycomputer Extension # | |||
There was a problem hiding this comment.
The extension name is written as "Planetarycomputer" here, but elsewhere in this extension (e.g., CLI help summaries) it’s spelled "Planetary Computer". Please make the README title/intro consistent with the product name used in help text to avoid confusing users.
| # Azure CLI Planetarycomputer Extension # | |
| # Azure CLI Planetary Computer Extension # |
| name='planetarycomputer', | ||
| version=VERSION, | ||
| description='Microsoft Azure Command-Line Tools Planetarycomputer Extension.', | ||
| long_description=README + '\n\n' + HISTORY, |
There was a problem hiding this comment.
The package description uses "Planetarycomputer" (no space), which is inconsistent with the extension’s help text using "Planetary Computer". Consider updating the description to use consistent product naming.
| """Assign the user or system managed identities. | ||
|
|
||
| :example: Assign a user-assigned managed identity | ||
| az planetarycomputer geocatalog identity assign --name MyGeoCatalog --resource-group MyResourceGroup --user-assigned-identities "{'/subscriptions/sub-id/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-identity':{}}" |
There was a problem hiding this comment.
The docstring example uses --user-assigned-identities, but this command’s argument schema only defines --user-assigned. Please update the example to match the actual CLI parameter name so the autogenerated command help is accurate.
| az planetarycomputer geocatalog identity assign --name MyGeoCatalog --resource-group MyResourceGroup --user-assigned-identities "{'/subscriptions/sub-id/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-identity':{}}" | |
| az planetarycomputer geocatalog identity assign --name MyGeoCatalog --resource-group MyResourceGroup --user-assigned "{'/subscriptions/sub-id/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-identity':{}}" |
| help="Set the system managed identity.", | ||
| blank="True", | ||
| ) | ||
| _args_schema.mi_user_assigned = AAZListArg( | ||
| options=["--user-assigned", "--mi-user-assigned"], | ||
| arg_group="Resource.identity", | ||
| help="Set the user managed identities.", |
There was a problem hiding this comment.
This is the identity remove command, but the argument help strings say "Set the … managed identity." This is misleading in az … identity remove help output; please change the help text to indicate removal/unassignment for both system- and user-assigned identities.
| help="Set the system managed identity.", | |
| blank="True", | |
| ) | |
| _args_schema.mi_user_assigned = AAZListArg( | |
| options=["--user-assigned", "--mi-user-assigned"], | |
| arg_group="Resource.identity", | |
| help="Set the user managed identities.", | |
| help="Remove the system-assigned managed identity from the catalog.", | |
| blank="True", | |
| ) | |
| _args_schema.mi_user_assigned = AAZListArg( | |
| options=["--user-assigned", "--mi-user-assigned"], | |
| arg_group="Resource.identity", | |
| help="Remove one or more user-assigned managed identities from the catalog.", |
| text: |- | ||
| az planetarycomputer geocatalog create -g MyResourceGroup -n MyCatalog -l eastus | ||
| - name: Create a GeoCatalog with a user-assigned identity | ||
| text: |- | ||
| az planetarycomputer geocatalog create -g MyResourceGroup -n MyCatalog -l eastus \\ | ||
| --user-assigned "/subscriptions/{sub}/resourcegroups/{rg}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{name}" | ||
| """ |
There was a problem hiding this comment.
The help examples use four backslashes at line breaks (e.g., \\\\ in the source), which will render as two backslashes in the CLI help output. Other extensions use a single rendered continuation (\), so this should be reduced to \\ in the Python string to display one backslash to users.
| examples: | ||
| - name: Assign a user-assigned managed identity | ||
| text: |- | ||
| az planetarycomputer geocatalog identity assign -g MyResourceGroup -n MyCatalog \\ | ||
| --user-assigned "/subscriptions/{sub}/resourcegroups/{rg}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{name}" | ||
| """ |
There was a problem hiding this comment.
The help example here uses four backslashes for line continuation, which will display two backslashes to users. Reduce to a single rendered continuation (use \\ in the Python string) to match other extension help output.
| az planetarycomputer geocatalog identity assign -g MyResourceGroup -n MyCatalog --user-assigned MyIdentity | ||
|
|
||
| # Show identity information | ||
| az planetarycomputer geocatalog identity show -g MyResourceGroup -n MyCatalog | ||
|
|
||
| # Remove a user-assigned managed identity | ||
| az planetarycomputer geocatalog identity remove -g MyResourceGroup -n MyCatalog --user-assigned MyIdentity |
There was a problem hiding this comment.
In the README examples, --user-assigned MyIdentity is likely not a valid value: the command implementation expects user-assigned identity resource IDs (as shown in the extension help examples), not just an identity name. Please update the README examples to use a full resource ID (or document the accepted formats if names are supported).
| az planetarycomputer geocatalog identity assign -g MyResourceGroup -n MyCatalog --user-assigned MyIdentity | |
| # Show identity information | |
| az planetarycomputer geocatalog identity show -g MyResourceGroup -n MyCatalog | |
| # Remove a user-assigned managed identity | |
| az planetarycomputer geocatalog identity remove -g MyResourceGroup -n MyCatalog --user-assigned MyIdentity | |
| az planetarycomputer geocatalog identity assign -g MyResourceGroup -n MyCatalog --user-assigned /subscriptions/<subscription-id>/resourceGroups/MyResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/MyIdentity | |
| # Show identity information | |
| az planetarycomputer geocatalog identity show -g MyResourceGroup -n MyCatalog | |
| # Remove a user-assigned managed identity | |
| az planetarycomputer geocatalog identity remove -g MyResourceGroup -n MyCatalog --user-assigned /subscriptions/<subscription-id>/resourceGroups/MyResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/MyIdentity |
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
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.