Skip to content

Commit 55d2d3a

Browse files
authored
Release: Adds commits for 3.32.2 hotfix release (#3758)
Cherry pick of commits into release branch
1 parent e96e96f commit 55d2d3a

15 files changed

+3082
-297
lines changed

Directory.Build.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
22
<PropertyGroup>
3-
<ClientOfficialVersion>3.32.1</ClientOfficialVersion>
4-
<ClientPreviewVersion>3.32.1</ClientPreviewVersion>
3+
<ClientOfficialVersion>3.32.2</ClientOfficialVersion>
4+
<ClientPreviewVersion>3.32.2</ClientPreviewVersion>
55
<ClientPreviewSuffixVersion>preview</ClientPreviewSuffixVersion>
6-
<DirectVersion>3.30.1</DirectVersion>
6+
<DirectVersion>3.30.2</DirectVersion>
77
<EncryptionOfficialVersion>2.0.1</EncryptionOfficialVersion>
88
<EncryptionPreviewVersion>2.0.1</EncryptionPreviewVersion>
99
<EncryptionPreviewSuffixVersion>preview</EncryptionPreviewSuffixVersion>

Microsoft.Azure.Cosmos/contracts/API_3.32.2-preview.txt

Lines changed: 1531 additions & 0 deletions
Large diffs are not rendered by default.

Microsoft.Azure.Cosmos/contracts/API_3.32.2.txt

Lines changed: 1478 additions & 0 deletions
Large diffs are not rendered by default.

Microsoft.Azure.Cosmos/src/Linq/ExpressionToSQL.cs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ namespace Microsoft.Azure.Cosmos.Linq
1010
using System.Collections.ObjectModel;
1111
using System.Diagnostics;
1212
using System.Globalization;
13-
using System.IO;
1413
using System.Linq;
1514
using System.Linq.Expressions;
1615
using System.Reflection;
@@ -713,22 +712,6 @@ public static SqlScalarExpression VisitConstant(ConstantExpression inputExpressi
713712
return SqlArrayCreateScalarExpression.Create(arrayItems.ToImmutableArray());
714713
}
715714

716-
if (context.linqSerializerOptions?.CustomCosmosSerializer != null)
717-
{
718-
StringWriter writer = new StringWriter(CultureInfo.InvariantCulture);
719-
720-
// Use the user serializer for the parameter values so custom conversions are correctly handled
721-
using (Stream stream = context.linqSerializerOptions.CustomCosmosSerializer.ToStream(inputExpression.Value))
722-
{
723-
using (StreamReader streamReader = new StreamReader(stream))
724-
{
725-
string propertyValue = streamReader.ReadToEnd();
726-
writer.Write(propertyValue);
727-
return CosmosElement.Parse(writer.ToString()).Accept(CosmosElementToSqlScalarExpressionVisitor.Singleton);
728-
}
729-
}
730-
}
731-
732715
return CosmosElement.Parse(JsonConvert.SerializeObject(inputExpression.Value)).Accept(CosmosElementToSqlScalarExpressionVisitor.Singleton);
733716
}
734717

Microsoft.Azure.Cosmos/src/Resource/Container/ContainerCore.Items.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -505,14 +505,11 @@ public override IOrderedQueryable<T> GetItemLinqQueryable<T>(
505505
{
506506
requestOptions ??= new QueryRequestOptions();
507507

508-
if (linqSerializerOptions == null && this.ClientContext.ClientOptions != null)
508+
if (linqSerializerOptions == null && this.ClientContext.ClientOptions.SerializerOptions != null)
509509
{
510510
linqSerializerOptions = new CosmosLinqSerializerOptions
511511
{
512-
PropertyNamingPolicy = this.ClientContext.ClientOptions.SerializerOptions != null
513-
? this.ClientContext.ClientOptions.SerializerOptions.PropertyNamingPolicy
514-
: CosmosPropertyNamingPolicy.Default,
515-
CustomCosmosSerializer = this.ClientContext.ClientOptions.Serializer
512+
PropertyNamingPolicy = this.ClientContext.ClientOptions.SerializerOptions.PropertyNamingPolicy
516513
};
517514
}
518515

Microsoft.Azure.Cosmos/src/Serializer/CosmosLinqSerializerOptions.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,6 @@ public CosmosLinqSerializerOptions()
2222
this.PropertyNamingPolicy = CosmosPropertyNamingPolicy.Default;
2323
}
2424

25-
/// <summary>
26-
/// Gets or sets the user defined customer serializer. If no customer serializer was defined,
27-
/// then the value is set to the default value
28-
/// </summary>
29-
/// <remarks>
30-
/// The default value is null
31-
/// </remarks>
32-
internal CosmosSerializer CustomCosmosSerializer { get; set; }
33-
3425
/// <summary>
3526
/// Gets or sets whether the naming policy used to convert a string-based name to another format,
3627
/// such as a camel-casing format.

Microsoft.Azure.Cosmos/src/ValidationHelpers.cs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ public static bool IsValidConsistencyLevelOverwrite(
5555
{
5656
if (isLocalQuorumConsistency &&
5757
ValidationHelpers.IsLocalQuorumConsistency(
58-
backendConsistency: backendConsistency,
5958
desiredConsistency: desiredConsistency,
6059
operationType: operationType,
6160
resourceType: resourceType))
@@ -109,21 +108,15 @@ private static bool IsValidConsistencyLevelOverwrite(
109108
/// <summary>
110109
/// Condition to check Quorum(i.e. Strong) read with either an eventual consistency account or a consistent prefix account.
111110
/// </summary>
112-
/// <param name="backendConsistency"></param>
113111
/// <param name="desiredConsistency"></param>
114112
/// <param name="operationType"></param>
115113
/// <param name="resourceType"></param>
116114
/// <returns>true/false</returns>
117-
private static bool IsLocalQuorumConsistency(Documents.ConsistencyLevel backendConsistency,
115+
private static bool IsLocalQuorumConsistency(
118116
Documents.ConsistencyLevel desiredConsistency,
119117
OperationType? operationType,
120118
ResourceType? resourceType)
121119
{
122-
if (backendConsistency != Documents.ConsistencyLevel.Eventual && backendConsistency != Documents.ConsistencyLevel.ConsistentPrefix)
123-
{
124-
return false;
125-
}
126-
127120
if (desiredConsistency != Documents.ConsistencyLevel.Strong)
128121
{
129122
return false;

Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/LinqTranslationBaselineTests.TestLiteralSerialization.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ FROM root]]></SqlQuery>
435435
</Input>
436436
<Output>
437437
<SqlQuery><![CDATA[
438-
SELECT VALUE {}
438+
SELECT VALUE {"value": null}
439439
FROM root]]></SqlQuery>
440440
</Output>
441441
</Result>

Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/LinqTranslationWithCustomSerializerBaseline.TestMemberInitializer.xml

Lines changed: 0 additions & 48 deletions
This file was deleted.

Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqTestsCommon.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,9 @@ Family createDataObj(Random random)
455455
return getQuery;
456456
}
457457

458-
public static Func<bool, IQueryable<Data>> GenerateSimpleCosmosData(Cosmos.Database cosmosDatabase)
458+
public static Func<bool, IQueryable<Data>> GenerateSimpleCosmosData(
459+
Cosmos.Database cosmosDatabase
460+
)
459461
{
460462
const int DocumentCount = 10;
461463
PartitionKeyDefinition partitionKeyDefinition = new PartitionKeyDefinition { Paths = new System.Collections.ObjectModel.Collection<string>(new[] { "/Pk" }), Kind = PartitionKind.Hash };

0 commit comments

Comments
 (0)