[stream-analytics] az stream-analytics output: Support Managed Identity with API version 2021-10-01-preview - #10165
[stream-analytics] az stream-analytics output: Support Managed Identity with API version 2021-10-01-preview#10165Aditya Pujara (a0x1ab) with Copilot wants to merge 5 commits into
az stream-analytics output: Support Managed Identity with API version 2021-10-01-preview#10165Conversation
|
Hi Copilot, |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
stream-analytics |
Jian Hui (huiii99)
left a comment
There was a problem hiding this comment.
Copilot Please address these blocking issues before this PR is ready for human approval:
-
The files under
azext_stream_analytics/aaz/are markedCode generated by aaz-dev-tools, but this PR manually replaces the API version strings and has no corresponding Azure/aaz generation PR. Regenerate the completestream-analytics outputcommand group from the2021-10-01-previewspecification and link the Azure/aaz PR, rather than editing generated Python directly. This keeps the command metadata/schema synchronized with the selected API. -
Add a regression scenario that reproduces #10164: create at least one Managed Identity output (for example Cosmos DB with
authenticationMode: Msi) and assert that the returned datasource preservesauthenticationMode == Msi. The existingtest_output_crudonly covers Blob output with an account key; changing its recorded request URLs does not prove the reported MI path works. Record the new/updated scenario against the service instead of only editing cassette API-version strings. -
Bump
src/stream-analytics/setup.pyfrom 1.0.5 and add the customer-visible fix tosrc/stream-analytics/HISTORY.rst. Without a new extension version, merging this change will not publish an installable fix. The release bot already called this out.
Please also update the PR title to the repository format and rerun the managed review/check cycle. The current credential-scan failure points only to unrelated src/documentdb files, but all required checks still need a fresh result on the revised head.
Addressed in c2e25cd: regenerated the |
Co-authored-by: huiii99 <243723033+huiii99@users.noreply.github.com>
9586402 to
40af2db
Compare
az stream-analytics output: Support Managed Identity with API version 2021-10-01-preview
|
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 extension’s az stream-analytics output AAZ commands to use ARM API version 2021-10-01-preview, enabling Managed Identity (MSI) output shapes that are rejected by the older 2020-03-01 API version (per the reported create failures for Cosmos DB, Synapse/SQL, Service Bus, ADX).
Changes:
- Regenerated Stream Analytics output AAZ operations (create/update/show/list/delete/test) to target
2021-10-01-preview. - Added/updated scenario test coverage and recordings for DocumentDB (Cosmos DB) output with
authenticationMode: Msi. - Bumped extension version to
1.0.6and added a release note entry.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 5 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 1.0.6 release notes describing the output API regen for MI support. |
| src/stream-analytics/azext_stream_analytics/tests/latest/test_stream_analytics_commands.py | Adds a new live test validating DocumentDB output creation/show/delete with authenticationMode: Msi. |
| src/stream-analytics/azext_stream_analytics/tests/latest/recordings/test_output_documentdb_authentication_mode.yaml | New recording for the added MI DocumentDB output test using 2021-10-01-preview. |
| 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 output create policy violation recording URI to 2021-10-01-preview. |
| src/stream-analytics/azext_stream_analytics/tests/latest/recordings/test_job_scale.yaml | Updates output-related recording URI to 2021-10-01-preview. |
| src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_update.py | Regenerates output update command schema/serialization and switches to 2021-10-01-preview. |
| src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_test.py | Regenerates output test command schema/serialization and switches to 2021-10-01-preview. |
| src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_show.py | Regenerates output show response schema and switches to 2021-10-01-preview. |
| src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_list.py | Regenerates output list response schema and switches to 2021-10-01-preview. |
| src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_delete.py | Switches output 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.
| properties.set_prop("database", AAZStrType, ".microsoft_sql_server_database.database") | ||
| properties.set_prop("maxBatchCount", AAZFloatType, ".microsoft_sql_server_database.max_batch_count") | ||
| properties.set_prop("maxWriterCount", AAZFloatType, ".microsoft_sql_server_database.max_writer_count") | ||
| properties.set_prop("password", AAZStrType, ".microsoft_sql_server_database.password") |
| properties.max_writer_count = AAZFloatType( | ||
| serialized_name="maxWriterCount", | ||
| ) | ||
| properties.password = AAZStrType() |
| properties.set_prop("database", AAZStrType, ".microsoft_sql_server_database.database") | ||
| properties.set_prop("maxBatchCount", AAZFloatType, ".microsoft_sql_server_database.max_batch_count") | ||
| properties.set_prop("maxWriterCount", AAZFloatType, ".microsoft_sql_server_database.max_writer_count") | ||
| properties.set_prop("password", AAZStrType, ".microsoft_sql_server_database.password") |
| properties.max_writer_count = AAZFloatType( | ||
| serialized_name="maxWriterCount", | ||
| ) | ||
| properties.password = AAZStrType() |
| properties.max_writer_count = AAZFloatType( | ||
| serialized_name="maxWriterCount", | ||
| ) | ||
| properties.password = AAZStrType() |
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1f212784-92d7-493e-87b8-1f34e70b4dbc
|
resolved by #10231. |
🤖 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 output createaaz Azure/aaz#1066
Problem
stream-analytics outputcommands were still issuing output requests against2020-03-01, which rejects newer Managed Identity output shapes. This surfaced as create failures for output types such as Cosmos DB, Synapse/SQL, Service Bus, and ADX.Change
2021-10-01-preview:createupdateshowlistdeletetestExample
{ "type": "Microsoft.Storage/DocumentDB", "properties": { "accountId": "babocosmosnosql", "database": "Transactional", "collectionNamePattern": "1", "authenticationMode": "Msi" } }This output definition now flows through the preview Stream Analytics output API required for Managed Identity-backed outputs.
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.