[Stream Analytics] az stream-analytics output: Support managed identity with the 2021-10-01-preview API - #10231
Conversation
|
Hi Jian Hui (@huiii99), |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
Pull request overview
This PR updates the stream-analytics CLI extension to use the 2021-10-01-preview API for az stream-analytics output, enabling managed identity scenarios (e.g., Cosmos DB / DocumentDB outputs) while preserving the existing JSON --datasource/--serialization interface via translation helpers.
Changes:
- Bumped the extension version to
1.0.6and added corresponding release notes. - Regenerated
stream-analytics outputAAZ commands to target2021-10-01-preview, including expanded typed datasource/serialization schemas. - Added a managed identity (DocumentDB/Cosmos) output scenario test and updated recordings for output-related flows and policy-violation tests.
Reviewed changes
Copilot reviewed 15 out of 18 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/stream-analytics/setup.py | Bumps extension version to 1.0.6. |
| src/stream-analytics/HISTORY.rst | Adds release notes entry for 1.0.6. |
| src/stream-analytics/azext_stream_analytics/tests/latest/test_stream_analytics_commands.py | Adds MI coverage for DocumentDB output; adjusts output policy violation test payload structure. |
| src/stream-analytics/azext_stream_analytics/tests/latest/recordings/test_output_documentdb_authentication_mode.yaml | New recording for DocumentDB authenticationMode: Msi scenario. |
| src/stream-analytics/azext_stream_analytics/tests/latest/recordings/test_output_crud.yaml | Updates output CRUD recording URIs to 2021-10-01-preview. |
| src/stream-analytics/azext_stream_analytics/tests/latest/recordings/test_output_create_policy_violation.yaml | Updates recording to match new output API version and updated policy API version used by CLI. |
| src/stream-analytics/azext_stream_analytics/tests/latest/recordings/test_job_scale.yaml | Updates embedded output call recording to 2021-10-01-preview. |
| src/stream-analytics/azext_stream_analytics/tests/latest/recordings/test_input_sql_create_policy_violation.yaml | Updates policy API version used by CLI in recordings. |
| src/stream-analytics/azext_stream_analytics/tests/latest/recordings/test_input_create_policy_violation.yaml | Updates policy API version used by CLI in recordings. |
| src/stream-analytics/azext_stream_analytics/generated/custom.py | Routes output create/update/test through a new translation helper to preserve legacy JSON inputs while feeding the new typed AAZ schema. |
| src/stream-analytics/azext_stream_analytics/generated/_output_helpers.py | New helper translating legacy output REST payloads into flattened AAZ command args. |
| src/stream-analytics/azext_stream_analytics/generated/_input_helpers.py | Improves camelCase-to-snake_case normalization (notably for acronyms) for input translations. |
| src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_create.py | Uses 2021-10-01-preview and typed object schemas for datasource/serialization. |
| src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_update.py | Uses 2021-10-01-preview and typed object schemas for datasource/serialization; includes watermark settings and typed output response schema. |
| src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_test.py | Uses 2021-10-01-preview and typed object schemas for datasource/serialization. |
| src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_show.py | Uses 2021-10-01-preview and updated output response schema. |
| src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_list.py | Uses 2021-10-01-preview and updated output response schema. |
| src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_delete.py | Updates delete to 2021-10-01-preview. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
[Release] Update index.json for extension [ stream-analytics-1.0.6 ] : https://dev.azure.com/msazure/One/_build/results?buildId=177432395&view=results |
🤖 PR Validation — ️✔️ All clear
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
az stream-analytics outputDescription
Regenerate the Stream Analytics output AAZ commands with API version
2021-10-01-previewto support managed identity outputs such as Cosmos DB. Preserve the existing JSON input/output interface, update affected recordings, add managed identity coverage, and bump the extension version to1.0.6.Fixes #10164
aaz Azure/aaz#1066
General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install azdevrequired)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.