Repository navigation
{aimanager} Show ProvisioningState in create/update -o table; add modelsource and model show table output - #10431
Conversation
…able output `create`/`update` (aimanager, namespace, modeldeployment) and all `modelsource` commands had no table_transformer, so `-o table` fell back to azure-cli's auto-table, which only renders top-level scalars and drops the nested `properties.provisioningState`. Wire the existing show/list formatters into create/update and add a modelsource formatter (Name, ProvisioningState, SourceType, Description). Co-Authored-By: Claude <noreply@anthropic.com>
Liqian Luo (circy9)
left a comment
There was a problem hiding this comment.
[Claude Code — Review Agent]
Reviewed 4a479e7. The change is correct and low-risk:
--no-waitis safe. azure-cli sets the result toNoneforsupports_no_waitcommands and knack skips output, so the transformers never see a poller.- The LRO result goes through
todictbeforeformat_table, so the dict-based formatters get the same shape thatshow/listalready produce. - The modelsource keys (
provisioningState,sourceType,description) match the vendored SDKrest_fieldnames in both API versions. - Bumping to
2.0.1b2is right, since2.0.1b1is already insrc/index.json.
I left a few non-blocking comments inline (one UX question and three nits). None of them block merge.
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The formatter wiring, implementation, tests, and release metadata are consistent and complete.
Review effort: Balanced
Findings: None
What changed in this PR
Adds consistent table output with ProvisioningState across AI Manager resource commands.
Changes:
- Applies existing table formatters to create/update commands.
- Adds and tests model source table formatting.
- Bumps the extension version and release history.
| File | Description |
|---|---|
src/aimanager/setup.py |
Bumps version to 2.0.1b2. |
src/aimanager/HISTORY.rst |
Documents table-output improvements. |
src/aimanager/azext_aimanager/commands.py |
Registers table transformers for affected commands. |
src/aimanager/azext_aimanager/_format.py |
Adds model source formatters. |
src/aimanager/azext_aimanager/tests/latest/test_aimanager_format.py |
Tests model source columns and edge cases. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…ll Description - modeldeployment create/update now wait for completion and annotate the result with the human-readable modelId (as show does), so the ModelId table column is populated instead of blank. --no-wait still returns the poller. - modelsource formatter renders a null description as '' so the column isn't dropped (knack drops None cells). - Add a test that create/update/show/list are wired to table formatters. - Reword HISTORY: modelsource table output is new, not "same as show/list". Co-Authored-By: Claude <noreply@anthropic.com>
Liqian Luo (circy9)
left a comment
There was a problem hiding this comment.
[Claude Code — Review Agent]
Reviewed 7541c63. All 4 earlier comments are addressed. The new wait-then-annotate path matches _grant_caller_roles_on_success and show_modeldeployment. --no-wait still returns the poller, and the existing scenario tests use --no-wait, so they aren't affected. I found no correctness bugs. Two non-blocking nits below.
…t annotation routing Co-Authored-By: Claude <noreply@anthropic.com>
Liqian Luo (circy9)
left a comment
There was a problem hiding this comment.
[Claude Code — Review Agent] Reviewed 39c75a5 (diff vs 7541c63). Both remaining non-blocking comments are addressed: HISTORY.rst now notes that modeldeployment create/update returns the top-level modelId without --no-wait, and the new test_create_routes_result_through_model_id_annotation test plus the added _annotate.assert_called_once_with(...) in the update test pin the routing through _annotate_model_id_on_completion. No new issues found.
…py formatter for model list Replace the AI_MODEL_TABLE_TRANSFORMER JMESPath constant with aimodel_table_format / aimodel_list_table_format callables in _format.py, matching every other command group, and wire the single-item formatter to `az aimanager model show`. Add a test that every create/update/show/list command has a callable table transformer. Co-Authored-By: Claude <noreply@anthropic.com>
|
aimanager |
|
[Claude Code — Author Agent] Live test results (centraluseuap, real resources) Each command ran twice against the same resources: once with the released Summary
Other checks with this PR:
Pending: Raw outputaimanager create (re-run on existing) aimanager update aimanager namespace create (re-run) aimanager namespace update aimanager modelsource create (re-run) aimanager modelsource update aimanager modelsource show aimanager modelsource list aimanager model show aimanager model list (first 3 of 61 rows; before and after are identical) |
Ximeng Zhao (xmzhao0822)
left a comment
There was a problem hiding this comment.
looks good to me
|
[Release] Update index.json for extension [ aimanager-2.0.1b2 ] : https://dev.azure.com/msazure/One/_build/results?buildId=184423882&view=results |
|
[Claude Code — Author Agent] Live test follow-up:
|
Related command
az aimanager [namespace|modelsource|namespace modeldeployment] create/update,az aimanager modelsource show/list,az aimanager model show/listSummary
create/updatehad notable_transformer, so-o tablefell back to azure-cli's default table, which drops nested fields such asproperties.provisioningState:Changes:
aimanager,namespace,modeldeploymentcreate/update: reuse theshowformatter.modeldeployment create/update: resolvemodelIdlikeshowdoes, so theModelIdcolumn is filled.--no-waitis unchanged.modelsource create/update/show/list: new formatter (Name, ProvisioningState, SourceType, Description).model show: new formatter (Name, ModelId, Description).model listmoves from a JMESPath string inconstants.pyto_format.py, with the same output.2.0.1b2,HISTORY.rstentry.General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install azdevrequired)Test plan
azdev style,azdev linter,test_index.py: pass.azdev test aimanager --series: 113 passed.modelIdresolution on create/update, and a check that every create/update/show/list command has a table formatter.modeldeployment createtimed out in provisioning (covered by unit tests only).🤖 Generated with Claude Code