Skip to content

Conversation

@Y-Sindo
Copy link
Member

@Y-Sindo Y-Sindo commented Dec 11, 2025

No description provided.

Copilot AI review requested due to automatic review settings December 11, 2025 07:46
@Y-Sindo Y-Sindo requested a review from vicancy as a code owner December 11, 2025 07:46
Copy link
Contributor

Copilot AI left a comment

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 adds support for identity-based connections for Web PubSub input and output bindings in Azure Functions. Previously, only connection strings were supported. The key changes enable users to configure connections using either traditional connection strings or identity-based connections (managed identity, service principal, etc.) through configuration sections.

Key Changes:

  • Introduces IWebPubSubServiceClientFactory to abstract client creation with support for both connection string and identity-based connections
  • Removes [ConnectionString] attribute from Connection properties to support configuration section names
  • Updates validation logic to check for both connection string and identity-based connection configurations
  • Adds comprehensive test coverage for the new functionality

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
WebPubSubServiceClientFactoryTests.cs New test file validating hub resolution and endpoint configuration for client factory
WebPubSubServiceAccessUtilTests.cs Replaces mock with TestAzureComponentFactory and adds tests for CanCreateFromIConfiguration method
JobHostEndToEndTests.cs Expands tests to cover both global and local connections with connection strings and identity-based configurations
TestAzureComponentFactory.cs New test helper providing a reusable AzureComponentFactory instance for tests
WebPubSubConnectionAttribute.cs Updates documentation to reflect support for configuration sections
WebPubSubAttribute.cs Updates documentation to reflect support for configuration sections
Microsoft.Azure.WebJobs.Extensions.WebPubSub.csproj Temporarily removes ApiCompatVersion to allow breaking change
WebPubSubServiceCredential.cs Makes AccessKey nullable to support connection strings without access keys
WebPubSubServiceClientFactory.cs New factory implementing client creation with connection/hub resolution fallback logic
WebPubSubJobsBuilderExtensions.cs Registers IWebPubSubServiceClientFactory in DI container
WebPubSubConfigProvider.cs Refactors to use client factory and updated validation logic
IWebPubSubServiceClientFactory.cs New interface defining client factory contract
Microsoft.Azure.WebJobs.Extensions.WebPubSub.netstandard2.0.cs Removes ConnectionString attribute from API surface
Microsoft.Azure.WebJobs.Extensions.WebPubSub.net8.0.cs Removes ConnectionString attribute from API surface

@Y-Sindo Y-Sindo enabled auto-merge (squash) December 11, 2025 08:20
@Y-Sindo Y-Sindo merged commit 70c1c8c into Azure:main Dec 12, 2025
21 checks passed
@Y-Sindo Y-Sindo deleted the wpsaad branch December 12, 2025 01:21
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.

2 participants