Skip to content

Add August 2026 preview support for Web PubSub Chat - #50806

Open
yzt (Y-Sindo) wants to merge 18 commits into
Azure:mainfrom
Y-Sindo:chatserviceclient
Open

yzt (Y-Sindo) wants to merge 18 commits into
Azure:mainfrom
Y-Sindo:chatserviceclient

Conversation

@Y-Sindo

@Y-Sindo yzt (Y-Sindo) commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Description

Add Web PubSub Chat support for 2026-08-01-preview and make it the default API version.

MessageContent now uses fromText / fromBinary instead of its public constructor and setters, ensuring text and binary content are mutually exclusive.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

Copilot AI balanced review requested due to automatic review settings October 14, 2026 23:59
@Y-Sindo
yzt (Y-Sindo) requested a review from a team as a code owner October 14, 2026 23:59
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
34 pipeline(s) were filtered out due to trigger conditions.
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.

🔵 Needs a closer look

The default-version switch and expanded APIs warrant human confirmation of live and clean-cache playback results, alongside the outstanding link-validation correction.

1 open finding
What changed in this PR

Adds August 2026 preview support to the Web PubSub Chat Java SDK, extending chat management and updating validation and usage guidance.

Changes:

  • Adds topic management and room/user listing APIs, with August as the default service version.
  • Expands sync/async tests, pagination checks, and test-resource configuration.
  • Updates samples, documentation, and recordings while tracking the upstream async page-size limitation.

Paths below are relative to sdk/webpubsub/.

File Description
tests.yml Adds Chat resources and test artifact.
azure-messaging-webpubsub-chat/​tsp-location.yaml Pins the corrected specification.
azure-messaging-webpubsub-chat/​test-resources.bicep Supports configurable test principal types.
azure-messaging-webpubsub-chat/​src/​test/​java/​com/​azure/​messaging/​webpubsub/​chat/​WebPubSubChatServiceClientBuilderTests.java Checks default version and versioned proxy behavior.
azure-messaging-webpubsub-chat/​src/​test/​java/​com/​azure/​messaging/​webpubsub/​chat/​WebPubSubChatPaginationTests.java Adds pagination regression coverage.
azure-messaging-webpubsub-chat/​src/​test/​java/​com/​azure/​messaging/​webpubsub/​chat/​ChatServiceClientTestBase.java Adjusts playback matching and cleanup logging.
azure-messaging-webpubsub-chat/​src/​test/​java/​com/​azure/​messaging/​webpubsub/​chat/​ChatServiceAugustClientLiveTests.java Adds synchronous feature tests.
azure-messaging-webpubsub-chat/​src/​test/​java/​com/​azure/​messaging/​webpubsub/​chat/​ChatServiceAugustAsyncClientLiveTests.java Adds asynchronous feature tests.
azure-messaging-webpubsub-chat/​src/​samples/​java/​com/​azure/​messaging/​webpubsub/​chat/​WebPubSubChatSamples.java Demonstrates new operations and protocol paging.
azure-messaging-webpubsub-chat/​src/​main/​resources/​META-INF/​azure-messaging-webpubsub-chat_metadata.json Updates generated API metadata.
azure-messaging-webpubsub-chat/​src/​main/​java/​com/​azure/​messaging/​webpubsub/​chat/​WebPubSubChatServiceVersion.java Makes August preview the default.
azure-messaging-webpubsub-chat/​src/​main/​java/​com/​azure/​messaging/​webpubsub/​chat/​WebPubSubChatServiceClient.java Adds synchronous operations.
azure-messaging-webpubsub-chat/​src/​main/​java/​com/​azure/​messaging/​webpubsub/​chat/​WebPubSubChatServiceAsyncClient.java Adds asynchronous operations.
azure-messaging-webpubsub-chat/​src/​main/​java/​com/​azure/​messaging/​webpubsub/​chat/​models/​ChatUserRoom.java Adds read-only user-room projections.
azure-messaging-webpubsub-chat/​src/​main/​java/​com/​azure/​messaging/​webpubsub/​chat/​models/​ChatTopicState.java Defines topic lifecycle states.
azure-messaging-webpubsub-chat/​src/​main/​java/​com/​azure/​messaging/​webpubsub/​chat/​models/​ChatTopic.java Adds the topic model and serialization.
azure-messaging-webpubsub-chat/​src/​main/​java/​com/​azure/​messaging/​webpubsub/​chat/​implementation/​JsonMergePatchHelper.java Supports topic merge-patch serialization.
azure-messaging-webpubsub-chat/​README.md Documents new features and paging limitations.
azure-messaging-webpubsub-chat/​KNOWN_ISSUES.md Tracks upstream paging behavior and verification.
azure-messaging-webpubsub-chat/​CHANGELOG.md Records preview features and validation updates.
azure-messaging-webpubsub-chat/​assets.json Updates the recording asset tag.
azure-messaging-webpubsub-chat/​AGENTS.md Documents package development constraints.

🧠 Review effort: Balanced

yzt (Y-Sindo) and others added 3 commits October 14, 2026 18:26
Generate from the corrected specification and update samples and documentation. Verify the complete sync/async live suite in Central US EUAP, remove the routing workaround, and upload sanitized latest-version recordings. Track the independent upstream async paging limitation without customization.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use an absolute GitHub reference for generator issue tracking and link the available Chat REST API specification instead of an unpublished documentation page.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Regenerate Chat with the emitter 0.48.1 already adopted on main. Enable strict paging regressions, use typed async paging in scenarios and samples, and retire the temporary workaround documentation. Fresh-cache playback passes all 59 tests without skips.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Y-Sindo
yzt (Y-Sindo) marked this pull request as draft October 22, 2026 04:28
Correct request visibility and PATCH optionality across sync, async and implementation Javadocs while retaining response requiredness. Persist the documentation-only workaround in Java customization and cover regeneration and idempotence with regression tests.

Related: Azure/typespec-azure#5721

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Y-Sindo
yzt (Y-Sindo) marked this pull request as ready for review October 23, 2026 04:52
Use text and binary factories, preserve customization across regeneration, and update samples and regression tests. Remove obsolete package notes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
yzt (Y-Sindo) and others added 2 commits October 27, 2026 17:17
Align MessageContent imports and Javadoc with generated output and preserve Javadoc spacing in the customization.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Preserve handwritten fields and serialization methods through partial update instead of duplicating their implementations in AST customization.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Comment thread sdk/webpubsub/tests.yml Resolved
Share new sync/async scenarios, preserve isolated Chat test resources, and clarify topic creation state and README guidance.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
yzt (Y-Sindo) and others added 2 commits October 28, 2026 16:18
Keep setState as an in-place customization and consolidate remaining sync/async tests without re-recording service traffic.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Restore the configurable tester principal type and document the local user-authentication override while preserving service-principal defaults for CI.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

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.

Don't bother adding tests to customizations

@Y-Sindo yzt (Y-Sindo) Oct 29, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Removed.

}
}

static String correctLifecycleDocumentation(String source) {

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.

This customization seems to be covering something that should be, or have been, fixed at the spec layer.

@Y-Sindo yzt (Y-Sindo) Oct 29, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The spec already defines the correct visibility; the emitter isn’t respecting it. Tracked in [Bug]: Lifecycle visibility and PATCH requiredness are not consistently reflected in generated SDKs Azure/typespec-azure#5721

corrected = corrected.replace("Create or replace a topic.",
"Create or replace a topic.\n *\n"
+ " * <p>When creating a topic, omit state or set it to Normal. "
+ "Other states are only valid when updating an existing topic.</p>");

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.

Based on this description, it really seems these APIs should be called createOrUpdate as this is conveying update behavior not replacement behavior.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Copilot: “Updating” here meant replacing an existing topic, not a partial update. I’ve clarified the wording to “replacing an existing topic”; createOrReplaceTopic remains the intended name.

assertTrue(request.contains("kind: String(Human) (Required)"));
assertTrue(request.contains("nickname: String (Required)"));
}
assertTrue(doc.contains("@param resource"));

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We don't need tests for customization code, according to the api view comment, right?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Copilot: Yes, that matches Alan's review guidance. I've removed the two customization-only test classes and their dedicated JUnit dependency locally; the SDK's behavior tests remain. This cleanup is not pushed yet, so I'm leaving the thread open until the PR includes it.

yzt (Y-Sindo) and others added 6 commits October 28, 2026 22:52
Rename client access token options and resource parameters, expose conversation roomId with its existing wire name, clarify paging and content documentation, and pin the shared TypeSpec changes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Remove customization-only tests and clarify topic creation versus partial updates.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Regeneration preserves the existing Java API and implementation and refreshes the cross-language version metadata.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Temporarily print the exact regeneration diff to diagnose the reproducible CI-only failure.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep the read-required Topic state documentation consistent when the emitter marks the non-create property optional. Preserve optional request state and remove temporary CI diff diagnostics.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants