-
Notifications
You must be signed in to change notification settings - Fork 5k
Jimin/2025 ga #50191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Jimin/2025 ga #50191
Conversation
There was a problem hiding this 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 updates the Chat service to v2025-03-15, adding thread‐level metadata and retention policy support across models, clients, tests, and documentation.
- Added
Metadata
andRetentionPolicy
to thread and participant models, factory methods, and request/response payloads - Introduced
CreateChatThreadOptions
andUpdateChatThreadPropertiesOptions
types and corresponding client overloads - Expanded live and unit tests to cover metadata and retention policies, plus updated README and autorest config
Reviewed Changes
Copilot reviewed 32 out of 32 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
ChatClientsTests.cs | Added unit tests for thread retention policies |
ChatClientsLiveTests.cs | Extended live tests to include metadata and retention |
autorest.md | Bumped package tag and specs path to 2025-03-15 |
Models/CreateChatThreadOptions.cs | New options type with metadata & retention properties |
Models/UpdateChatThreadPropertiesOptions.cs | New properties options type |
Models/ChatThreadProperties.cs | Added Metadata and RetentionPolicy properties |
Models/ChatParticipant.cs | Added Metadata property and internal constructor |
Models/ChatModelFactory.cs | Updated factory methods for metadata & retention |
ChatThreadClient.cs | Added UpdateProperties overloads |
ChatRestClient.cs | Switched to options overloads for thread creation |
ChatClientOptions.cs | Updated to service version V2025_03_15 |
ChatClient.cs | Overloaded CreateChatThread methods using options |
README.md | Updated snippets and doc links for new features |
Comments suppressed due to low confidence (2)
sdk/communication/Azure.Communication.Chat/tests/ChatClients/ChatClientsTests.cs:1278
- The test
CreateChatThreadWithThreadRetentionPolicyShouldSucceed
verifies the retention policy but does not assert thatchatThread.Metadata
contains the expected entries. Consider adding assertions for metadata to fully cover the new feature.
var threadCreationDateRetentionPolicy = chatThread.RetentionPolicy as ThreadCreationDateRetentionPolicy;
sdk/communication/Azure.Communication.Chat/README.md:404
- [nitpick] The links use
docs.microsoft.com
, but the current standard islearn.microsoft.com
. Updating tohttps://learn.microsoft.com/...
ensures consistency with other Azure SDK docs.
[useraccesstokens]:https://docs.microsoft.com/azure/communication-services/quickstarts/access-tokens?pivots=programming-language-csharp
/// <param name="deletedOn"> Deleted on date time </param> | ||
/// <param name="metadata"> Property bag of chat thread metadata key - value pairs. </param> | ||
/// <returns>A new <see cref="Chat.ChatThreadProperties"/> instance for mocking.</returns> | ||
public static ChatThreadProperties ChatThreadProperties(string id, string topic, DateTimeOffset createdOn, CommunicationIdentifier createdBy, DateTimeOffset deletedOn, IDictionary<string, string> metadata) => new ChatThreadProperties(id, topic, createdOn, createdBy, deletedOn); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This factory overload accepts a metadata
parameter but calls a constructor that doesn't take metadata. You need to add or update a matching ChatThreadProperties
constructor that accepts IDictionary<string, string>
(and ideally RetentionPolicy
).
Copilot uses AI. Check for mistakes.
API Change CheckAPIView identified API level changes in this PR and created the following API reviews |
V2025_03_15 GA release.
Introduced feature comparing to V2024_03_07 GA release:
API spec for this release: https://github.com/LuChen-Microsoft/azure-rest-api-specs/blob/release-communication-chat-2025-03-15/specification/communication/data-plane/Chat/stable/2025-03-15/communicationserviceschat.json
Introduced feature is a subset of V2024_03_15_preview release:
The PR for the V2024_03_15_preview as reference: Added ACS Chat preview feature: introducing chat data retention as a thread property. by angiurgiu · Pull Request #42854 · Azure/azure-sdk-for-net
Test: