Skip to content
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

CosmosOperationCanceledException: Adds serializable functionality #3433

Conversation

NaluTripician
Copy link
Contributor

Pull Request Template

Description

Code changes to make the CosmosOperationCanceledException Exception serializable. It should be noted that CosmosDiagnostics are not serializable and are left out of sterilization and upon deserialization the original CosmosDiagnotics are replaced with a CosmosTraceDiagnostics with a NoOpTrace. lazyMessage and toStringMessage for deserialized CosmosOperationCanceledExceptions are also updated to inform users that CosmosDiagnostics cannot be deserialized. Additionally CosmosOperationCanceledTests.cs was also created to test that the relevant information can be serialized and recovered.

Type of change

Please delete options that are not relevant.

  • [] New feature (non-breaking change which adds functionality)
  • [] This change requires a documentation update

Closing issues

To automatically close an issue: closes #3402

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Please follow the required format: "[Internal] Category: (Adds|Fixes|Refactors|Removes) Description"

Internal should be used for PRs that have no customer impact. This flag is used to help generate the changelog to know which PRs should be included. Examples:
Diagnostics: Adds GetElapsedClientLatency to CosmosDiagnostics
PartitionKey: Fixes null reference when using default(PartitionKey)
[v4] Client Encryption: Refactors code to external project
[Internal] Query: Adds code generator for CosmosNumbers for easy additions in the future.

@NaluTripician NaluTripician changed the title Made CosmosOperationCanceledException Serializable CosmosOperationCanceledException: Adds serializable functionality Aug 31, 2022
@ealsur ealsur dismissed github-actions’s stale review September 1, 2022 15:06

Bot not reacting to title change

ealsur
ealsur previously approved these changes Sep 1, 2022
@ealsur ealsur enabled auto-merge (squash) September 1, 2022 15:55
@ealsur
Copy link
Member

ealsur commented Sep 1, 2022

@NaluTripician See the test failures:

 Failed ContractChanges [179 ms]
  Error Message:
   Assert.Fail failed. Public API has changed. If this is expected, then run (EnlistmentRoot)\UpdateContracts.ps1 . To see the differences run the update script and use git diff.
  Stack Trace:

Because you are modifying a public type, this generates a change in the API contract, please run the Powershell the test indicates that should be in the root of your clone.

@ealsur ealsur merged commit e13d0cb into master Sep 1, 2022
@ealsur ealsur deleted the users/nalutripician/CosmosOperationCanceledExceptionSerialization branch September 1, 2022 19:14
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.

Make CosmosOperationCanceledException Serializable
3 participants