Skip to content

Commit d25ec72

Browse files
author
leminh98
committed
Merge branch 'users/leminh/LINQGroupByMultiValue' of https://github.com/Azure/azure-cosmos-dotnet-v3 into users/leminh/LINQGroupByMultiValue
2 parents c324414 + 10c1fd8 commit d25ec72

File tree

130 files changed

+15545
-1024
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+15545
-1024
lines changed

Directory.Build.props

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
22
<PropertyGroup>
3-
<ClientOfficialVersion>3.39.1</ClientOfficialVersion>
4-
<ClientPreviewVersion>3.40.0</ClientPreviewVersion>
5-
<ClientPreviewSuffixVersion>preview.1</ClientPreviewSuffixVersion>
6-
<DirectVersion>3.34.0</DirectVersion>
3+
<ClientOfficialVersion>3.41.0</ClientOfficialVersion>
4+
<ClientPreviewVersion>3.42.0</ClientPreviewVersion>
5+
<ClientPreviewSuffixVersion>preview.0</ClientPreviewSuffixVersion>
6+
<DirectVersion>3.34.4</DirectVersion>
77
<EncryptionOfficialVersion>2.0.4</EncryptionOfficialVersion>
88
<EncryptionPreviewVersion>2.1.0</EncryptionPreviewVersion>
99
<EncryptionPreviewSuffixVersion>preview4</EncryptionPreviewSuffixVersion>
10-
<CustomEncryptionVersion>1.0.0-preview06</CustomEncryptionVersion>
10+
<CustomEncryptionVersion>1.0.0-preview07</CustomEncryptionVersion>
1111
<HybridRowVersion>1.1.0-preview3</HybridRowVersion>
1212
<LangVersion>10.0</LangVersion>
1313
<AboveDirBuildProps>$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))</AboveDirBuildProps>

Microsoft.Azure.Cosmos.Encryption.Custom/changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ Preview features are treated as a separate branch and will not be included in th
33
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
44
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
55

6+
### <a name="1.0.0-preview07"/> [1.0.0-preview07](https://www.nuget.org/packages/Microsoft.Azure.Cosmos.Encryption.Custom/1.0.0-preview07) - 2024-06-12
7+
8+
#### Fixes
9+
- [#4546](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/4546) Updates package reference Microsoft.Azure.Cosmos to version 3.41.0-preview and 3.40.0 for preview and stable version support.
10+
611
### <a name="1.0.0-preview06"/> [1.0.0-preview06](https://www.nuget.org/packages/Microsoft.Azure.Cosmos.Encryption.Custom/1.0.0-preview06) - 2023-06-28
712

813
#### Fixes

Microsoft.Azure.Cosmos.Encryption.Custom/src/EncryptionContainer.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,12 +1020,8 @@ public override Task<ResponseMessage> DeleteAllItemsByPartitionKeyStreamAsync(
10201020
requestOptions,
10211021
cancellationToken);
10221022
}
1023-
#endif
10241023

1025-
#if SDKPROJECTREF
1026-
public override ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilderWithAllVersionsAndDeletes<T>(
1027-
string processorName,
1028-
ChangeFeedHandler<ChangeFeedItem<T>> onChangesDelegate)
1024+
public override ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilderWithAllVersionsAndDeletes<T>(string processorName, ChangeFeedHandler<ChangeFeedItem<T>> onChangesDelegate)
10291025
{
10301026
return this.container.GetChangeFeedProcessorBuilderWithAllVersionsAndDeletes(
10311027
processorName,

Microsoft.Azure.Cosmos.Encryption.Custom/src/Microsoft.Azure.Cosmos.Encryption.Custom.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@
2323
</ItemGroup>
2424

2525
<ItemGroup Condition=" '$(SdkProjectRef)' != 'True' AND '$(IsPreview)' != 'True' ">
26-
<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.32.3" />
26+
<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.40.0" />
2727
</ItemGroup>
2828

2929
<ItemGroup Condition=" '$(SdkProjectRef)' != 'True' AND '$(IsPreview)' == 'True' ">
30-
<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.35.1-preview" />
30+
<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.41.0-preview.0" />
3131
</ItemGroup>
3232

3333
<ItemGroup Condition=" '$(SdkProjectRef)' == 'True' ">
@@ -36,7 +36,7 @@
3636

3737
<ItemGroup>
3838
<PackageReference Include="Azure.Core" Version="1.38.0" />
39-
<PackageReference Include="Azure.Identity" Version="1.11.0" />
39+
<PackageReference Include="Azure.Identity" Version="1.11.4" />
4040
<PackageReference Include="Microsoft.Data.Encryption.Cryptography" Version="0.2.0-pre" />
4141
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
4242
</ItemGroup>

Microsoft.Azure.Cosmos.Encryption.Custom/tests/EmulatorTests/LegacyEncryptionTests.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,11 +308,14 @@ public async Task EncryptionCreateItem()
308308

309309
TestDoc expectedDoc = new TestDoc(testDoc);
310310

311+
#if SDKPROJECTREF
312+
// FIXME Remove the above once the binary encoding issue is fixed.
311313
// Read feed (null query)
312314
await LegacyEncryptionTests.ValidateQueryResultsAsync(
313315
LegacyEncryptionTests.encryptionContainer,
314316
query: null,
315317
expectedDoc);
318+
#endif
316319

317320
await LegacyEncryptionTests.ValidateQueryResultsAsync(
318321
LegacyEncryptionTests.encryptionContainer,

Microsoft.Azure.Cosmos.Encryption.Custom/tests/EmulatorTests/MdeCustomEncryptionTests.cs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -441,11 +441,14 @@ public async Task EncryptionCreateItem()
441441

442442
TestDoc expectedDoc = new TestDoc(testDoc);
443443

444+
#if SDKPROJECTREF
445+
// FIXME Remove the above once the binary encoding issue is fixed.
444446
// Read feed (null query)
445447
await MdeCustomEncryptionTests.ValidateQueryResultsAsync(
446448
MdeCustomEncryptionTests.encryptionContainer,
447449
query: null,
448450
expectedDoc);
451+
#endif
449452

450453
await MdeCustomEncryptionTests.ValidateQueryResultsAsync(
451454
MdeCustomEncryptionTests.encryptionContainer,
@@ -1043,7 +1046,7 @@ public async Task VerifyDekOperationWithSystemTextSerializer()
10431046
DefaultIgnoreCondition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull
10441047
};
10451048

1046-
CosmosSystemTextJsonSerializer cosmosSystemTextJsonSerializer = new CosmosSystemTextJsonSerializer(jsonSerializerOptions);
1049+
LegacyEncryptionTests.CosmosSystemTextJsonSerializer cosmosSystemTextJsonSerializer = new (jsonSerializerOptions);
10471050

10481051
CosmosClient clientWithCosmosSystemTextJsonSerializer = TestCommon.CreateCosmosClient(builder => builder
10491052
.WithCustomSerializer(cosmosSystemTextJsonSerializer)
@@ -2263,7 +2266,7 @@ public override async Task<byte[]> EncryptAsync(
22632266

22642267

22652268
#region Legacy
2266-
#pragma warning disable CS0618 // Type or member is obsolete
2269+
#pragma warning disable CS0618 // Type or member is obsolete
22672270
[TestMethod]
22682271
public async Task EncryptionCreateDekWithDualDekProvider()
22692272
{
@@ -2477,12 +2480,15 @@ public async Task ReadLegacyEncryptedDataWithMdeProcessor()
24772480

24782481
TestDoc expectedDoc = new TestDoc(testDoc);
24792482

2483+
#if SDKPROJECTREF
2484+
// FIXME Remove the above once the binary encoding issue is fixed.
24802485
// Read feed (null query)
24812486
await MdeCustomEncryptionTests.ValidateQueryResultsAsync(
24822487
MdeCustomEncryptionTests.encryptionContainer,
24832488
query: null,
24842489
expectedDoc,
24852490
legacyAlgo: true);
2491+
#endif
24862492

24872493
await MdeCustomEncryptionTests.ValidateQueryResultsAsync(
24882494
MdeCustomEncryptionTests.encryptionContainer,
@@ -2651,7 +2657,7 @@ public override Task<EncryptionKeyWrapResult> WrapKeyAsync(byte[] key, Encryptio
26512657
}
26522658
}
26532659

2654-
#pragma warning restore CS0618 // Type or member is obsolete
2655-
#endregion
2660+
#pragma warning restore CS0618 // Type or member is obsolete
2661+
#endregion
26562662
}
26572663
}

Microsoft.Azure.Cosmos.Encryption.Custom/tests/Microsoft.Azure.Cosmos.Encryption.Custom.Tests/CosmosEncryptorTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ await CosmosEncryptorTests.cosmosEncryptor.EncryptAsync(
5555
}
5656
catch (InvalidOperationException ex)
5757
{
58-
Assert.AreEqual("Null DataEncryptionKey returned from FetchDataEncryptionKeyAsync.", ex.Message);
58+
Assert.AreEqual("Null DataEncryptionKey returned from FetchDataEncryptionKeyWithoutRawKeyAsync.", ex.Message);
5959
}
6060
}
6161

Microsoft.Azure.Cosmos.Encryption/tests/EmulatorTests/MdeEncryptionTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -581,10 +581,12 @@ public async Task EncryptionCreateItemAndQuery()
581581

582582
TestDoc expectedDoc = new TestDoc(testDoc);
583583

584+
#if SDKPROJECTREF
584585
await MdeEncryptionTests.ValidateQueryResultsAsync(
585586
MdeEncryptionTests.encryptionContainer,
586587
query: null,
587588
expectedDocList: new List<TestDoc> { expectedDoc });
589+
#endif
588590

589591
expectedDoc = new TestDoc(testDoc);
590592
await MdeEncryptionTests.ValidateQueryResultsAsync(

Microsoft.Azure.Cosmos.Encryption/tests/EmulatorTests/Microsoft.Azure.Cosmos.Encryption.EmulatorTests.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,8 @@
6868
<PropertyGroup Condition=" '$(SdkProjectRef)' != 'True' AND '$(IsPreview)' == 'True' ">
6969
<DefineConstants>$(DefineConstants);ENCRYPTIONTESTPREVIEW</DefineConstants>
7070
</PropertyGroup>
71+
72+
<PropertyGroup Condition=" '$(SdkProjectRef)' == 'True'">
73+
<DefineConstants>$(DefineConstants);SDKPROJECTREF</DefineConstants>
74+
</PropertyGroup>
7175
</Project>

Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/BenchmarkConfig.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ public class BenchmarkConfig
141141
[Option(Required = false, HelpText = "Enable Client Telemetry Feature in SDK. Make sure you enable it from the portal also.")]
142142
public bool EnableTelemetry { get; set; } = false;
143143

144+
[Option(Required = false, HelpText = "List of comma separated preferred regions.")]
145+
public string ApplicationPreferredRegions { get; set; } = null;
146+
144147
internal int GetTaskCount(int containerThroughput)
145148
{
146149
int taskCount = this.DegreeOfParallelism;
@@ -224,9 +227,15 @@ internal Microsoft.Azure.Cosmos.CosmosClient CreateCosmosClient(string accountKe
224227
{
225228
DisableSendingMetricsToService = !this.EnableTelemetry,
226229
DisableDistributedTracing = !this.EnableDistributedTracing
227-
}
230+
},
228231
};
229232

233+
if (!string.IsNullOrEmpty(this.ApplicationPreferredRegions))
234+
{
235+
clientOptions.ApplicationPreferredRegions = this.ApplicationPreferredRegions.Split(',')
236+
.Select(region => region.Trim()).ToArray();
237+
}
238+
230239
if (!string.IsNullOrWhiteSpace(this.ConsistencyLevel))
231240
{
232241
clientOptions.ConsistencyLevel = (Microsoft.Azure.Cosmos.ConsistencyLevel)Enum.Parse(typeof(Microsoft.Azure.Cosmos.ConsistencyLevel), this.ConsistencyLevel, ignoreCase: true);

0 commit comments

Comments
 (0)