Communication chat - paginated results for participants and readreceipts#15682
Merged
sarkar-rajarshi merged 10 commits intoAzure:feature/communication-chat-preview3from Jan 25, 2021
Conversation
* Add failed participant check in response header for create_thread method * New convention method add_participant(thread_participant: ChatThreadParticipant) - sync and async
fangchen0601
reviewed
Dec 9, 2020
sdk/communication/azure-communication-chat/tests/test_chat_thread_client_e2e.py
Outdated
Show resolved
Hide resolved
sdk/communication/azure-communication-chat/tests/test_chat_thread_client_e2e.py
Outdated
Show resolved
Hide resolved
turalf
reviewed
Dec 9, 2020
Contributor
turalf
left a comment
There was a problem hiding this comment.
let's make sure that we run the live tests against the real endpoint and add recording files
sdk/communication/azure-communication-chat/azure/communication/chat/_shared/response.py
Outdated
Show resolved
Hide resolved
sdk/communication/azure-communication-chat/azure/communication/chat/_shared/response.py
Outdated
Show resolved
Hide resolved
| @@ -149,12 +153,27 @@ def test_list_participants(self): | |||
| if self.is_live: | |||
| time.sleep(2) | |||
Contributor
There was a problem hiding this comment.
if you need to do this kind of stuff, i.e. time.sleep() in the test code, due to service behavior, let's not write live tests for these scenarios, this causes inconsistency/unreliability issues in our live tests. Instead mocking the network call - as you already added.
We are removing these kinds of tests from the e2e tests in master branch too.
sdk/communication/azure-communication-chat/tests/test_chat_thread_client_e2e.py
Show resolved
Hide resolved
sdk/communication/azure-communication-chat/tests/test_chat_thread_client_e2e.py
Outdated
Show resolved
Hide resolved
Leoaqr
reviewed
Dec 10, 2020
sdk/communication/azure-communication-chat/tests/test_chat_thread_client_async.py
Outdated
Show resolved
Hide resolved
sdk/communication/azure-communication-chat/tests/test_chat_thread_client_e2e_async.py
Outdated
Show resolved
Hide resolved
Leoaqr
reviewed
Dec 10, 2020
sdk/communication/azure-communication-chat/tests/test_chat_thread_client_async.py
Show resolved
Hide resolved
annatisch
reviewed
Dec 16, 2020
...unication/azure-communication-chat/azure/communication/chat/aio/_chat_thread_client_async.py
Outdated
Show resolved
Hide resolved
Leoaqr
approved these changes
Jan 25, 2021
sarkar-rajarshi
added a commit
that referenced
this pull request
Feb 2, 2021
* ACS Chat: Changes for API version: 2020-11-01-preview3 (#15455) Several changes required by `2020-11-01-preview3` of the API: - Rename `Thread Members` to `Participants` - Rename function `UpdateThread` to `UpdateTopic` - Rename `ReadReceipt` to `ChatMessageReadReceipt` in model - Return message id (string) instead of SendMessageResult (object) when calling `send_message` - Add a convenience method `add_participant` for adding 1 participant - Add failed participants check in response header in `create_thread` function Misc: - Add updated test record files Co-authored-by: Leo Li <jixli@microsoft.com> Co-authored-by: Rajarshi Sarkar <73562869+sarkar-rajarshi@users.noreply.github.com> * Update ACS Chat Python SDK align with swagger changes (#15640) - Seperate AzureCommunicationChatServiceOperationsMixin into ChatOperations and ChatThreadOperations - Move invalid participants into errors object in reponse body Co-authored-by: Leo Li <jixli@microsoft.com> * Communication chat - paginated results for participants and readreceipts (#15682) * Failed participant check + single member add * Add failed participant check in response header for create_thread method * New convention method add_participant(thread_participant: ChatThreadParticipant) - sync and async * Add empty line at the end of files * Enable pagination for list participants * Enable pagination for read receipts * conflicts resolved after merge with upstream * update README.md * e2e test fix * bkp commit * updated e2e tests * adding test recording Co-authored-by: Leo Li <jixli@microsoft.com> * Updated swagger changes (#16390) * Updated swagger changes - Generate new models from swagger - ChatMessage.content -> ChatMessageContent instead of 'str' - Remove ChatMessagePriority - Introduce ChatMessageType - Add tests around ChatMessageType deserialization - Generate a repeatability ID by default - Add some test scenarios around repeatability ID - Update all relevant tests - Update sample code - Record new test sessions * Rebase with master - Use CommunicationUserIdentifier * pylint fixes Co-authored-by: Jixing (Leo) Li <lijixing3377@gmail.com> Co-authored-by: Leo Li <jixli@microsoft.com>
juancamilor
pushed a commit
that referenced
this pull request
Feb 5, 2021
* Rsarkar/chat preview3 rebased (#16463) * ACS Chat: Changes for API version: 2020-11-01-preview3 (#15455) Several changes required by `2020-11-01-preview3` of the API: - Rename `Thread Members` to `Participants` - Rename function `UpdateThread` to `UpdateTopic` - Rename `ReadReceipt` to `ChatMessageReadReceipt` in model - Return message id (string) instead of SendMessageResult (object) when calling `send_message` - Add a convenience method `add_participant` for adding 1 participant - Add failed participants check in response header in `create_thread` function Misc: - Add updated test record files Co-authored-by: Leo Li <jixli@microsoft.com> Co-authored-by: Rajarshi Sarkar <73562869+sarkar-rajarshi@users.noreply.github.com> * Update ACS Chat Python SDK align with swagger changes (#15640) - Seperate AzureCommunicationChatServiceOperationsMixin into ChatOperations and ChatThreadOperations - Move invalid participants into errors object in reponse body Co-authored-by: Leo Li <jixli@microsoft.com> * Communication chat - paginated results for participants and readreceipts (#15682) * Failed participant check + single member add * Add failed participant check in response header for create_thread method * New convention method add_participant(thread_participant: ChatThreadParticipant) - sync and async * Add empty line at the end of files * Enable pagination for list participants * Enable pagination for read receipts * conflicts resolved after merge with upstream * update README.md * e2e test fix * bkp commit * updated e2e tests * adding test recording Co-authored-by: Leo Li <jixli@microsoft.com> * Updated swagger changes (#16390) * Updated swagger changes - Generate new models from swagger - ChatMessage.content -> ChatMessageContent instead of 'str' - Remove ChatMessagePriority - Introduce ChatMessageType - Add tests around ChatMessageType deserialization - Generate a repeatability ID by default - Add some test scenarios around repeatability ID - Update all relevant tests - Update sample code - Record new test sessions * Rebase with master - Use CommunicationUserIdentifier * pylint fixes Co-authored-by: Jixing (Leo) Li <lijixing3377@gmail.com> Co-authored-by: Leo Li <jixli@microsoft.com> * Apiview changes (#16560) * apiview fixes - Add missing type hints - return ItemPaged or AsyncItemPaged instead of full classpath Co-authored-by: Jixing (Leo) Li <lijixing3377@gmail.com> Co-authored-by: Leo Li <jixli@microsoft.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes required by 2020-11-01-preview3 of the API: