Skip to content

[stream-analytics] az stream-analytics output: Support Managed Identity with API version  2021-10-01-preview - #10165

Closed
Aditya Pujara (a0x1ab) with Copilot wants to merge 5 commits into
mainfrom
copilot/stream-analytics-issue-33816
Closed

[stream-analytics] az stream-analytics output: Support Managed Identity with API version  2021-10-01-preview#10165
Aditya Pujara (a0x1ab) with Copilot wants to merge 5 commits into
mainfrom
copilot/stream-analytics-issue-33816

Conversation

Copilot AI commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

🤖 PR Validation — ️✔️ All clear

Breaking Changes
️✔️ None

This checklist is used to make sure that common guidelines for a pull request are followed.

Related command

az stream-analytics output create

aaz Azure/aaz#1066

  • Problem
    stream-analytics output commands were still issuing output requests against 2020-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

    • Switched all output AAZ operations to 2021-10-01-preview:
      • create
      • update
      • show
      • list
      • delete
      • test
    • Updated output scenario recordings to match the new ARM API version used by the CLI path.
  • Example

    {
      "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

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (pip install azdev required)
  • My extension version conforms to the Extension version schema

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.json automatically.
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.

@azure-client-tools-bot-prd

Copy link
Copy Markdown

Hi Copilot,
Please write the description of changes which can be perceived by customers into HISTORY.rst.
If you want to release a new extension version, please update the version in setup.py as well.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@yonzhan

Copy link
Copy Markdown
Collaborator

stream-analytics

@a0x1ab Aditya Pujara (a0x1ab) added azure-client-tools-agent Pull request reviewed by Azure Client Tools Agent and removed azure-client-tools-agent Pull request reviewed by Azure Client Tools Agent labels Aug 6, 2026

@huiii99 Jian Hui (huiii99) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot Please address these blocking issues before this PR is ready for human approval:

  1. The files under azext_stream_analytics/aaz/ are marked Code generated by aaz-dev-tools, but this PR manually replaces the API version strings and has no corresponding Azure/aaz generation PR. Regenerate the complete stream-analytics output command group from the 2021-10-01-preview specification and link the Azure/aaz PR, rather than editing generated Python directly. This keeps the command metadata/schema synchronized with the selected API.

  2. 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 preserves authenticationMode == Msi. The existing test_output_crud only 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.

  3. Bump src/stream-analytics/setup.py from 1.0.5 and add the customer-visible fix to src/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.

Copilot AI commented Aug 17, 2026

Copy link
Copy Markdown
Contributor Author

Copilot Please address these blocking issues before this PR is ready for human approval:

  1. The files under azext_stream_analytics/aaz/ are marked Code generated by aaz-dev-tools, but this PR ma...

Addressed in c2e25cd: regenerated the stream-analytics output AAZ command group from the 2021-10-01-preview swagger path instead of keeping the manual string edits, added a managed-identity DocumentDB regression scenario/recording that checks datasource.authenticationMode == Msi, and bumped the extension to 1.0.6 with the HISTORY entry.

@huiii99
Jian Hui (huiii99) force-pushed the copilot/stream-analytics-issue-33816 branch from 9586402 to 40af2db Compare August 18, 2026 06:37
@huiii99 Jian Hui (huiii99) changed the title [stream-analytics] Use preview API for output commands [stream-analytics] az stream-analytics output: Support Managed Identity with API version  2021-10-01-preview Aug 18, 2026
@huiii99
Jian Hui (huiii99) marked this pull request as ready for review August 18, 2026 06:47
Copilot AI lite review requested due to automatic review settings August 18, 2026 06:47
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.6 and 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()
@yonzhan

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
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
@a0x1ab Aditya Pujara (a0x1ab) added the Azure Client Tools Agent Requested Request Azure Client Tools Agent testing and review label Aug 20, 2026
@necusjz

Copy link
Copy Markdown
Member

resolved by #10231.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[stream-analytics] The customer encountered an issue while creating an Azure Stream Analytics output using Azure CLI.

7 participants