-
Notifications
You must be signed in to change notification settings - Fork 494
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
Public properties : Fixes public types to be upgrade safe so new content is not lost on deserialize and serialize paths. #2712
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.
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.
Microsoft.Azure.Cosmos/src/Resource/Settings/AccountProperties.cs
Outdated
Show resolved
Hide resolved
Microsoft.Azure.Cosmos/src/Resource/Settings/StoredProcedureProperties.cs
Outdated
Show resolved
Hide resolved
Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/SettingsContractTests.cs
Outdated
Show resolved
Hide resolved
d0114c9
to
c8beda1
Compare
Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/SettingsContractTests.cs
Show resolved
Hide resolved
Microsoft.Azure.Cosmos/src/Resource/ClientEncryptionKey/ClientEncryptionKeyProperties.cs
Outdated
Show resolved
Hide resolved
Microsoft.Azure.Cosmos/src/Resource/ClientEncryptionKey/ClientEncryptionKeyProperties.cs
Outdated
Show resolved
Hide resolved
e409031
to
19a547e
Compare
Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/SettingsContractTests.cs
Outdated
Show resolved
Hide resolved
Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/SettingsContractTests.cs
Outdated
Show resolved
Hide resolved
Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/SettingsContractTests.cs
Show resolved
Hide resolved
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.
Co-authored-by: Matias Quaranta <ealsur@users.noreply.github.com>
Co-authored-by: Matias Quaranta <ealsur@users.noreply.github.com>
7f6c55d
to
c74307d
Compare
Description
The current public types like ContainerProperties lose any new fields added by the service currently. If the property is not a know field is lost on the deserialize/serialize logic. This can possibly break older SDKs if new contract elements are added by the service and an update is attempted. The service might throw an exception thinking the user attempted to remove the new field when it was lost in the serialization logic.
To fix this issue a new internal dictionary is added to all the public service contract types to hold any additional properties the c# poco type is not aware of. So that in case of service contract evolution if metadata information changes, we won't loose any information.
Type of change
Closing issues
To automatically close an issue: closes #2678