Skip to content

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

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Jimin/2025 ga #50191

wants to merge 9 commits into from

Conversation

jiminwen-msft
Copy link
Member

V2025_03_15 GA release.
Introduced feature comparing to V2024_03_07 GA release:

  1. Metadata on thread and participants
  2. Thread retention policy

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:

  1. UT
  2. live tests

@Copilot Copilot AI review requested due to automatic review settings May 21, 2025 21:22
Copy link
Contributor

@Copilot 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 updates the Chat service to v2025-03-15, adding thread‐level metadata and retention policy support across models, clients, tests, and documentation.

  • Added Metadata and RetentionPolicy to thread and participant models, factory methods, and request/response payloads
  • Introduced CreateChatThreadOptions and UpdateChatThreadPropertiesOptions 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 that chatThread.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 is learn.microsoft.com. Updating to https://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);
Copy link
Preview

Copilot AI May 21, 2025

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.

Copy link

github-actions bot commented May 21, 2025

API Change Check

APIView identified API level changes in this PR and created the following API reviews

Azure.Communication.Chat

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.

1 participant