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

[Internal] Msdata/Direct: Refactors msdata/direct branch with latest v3 master and Cosmos.Direct v3.31.2 #3925

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
147 commits
Select commit Hold shift + click to select a range
8a3883e
[Internal] Client Telemetry: Fixes tests leaking environment variable…
ealsur Oct 27, 2022
543294c
Updated change log and bumped up the version. (#3526)
kundadebdatta Oct 29, 2022
abf3d93
Query: Fixes performance regression on target partition on some ORDER…
neildsh Oct 31, 2022
84ef545
[Internal] AI Integration: Adds SubStatusCode Information in attribut…
sourabh1007 Nov 2, 2022
68b9805
Diagnostics: Removes unused properties and reduces size (#3519)
aavasthy Nov 2, 2022
a9bcaf5
[Internal] docs: Add address caches conceptual flow (#3534)
kirankumarkolli Nov 2, 2022
6762e07
Release: Adds SDK version and changelog for 3.31.2 (#3546)
neildsh Nov 3, 2022
ef7339e
[Internal] Documentation: Removes invalid comment from ReadThroughput…
ealsur Nov 4, 2022
825595a
[Internal] nugetconfig: Removes specific overrides (#3551)
kirankumarkolli Nov 7, 2022
4746a6f
Query: Fixes partition range evaluation for spatial queries (#3495)
adityasa Nov 9, 2022
acd899e
[Internal] Documentation: Refactors cache content on its own document…
ealsur Nov 9, 2022
01c1cd4
[Internal] Emulator unit tests: Adds IdEncoding unit tests for Comput…
FabianMeiswinkel Nov 10, 2022
ab1f249
Change Feed Processor: Adds support for Resource Tokens (#3566)
ealsur Nov 15, 2022
9fb3a12
[Internal] AI integration: Refactor code how container and database n…
sourabh1007 Nov 15, 2022
9c2015b
[Internal] AI Integration: Adds a new flag in DistributedTracingOptio…
sourabh1007 Nov 16, 2022
c38346d
Query: Fixes default to BadRequestException in case of internal error…
neildsh Nov 17, 2022
9cafaa8
[Internal] Query: Adds unit tests for Merge/Split implementation with…
akotalwar Nov 17, 2022
2681be8
Client Retry Policy: Adds HTTP timeouts with request-level cross-regi…
NaluTripician Nov 18, 2022
010e4ba
Documentation: Fixes EUAP in Comments (#3579)
PramodValavala-MSFT Nov 21, 2022
b24eeb9
Query: Fixes incorrect FeedResponse.Count when result contains undefi…
neildsh Nov 23, 2022
9734ec5
removed allr eference (#3581)
sourabh1007 Nov 24, 2022
6632168
Trace: Fixes Tracing/diagnostics hour-times to 24Hours (#3577)
kirankumarkolli Nov 24, 2022
8e82a1a
AI Integration: Adds cosmetic fixes (#3576)
sourabh1007 Nov 26, 2022
2f047e1
Query: Adds ALL Scalar Expression (#3509)
ezrahaleva-msft Nov 28, 2022
07b34e6
Release: Adds API contracts for 3.31.2-preview (#3586)
neildsh Nov 28, 2022
5318646
[Internal] sccignore: Adds a .sccignore file to apply an exception fo…
vivekr20 Nov 29, 2022
28318b0
[Internal] PermissionTests: Adds CosmosPermissionTests Coverage (#3593)
prasadu-microsoft Dec 1, 2022
a34bac7
[Internal] AI Integration: Refactors to Operation prefix and add test…
sourabh1007 Dec 5, 2022
6b1fa03
[Internal] HttpTimeoutPolicy: Removes Data Plane Writes from being ab…
NaluTripician Dec 15, 2022
814e72e
[Internal] Performance Testing: Adds Distributed Tracing option in be…
sourabh1007 Dec 20, 2022
5c05fbb
[Internal] Benchmark: Refactors code to make Memory Stream capacity c…
sourabh1007 Jan 4, 2023
73c9e08
add new LatestVersion changefeed mode that has same behavior as Incre…
philipthomas-MSFT Jan 4, 2023
77e3aa4
Query: Fixes handling of CosmosUndefined, CosmosGuid and CosmosBinary…
neildsh Jan 7, 2023
3c875c7
[Internal] Subpartitioning: Adds updates to test coverage for subpart…
NaluTripician Jan 9, 2023
416b154
[Internal] ContainerProperties: Fixes version reset when setting Part…
ealsur Jan 9, 2023
59b70a6
[Internal] AI Integration: Adds CorrelationId and Activity Id Attribu…
sourabh1007 Jan 10, 2023
612337c
Documentation: Fixes CosmosClientBuilder.WithConnectionModeGateway pa…
arthuraugsten Jan 11, 2023
55f9ce8
Upgrade Resiliency: Refactors Implementation for Opening Rntbd Connec…
kundadebdatta Jan 11, 2023
9dde99e
[Preview] AI integration: Adds IsDistributedTracingEnabled flag as pu…
sourabh1007 Jan 12, 2023
36d0e0f
Change Feed Processor: Fixes behavior with StartTime on Local (#3645)
ealsur Jan 13, 2023
bdd059d
[Internal] Client Telemetry: Refactors code to use base useragent str…
sourabh1007 Jan 17, 2023
b3cf7df
[Internal] AI Integration: Refactors code to rename event name (#3648)
sourabh1007 Jan 17, 2023
4b77519
Region Availability: Adds Poland Central Region For Public Usage (#3656)
kundadebdatta Jan 17, 2023
1710115
Client Encryption: Adds validation code to check if the Key Vault URI…
kr-santosh Jan 19, 2023
e383d83
[Internal] Query: Adds Split Support for Ode (#3572)
akotalwar Jan 20, 2023
ccaf8fb
[Internal] AI Integration : Fixes operation type for batch (#3660)
sourabh1007 Jan 23, 2023
c29abfe
CosmosClientOptions: Adds ServerCertificateCustomValidationCallback f…
aavasthy Jan 24, 2023
2608d4a
Query: Adds EnableOptimisticDirectExecution flag to QueryRequestOptio…
akotalwar Jan 26, 2023
d6a439f
[Internal] Tests: Removes Direct/HTTPS emulator tests (#3679)
ealsur Feb 2, 2023
393ae23
[Internal] Benchmark : Fixes issue with dependency on Cosmos Project …
sourabh1007 Feb 2, 2023
122bc56
LocalQuorum: Adds Quorum reads on Consistent Prefix Accounts (#3680)
pravengithub Feb 3, 2023
8a537ce
3.32.0: Adds new SDK version and contract files (#3687)
aavasthy Feb 6, 2023
bf9a6d4
[Internal] Samples: Adds change feed pull model samples (#3646)
jcocchi Feb 9, 2023
16caa1b
[Internal] Tests: Refactors emulator CI (#3688)
ealsur Feb 13, 2023
6434c10
[Internal] GitHub Template: Adds needs-investigation label (#3708)
ealsur Feb 14, 2023
4e923da
Adding fabric bot action (#3709)
ealsur Feb 14, 2023
38d1bcc
CosmosNullReferenceException: Refactors CosmosNullReferenceException …
jeet1995 Feb 17, 2023
209e473
[Internal] PriorityRequests: Fixes header value (#3714)
Achint-Agrawal Feb 17, 2023
67e1a90
[Internal] Query: Adds single physical partition check for Optimistic…
akotalwar Feb 17, 2023
b257f8e
[Internal] CTL: Fixes Reservoir Sampling Logic (#3712)
kundadebdatta Feb 17, 2023
94c83f5
Diagnostics: Adds startDate in Summary (#3707)
NimitS1 Feb 27, 2023
462a2c4
[Internal] Client Telemetry: Adds network information in the payload …
sourabh1007 Feb 27, 2023
0088c2f
Documentation: Fixes Database.ReadAsync description (#3457)
SaurabhSharma-MSFT Mar 1, 2023
fd687f5
Upgrade Resiliency: Adds Implementation for Validating the Unhealthy …
kundadebdatta Mar 1, 2023
93bb10b
ReadMany: Fixes BadRequest when using Ids with single quotes (#3732)
ealsur Mar 1, 2023
45c0d14
Release: Adds SDK version and changelog for 3.32.1 (#3733)
ealsur Mar 1, 2023
0018c4a
[Internal] Build: Fixes static tool analysis versions (#3736)
ealsur Mar 2, 2023
d6e04a9
Query: Fixes System.ArgumentException when using PartitionKey.None on…
neildsh Mar 2, 2023
f262f89
Query: Adds FIRST and LAST Scalar Expressions (#3629)
ezrahaleva-msft Mar 6, 2023
dc3d037
Subpartitioning: Adds support for Prefix Partition Key searches for s…
philipthomas-MSFT Mar 7, 2023
6ebb8d4
[Internal] ClientTelemetry: Adds logic to limit payload size to 2 MB …
sourabh1007 Mar 9, 2023
682b001
Query: Fixes regression from LINQ custom serializer fix (#3749)
leminh98 Mar 10, 2023
f2a3078
[Internal] LocalQuorum: Refactors override (i.e. strong) to allow fro…
kirankumarkolli Mar 10, 2023
d41f099
Release: Adds SDK version and change log for 3.32.2 (#3752)
ealsur Mar 11, 2023
1acfaa2
Subpartitioning: Adds APIs for public release and increase REST API v…
NaluTripician Mar 21, 2023
d0c0578
Change Feed Processor: Fixes LeaseLostException leaks on notification…
ealsur Mar 23, 2023
4ab6293
Upgrade Resiliency: Refactors GatewayAddressCache to Mark TransportAd…
kundadebdatta Mar 23, 2023
d822239
[Preview] PriorityBasedExecution: Adds PriorityLevel as a RequestOpti…
Achint-Agrawal Mar 27, 2023
1c544bf
[Internal] Client Telemetry: Adds sampling logic for network level te…
sourabh1007 Mar 29, 2023
6553a70
[Internal] Emulator Test : Fixes test when running with distributed t…
sourabh1007 Mar 29, 2023
67dc262
Release: Adds SDK version and changelog for 3.32.3 (#3788)
ealsur Mar 30, 2023
a697242
SummaryDiagnostics: Refactors Code to Remove Dependency of HttpRespon…
kundadebdatta Apr 3, 2023
e41eea5
[Internal] Documentation: Fixes API name to NoSQL (#3795)
jcocchi Apr 4, 2023
ba078c9
[Internal] CTL: Fixes docker image pipeline (#3794)
ealsur Apr 4, 2023
ae6bcf3
[Internal] AI Integration : Refactors useragent attribute name as per…
sourabh1007 Apr 4, 2023
2b69394
HttpClient: Adds Properties to the Http messages if available (#3803)
ealsur Apr 6, 2023
4222cef
Documentation: Refactors SQL API reference to NoSQL API (#3793)
scottaddie Apr 6, 2023
fce9702
[Internal] Perf test: Refactors code to re-enable performance tests (…
sourabh1007 Apr 7, 2023
2f2e8fb
HttpClient: Adds detection of DNS changes through use of SocketsHttpH…
NaluTripician Apr 7, 2023
789f701
[Internal] Tests: Fixes Open Telemetry attributes for ReadMany test (…
ealsur Apr 8, 2023
2b6fdb7
[Internal] Client Telemetry: Refactors code to run client telemetry d…
sourabh1007 Apr 10, 2023
33dea8a
Patch: Adds Move Operation (#3389)
Amaan-Haque Apr 11, 2023
31b1ff3
[Internal] Pipelines: Adds nightly build to produce packages (#3802)
ealsur Apr 11, 2023
bfbb43e
[Internal] OpenTelemetry: Direct Package update and replacing diagnos…
aavasthy Apr 18, 2023
f94869a
[Internal] MerlinBot: Adds auto-merge and cleanup automation (#3813)
ealsur Apr 18, 2023
afd5904
Update fabricbot.json (#3824)
ealsur Apr 24, 2023
fb80ba8
[Internal] Upgrade Resiliency: Adds Logic to Validate `Unknown` Repli…
kundadebdatta Apr 24, 2023
5d4f7c1
Serialization: Fixes call to CosmosSerializer.FromStream on Gateway m…
Apr 25, 2023
0d0ffe0
[Internal] Documentation: Adds documentation covering build pipelines…
ealsur Apr 27, 2023
e872f93
Client Encryption: Adds release version of Microsoft.Azure.Cosmos to …
vipulvishal-ms Apr 27, 2023
e5972ac
SDK 3.33.0 : Adds version bump and changelog (#3823)
NaluTripician Apr 27, 2023
7465da2
[Internal] Documentation: Adds msdata/direct Sync-up Guide. (#3828)
kundadebdatta May 1, 2023
20121c8
Query: Adds TRIM string system function support in LINQ (#3833)
leminh98 May 2, 2023
15616d3
Query: Fixes Parsing Error in SQL DOM when CultureInfo is available (…
leminh98 May 2, 2023
1dcba53
Client Encryption: Adds api FetchDataEncryptionKeyWithoutRawKeyAsync …
vipulvishal-ms May 3, 2023
9ba3f75
Initial commit (#3826)
adityasa May 3, 2023
17203a5
Query: Adds Computed Property SDK Support (#3761)
adityasa May 4, 2023
033e883
[Internal] Samples: Adds OpenTelemetry and Application Insights sampl…
jcocchi May 5, 2023
0c15865
[Internal] Query: Added custom serializer coverage tests to Expressio…
onionhammer May 9, 2023
ade7e34
Query: Added remaining Cosmos Type checking functions to CosmosLinqEx…
onionhammer May 9, 2023
aff7349
update sdk version and section tags (#3841)
jcocchi May 10, 2023
1a8b7f0
PackageLicense: Removes PackageLicenseUrl and Adds PackageLicenseFile…
philipthomas-MSFT May 16, 2023
b06d6c3
making ChangeFeedMode.LatestVersion accessible to the public (#3854)
philipthomas-MSFT May 17, 2023
c66e488
AI Integration: Fixes Operation Name in the activity and end to end T…
sourabh1007 May 17, 2023
7b32e8e
SDK 3.34.0 : Adds version bump and changelog (#3855)
philipthomas-MSFT May 18, 2023
2b7d709
Release: Fixes changelog.md change for 3845 to preview (#3859)
philipthomas-MSFT May 18, 2023
3727d4d
removing ThirdPartyNotice.txt from content and contentfiles folders (…
philipthomas-MSFT May 19, 2023
69cda11
Documentation: Adds see also link to Container.CreateTransactionalBat…
rinatmini May 22, 2023
d4f48f4
Query: Adds type-markers with count and length for large arrays (#3852)
Maya-Painter May 23, 2023
459a865
[Internal] AI Integration or Open Telemetry: Design Document (#3858)
sourabh1007 May 24, 2023
09e6fac
Benchmarking: Adds use of ARM Templates for benchmarking (#3838)
NaluTripician May 25, 2023
83bad12
Update README.md (#3875)
NaluTripician May 26, 2023
c5ef47e
moved to new file (#3876)
sourabh1007 May 27, 2023
ee7f86d
Direct Package Upgrade 3.31.0: Refactors code to make compatible with…
sourabh1007 May 30, 2023
89cc257
[Preview] Integrated cache: Adds BypassIntegratedCache to DedicatedGa…
jiajunpeng-msft May 31, 2023
327422b
Client Encryption: Adds Microsoft.Azure.Cosmos compatibility to versi…
vipulvishal-ms Jun 1, 2023
3e3bbe5
CosmosClient: Fixes missing Trace when converting HTTP Timeout to 503…
rinatmini Jun 1, 2023
387ab62
AI Integration: Fixes Open Telemetry Example (#3868)
sourabh1007 Jun 2, 2023
f19acb0
[Internal] Query: Adds OptimisticDirectExecute and RequiresDistributi…
akotalwar Jun 5, 2023
c095bc1
Query: Refactors the EnableOptimisticDirectExecution flag to be publi…
akotalwar Jun 7, 2023
6024f24
[Internal] OpenTelemetry : Adds Telemetry Distributed Tracing functio…
aavasthy Jun 7, 2023
e08fd52
Documentation: Adds additional remarks to CosmosClient (#3891)
rinatmini Jun 8, 2023
d58b441
Open Telemetry End To End Test: Adds baseline for network level reque…
sourabh1007 Jun 8, 2023
df63092
[Internal] Design Docs: Adds Design Document for Client Telemetry (#3…
sourabh1007 Jun 9, 2023
d1dbe94
[Internal] Design Docs: Adds Design Document for Client Telemetry Par…
sourabh1007 Jun 9, 2023
28e03c8
ConnectionPolicy: Refactors Code to Reduce Default Request Timeout to…
kundadebdatta Jun 10, 2023
b924209
[Internal] Upgrade Resiliency: Adds Replica Health State Diagnostics.…
kundadebdatta Jun 10, 2023
ea10439
Subpartitioning: Fixes handling of split physical partitions (#3879)
NaluTripician Jun 12, 2023
8137c77
[Query] Fixes empty property name parsing exception (#3907)
Maya-Painter Jun 14, 2023
b200491
[Preview] Query: Refactors EnableOptimisticDirectExecution to true by…
akotalwar Jun 14, 2023
8684535
Documentations: Adds links to PatchItems docs (#3910)
rinatmini Jun 15, 2023
6970222
[Internal] Direct Package Upgrade: Refactors Code to Bump Up `Cosmos.…
kundadebdatta Jun 17, 2023
b979061
SDK 3.35.0 : Adds version bump and changelog (#3920)
NaluTripician Jun 19, 2023
b1d3134
[Internal] Last minute fix to changelog for 3.35.0 (#3921)
NaluTripician Jun 19, 2023
d22ccdf
Merge branch 'master' into users/kundadebdatta/update_msdata_direct_0…
kundadebdatta Jun 20, 2023
949ce0d
Code changes to sync up with cosmos.direct release 3.31.2.
kundadebdatta Jun 20, 2023
fd077df
Code changes to fix encryption package build failure.
kundadebdatta Jun 20, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ClientOfficialVersion>3.34.0</ClientOfficialVersion>
<ClientPreviewVersion>3.34.0</ClientPreviewVersion>
<ClientOfficialVersion>3.35.0</ClientOfficialVersion>
<ClientPreviewVersion>3.35.0</ClientPreviewVersion>
<ClientPreviewSuffixVersion>preview</ClientPreviewSuffixVersion>
<DirectVersion>3.31.0</DirectVersion>
<DirectVersion>3.31.2</DirectVersion>
<EncryptionOfficialVersion>2.0.2</EncryptionOfficialVersion>
<EncryptionPreviewVersion>2.0.2</EncryptionPreviewVersion>
<EncryptionPreviewSuffixVersion>preview</EncryptionPreviewSuffixVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@
],
"MethodInfo": "System.Threading.Tasks.Task`1[Microsoft.Azure.Cosmos.Encryption.Custom.DataEncryptionKey] FetchDataEncryptionKeyAsync(System.String, System.String, System.Threading.CancellationToken);IsAbstract:False;IsStatic:False;IsVirtual:True;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
},
"System.Threading.Tasks.Task`1[Microsoft.Azure.Cosmos.Encryption.Custom.DataEncryptionKey] FetchDataEncryptionKeyWithoutRawKeyAsync(System.String, System.String, System.Threading.CancellationToken)[System.Runtime.CompilerServices.AsyncStateMachineAttribute(typeof(Microsoft.Azure.Cosmos.Encryption.Custom.CosmosDataEncryptionKeyProvider+<FetchDataEncryptionKeyWithoutRawKeyAsync>))]": {
"Type": "Method",
"Attributes": [
"AsyncStateMachineAttribute"
],
"MethodInfo": "System.Threading.Tasks.Task`1[Microsoft.Azure.Cosmos.Encryption.Custom.DataEncryptionKey] FetchDataEncryptionKeyWithoutRawKeyAsync(System.String, System.String, System.Threading.CancellationToken);IsAbstract:False;IsStatic:False;IsVirtual:True;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
},
"Void .ctor(Microsoft.Azure.Cosmos.Encryption.Custom.EncryptionKeyWrapProvider, Microsoft.Data.Encryption.Cryptography.EncryptionKeyStoreProvider, System.Nullable`1[System.TimeSpan])[System.ObsoleteAttribute(\"Please use the constructor with EncryptionKeyStoreProvider only.\")]": {
"Type": "Constructor",
"Attributes": [
Expand Down Expand Up @@ -398,6 +405,13 @@
],
"MethodInfo": "System.Threading.Tasks.Task`1[Microsoft.Azure.Cosmos.Encryption.Custom.DataEncryptionKey] FetchDataEncryptionKeyAsync(System.String, System.String, System.Threading.CancellationToken);IsAbstract:False;IsStatic:False;IsVirtual:True;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
},
"System.Threading.Tasks.Task`1[Microsoft.Azure.Cosmos.Encryption.Custom.DataEncryptionKey] FetchDataEncryptionKeyWithoutRawKeyAsync(System.String, System.String, System.Threading.CancellationToken)[System.Runtime.CompilerServices.AsyncStateMachineAttribute(typeof(Microsoft.Azure.Cosmos.Encryption.Custom.CosmosDataEncryptionKeyProvider+<FetchDataEncryptionKeyWithoutRawKeyAsync>))]": {
"Type": "Method",
"Attributes": [
"AsyncStateMachineAttribute"
],
"MethodInfo": "System.Threading.Tasks.Task`1[Microsoft.Azure.Cosmos.Encryption.Custom.DataEncryptionKey] FetchDataEncryptionKeyWithoutRawKeyAsync(System.String, System.String, System.Threading.CancellationToken);IsAbstract:False;IsStatic:False;IsVirtual:True;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
},
"Void .ctor(Microsoft.Azure.Cosmos.Encryption.Custom.EncryptionKeyWrapProvider, Microsoft.Data.Encryption.Cryptography.EncryptionKeyStoreProvider, System.Nullable`1[System.TimeSpan])[System.ObsoleteAttribute(\"Please use the constructor with EncryptionKeyStoreProvider only.\")]": {
"Type": "Constructor",
"Attributes": [
Expand Down Expand Up @@ -426,6 +440,11 @@
"Type": "Method",
"Attributes": [],
"MethodInfo": "System.Threading.Tasks.Task`1[Microsoft.Azure.Cosmos.Encryption.Custom.DataEncryptionKey] FetchDataEncryptionKeyAsync(System.String, System.String, System.Threading.CancellationToken);IsAbstract:True;IsStatic:False;IsVirtual:True;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
},
"System.Threading.Tasks.Task`1[Microsoft.Azure.Cosmos.Encryption.Custom.DataEncryptionKey] FetchDataEncryptionKeyWithoutRawKeyAsync(System.String, System.String, System.Threading.CancellationToken)": {
"Type": "Method",
"Attributes": [],
"MethodInfo": "System.Threading.Tasks.Task`1[Microsoft.Azure.Cosmos.Encryption.Custom.DataEncryptionKey] FetchDataEncryptionKeyWithoutRawKeyAsync(System.String, System.String, System.Threading.CancellationToken);IsAbstract:True;IsStatic:False;IsVirtual:True;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
}
},
"NestedTypes": {}
Expand Down
41 changes: 0 additions & 41 deletions Microsoft.Azure.Cosmos.Encryption/src/EncryptionContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -837,47 +837,6 @@ internal async Task ThrowIfRequestNeedsARetryPostPolicyRefreshAsync(
}
}

/// <summary>
/// This function handles the scenario where a container is deleted(say from different Client) and recreated with same Id but with different client encryption policy.
/// The idea is to have the container Rid cached and sent out as part of RequestOptions with Container Rid set in "x-ms-cosmos-intended-collection-rid" header.
/// So when the container being referenced here gets recreated we would end up with a stale encryption settings and container Rid and this would result in BadRequest( and a substatus 1024).
/// This would allow us to refresh the encryption settings and Container Rid, on the premise that the container recreated could possibly be configured with a new encryption policy.
/// </summary>
/// <param name="responseMessage"> Response message to validate. </param>
/// <param name="encryptionSettings"> Current cached encryption settings to refresh if required. </param>
/// <param name="encryptionDiagnosticsContext"> Encryption specific diagnostics. </param>
/// <param name="cancellationToken"> Cancellation token. </param>
internal async Task ThrowIfRequestNeedsARetryPostPolicyRefreshAsync(
ResponseMessage responseMessage,
EncryptionSettings encryptionSettings,
EncryptionDiagnosticsContext encryptionDiagnosticsContext,
CancellationToken cancellationToken)
{
if (responseMessage.StatusCode == HttpStatusCode.BadRequest &&
string.Equals(responseMessage.Headers.Get(Constants.SubStatusHeader), Constants.IncorrectContainerRidSubStatus))
{
// get the latest encryption settings.
await this.GetOrUpdateEncryptionSettingsFromCacheAsync(
obsoleteEncryptionSettings: encryptionSettings,
cancellationToken: cancellationToken);

if (encryptionDiagnosticsContext == null)
{
throw new ArgumentNullException(nameof(encryptionDiagnosticsContext));
}

encryptionDiagnosticsContext.AddEncryptionDiagnosticsToResponseMessage(responseMessage);

throw new EncryptionCosmosException(
"Operation has failed due to a possible mismatch in Client Encryption Policy configured on the container. Retrying may fix the issue. Please refer to https://aka.ms/CosmosClientEncryption for more details. " + responseMessage.ErrorMessage,
HttpStatusCode.BadRequest,
int.Parse(Constants.IncorrectContainerRidSubStatus),
responseMessage.Headers.ActivityId,
responseMessage.Headers.RequestCharge,
responseMessage.Diagnostics);
}
}

internal async Task<List<PatchOperation>> EncryptPatchOperationsAsync(
IReadOnlyList<PatchOperation> patchOperations,
EncryptionSettings encryptionSettings,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public static async Task<ClientEncryptionKeyResponse> CreateClientEncryptionKeyA

ClientEncryptionKeyProperties clientEncryptionKeyProperties = new ClientEncryptionKeyProperties(
clientEncryptionKeyId,
dataEncryptionKeyAlgorithm,
encryptionAlgorithm,
wrappedDataEncryptionKey,
encryptionKeyWrapMetadata);

Expand Down
12 changes: 0 additions & 12 deletions Microsoft.Azure.Cosmos.Encryption/src/EncryptionType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,10 @@
namespace Microsoft.Azure.Cosmos.Encryption
{
/// <summary>
<<<<<<<< HEAD:Microsoft.Azure.Cosmos.Encryption/src/MdeSupport/EncryptionType.cs
/// Represents the encryption algorithms supported for data encryption.
/// </summary>
/// <summary>
/// The type of data encryption.
/// </summary>
/// <remarks>
/// The two encryption types are Deterministic and Randomized.
/// Deterministic encryption always generates the same encrypted value for any given plain text value.
/// Randomized encryption uses a method that encrypts data in a less predictable manner. Randomized encryption is more secure.
========
/// Encryption types supported for data encryption.
/// </summary>
/// <remarks>
/// See <see href="https://aka.ms/CosmosClientEncryption">client-side encryption documentation</see> for more details.
>>>>>>>> master:Microsoft.Azure.Cosmos.Encryption/src/EncryptionType.cs
/// </remarks>
public static class EncryptionType
{
Expand Down
Loading