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] Direct Package: Adds Support for Direct package version 3.33.0 #4353

Merged
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
c9c11db
upgraded direct package version
NaluTripician Mar 15, 2024
a3cb13c
Merge branch 'master' into users/nalutripician/directUpgrade3.33.0
NaluTripician Mar 15, 2024
c57695f
Merge branch 'master' into users/nalutripician/directUpgrade3.33.0
NaluTripician Mar 21, 2024
dc30caa
Merge branch 'master' into users/nalutripician/directUpgrade3.33.0
NaluTripician Mar 22, 2024
57a5aa1
Merge branch 'master' into users/nalutripician/directUpgrade3.33.0
sourabh1007 Mar 23, 2024
e3b5f58
added Taiwan regions
NaluTripician Mar 25, 2024
479228a
update contracts
NaluTripician Mar 25, 2024
48c599b
fix contracts
NaluTripician Mar 25, 2024
448c8aa
fixed more contracts
NaluTripician Mar 25, 2024
13e17f5
contracts change
NaluTripician Mar 25, 2024
a7dcf87
Merge branch 'master' into users/nalutripician/directUpgrade3.33.0
NaluTripician Mar 25, 2024
9dc0151
contract change remove
NaluTripician Mar 25, 2024
d716acb
changed baseline files
NaluTripician Mar 27, 2024
114bb2d
Merge branch 'master' into users/nalutripician/directUpgrade3.33.0
NaluTripician Mar 27, 2024
b760211
Merge branch 'master' into users/nalutripician/directUpgrade3.33.0
NaluTripician Apr 1, 2024
8ab6bd8
Merge branch 'master' into users/nalutripician/directUpgrade3.33.0
NaluTripician Apr 1, 2024
56e9869
Merge branch 'master' into users/nalutripician/directUpgrade3.33.0
NaluTripician Apr 1, 2024
4f28f00
Merge branch 'master' into users/nalutripician/directUpgrade3.33.0
NaluTripician Apr 2, 2024
fd5f550
added space
NaluTripician Apr 2, 2024
ae34c03
added region name check test for future verification
NaluTripician Apr 2, 2024
8c8a7fa
Merge branch 'master' into users/nalutripician/directUpgrade3.33.0
NaluTripician Apr 2, 2024
22eafec
nits
NaluTripician Apr 3, 2024
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
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<ClientOfficialVersion>3.38.1</ClientOfficialVersion>
<ClientPreviewVersion>3.39.0</ClientPreviewVersion>
<ClientPreviewSuffixVersion>preview.1</ClientPreviewSuffixVersion>
<DirectVersion>3.32.1</DirectVersion>
<DirectVersion>3.33.0</DirectVersion>
<EncryptionOfficialVersion>2.0.4</EncryptionOfficialVersion>
<EncryptionPreviewVersion>2.1.0</EncryptionPreviewVersion>
<EncryptionPreviewSuffixVersion>preview4</EncryptionPreviewSuffixVersion>
Expand Down
10 changes: 10 additions & 0 deletions Microsoft.Azure.Cosmos/src/Regions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -374,5 +374,15 @@ public static class Regions
/// Name of the Azure Spain Central region in the Azure Cosmos DB service.
/// </summary>
public const string SpainCentral = "Spain Central";

/// <summary>
/// Name of the Azure Taiwan North region in the Azure Cosmos DB service.
/// </summary>
public const string TaiwanNorth = "Taiwan North";

/// <summary>
/// Name of the Azure Taiwan Northwest region in the Azure Cosmos DB service.
/// </summary>
public const string TaiwanNorthwest = "Taiwan Northwest";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -311,14 +311,6 @@ GROUP BY c.age, c.name]]></RewrittenQuery>
<OrderByExpressions />
<Aggregates />
<GroupByAliasToAggregateType>
<AliasToAggregateType>
<Alias>min_age</Alias>
<AggregateOperator>Min</AggregateOperator>
</AliasToAggregateType>
<AliasToAggregateType>
<Alias>max_age</Alias>
<AggregateOperator>Max</AggregateOperator>
</AliasToAggregateType>
<AliasToAggregateType>
<Alias>count</Alias>
<AggregateOperator>Count</AggregateOperator>
Expand All @@ -331,6 +323,14 @@ GROUP BY c.age, c.name]]></RewrittenQuery>
<Alias>team</Alias>
<AggregateOperator>null</AggregateOperator>
</AliasToAggregateType>
<AliasToAggregateType>
<Alias>min_age</Alias>
<AggregateOperator>Min</AggregateOperator>
</AliasToAggregateType>
<AliasToAggregateType>
<Alias>max_age</Alias>
<AggregateOperator>Max</AggregateOperator>
</AliasToAggregateType>
<AliasToAggregateType>
<Alias>avg_age</Alias>
<AggregateOperator>Average</AggregateOperator>
Expand Down Expand Up @@ -504,10 +504,6 @@ GROUP BY UPPER(c.name), SUBSTRING(c.address.city, 0, 3)]]></RewrittenQuery>
<OrderByExpressions />
<Aggregates />
<GroupByAliasToAggregateType>
<AliasToAggregateType>
ealsur marked this conversation as resolved.
Show resolved Hide resolved
<Alias>group_name</Alias>
<AggregateOperator>null</AggregateOperator>
</AliasToAggregateType>
<AliasToAggregateType>
<Alias>count</Alias>
<AggregateOperator>Count</AggregateOperator>
Expand All @@ -516,6 +512,10 @@ GROUP BY UPPER(c.name), SUBSTRING(c.address.city, 0, 3)]]></RewrittenQuery>
<Alias>info</Alias>
<AggregateOperator>null</AggregateOperator>
</AliasToAggregateType>
<AliasToAggregateType>
<Alias>group_name</Alias>
<AggregateOperator>null</AggregateOperator>
</AliasToAggregateType>
</GroupByAliasToAggregateType>
<GroupByAliases>
<Alias>info</Alias>
Expand Down Expand Up @@ -718,17 +718,13 @@ GROUP BY c.name]]></RewrittenQuery>
<Aggregates />
<GroupByAliasToAggregateType>
<AliasToAggregateType>
<Alias>max_age</Alias>
<AggregateOperator>Max</AggregateOperator>
<Alias>count</Alias>
<AggregateOperator>Count</AggregateOperator>
</AliasToAggregateType>
<AliasToAggregateType>
<Alias>name</Alias>
<AggregateOperator>null</AggregateOperator>
</AliasToAggregateType>
<AliasToAggregateType>
<Alias>count</Alias>
<AggregateOperator>Count</AggregateOperator>
</AliasToAggregateType>
<AliasToAggregateType>
<Alias>$1</Alias>
<AggregateOperator>Min</AggregateOperator>
Expand All @@ -741,6 +737,10 @@ GROUP BY c.name]]></RewrittenQuery>
<Alias>$2</Alias>
<AggregateOperator>Max</AggregateOperator>
</AliasToAggregateType>
<AliasToAggregateType>
<Alias>max_age</Alias>
<AggregateOperator>Max</AggregateOperator>
</AliasToAggregateType>
<AliasToAggregateType>
<Alias>avg_age</Alias>
<AggregateOperator>Average</AggregateOperator>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -509,11 +509,11 @@ FROM c]]></RewrittenQuery>
<Aggregates />
<GroupByAliasToAggregateType>
<AliasToAggregateType>
<Alias>min_blah2</Alias>
<Alias>min_blah</Alias>
<AggregateOperator>Min</AggregateOperator>
</AliasToAggregateType>
<AliasToAggregateType>
<Alias>min_blah</Alias>
<Alias>min_blah2</Alias>
<AggregateOperator>Min</AggregateOperator>
</AliasToAggregateType>
</GroupByAliasToAggregateType>
Expand Down Expand Up @@ -557,11 +557,11 @@ FROM c]]></RewrittenQuery>
<Aggregates />
<GroupByAliasToAggregateType>
<AliasToAggregateType>
<Alias>max_blah</Alias>
<Alias>max_blah2</Alias>
<AggregateOperator>Max</AggregateOperator>
</AliasToAggregateType>
<AliasToAggregateType>
<Alias>max_blah2</Alias>
<Alias>max_blah</Alias>
<AggregateOperator>Max</AggregateOperator>
</AliasToAggregateType>
</GroupByAliasToAggregateType>
Expand Down Expand Up @@ -605,11 +605,11 @@ FROM c]]></RewrittenQuery>
<Aggregates />
<GroupByAliasToAggregateType>
<AliasToAggregateType>
<Alias>avg_blah2</Alias>
<Alias>avg_blah</Alias>
<AggregateOperator>Average</AggregateOperator>
</AliasToAggregateType>
<AliasToAggregateType>
<Alias>avg_blah</Alias>
<Alias>avg_blah2</Alias>
<AggregateOperator>Average</AggregateOperator>
</AliasToAggregateType>
</GroupByAliasToAggregateType>
Expand Down Expand Up @@ -989,11 +989,11 @@ FROM c]]></RewrittenQuery>
<Aggregates />
<GroupByAliasToAggregateType>
<AliasToAggregateType>
<Alias>$1</Alias>
<Alias>count_blah</Alias>
<AggregateOperator>Count</AggregateOperator>
</AliasToAggregateType>
<AliasToAggregateType>
<Alias>count_blah</Alias>
<Alias>$1</Alias>
<AggregateOperator>Count</AggregateOperator>
</AliasToAggregateType>
</GroupByAliasToAggregateType>
Expand Down Expand Up @@ -1181,11 +1181,11 @@ FROM c]]></RewrittenQuery>
<Aggregates />
<GroupByAliasToAggregateType>
<AliasToAggregateType>
<Alias>max_blah</Alias>
<Alias>$1</Alias>
<AggregateOperator>Max</AggregateOperator>
</AliasToAggregateType>
<AliasToAggregateType>
<Alias>$1</Alias>
<Alias>max_blah</Alias>
<AggregateOperator>Max</AggregateOperator>
</AliasToAggregateType>
</GroupByAliasToAggregateType>
Expand Down Expand Up @@ -1229,11 +1229,11 @@ FROM c]]></RewrittenQuery>
<Aggregates />
<GroupByAliasToAggregateType>
<AliasToAggregateType>
<Alias>max_blah</Alias>
<Alias>$1</Alias>
<AggregateOperator>Max</AggregateOperator>
</AliasToAggregateType>
<AliasToAggregateType>
<Alias>$1</Alias>
<Alias>max_blah</Alias>
<AggregateOperator>Max</AggregateOperator>
</AliasToAggregateType>
</GroupByAliasToAggregateType>
Expand Down Expand Up @@ -1428,15 +1428,15 @@ FROM c]]></RewrittenQuery>
<Aggregates />
<GroupByAliasToAggregateType>
<AliasToAggregateType>
<Alias>$1</Alias>
<Alias>count_blah</Alias>
<AggregateOperator>Count</AggregateOperator>
</AliasToAggregateType>
<AliasToAggregateType>
<Alias>count_blah</Alias>
<Alias>count_blah2</Alias>
<AggregateOperator>Count</AggregateOperator>
</AliasToAggregateType>
<AliasToAggregateType>
<Alias>count_blah2</Alias>
<Alias>$1</Alias>
<AggregateOperator>Count</AggregateOperator>
</AliasToAggregateType>
</GroupByAliasToAggregateType>
Expand Down Expand Up @@ -1486,11 +1486,11 @@ FROM c]]></RewrittenQuery>
<AggregateOperator>Min</AggregateOperator>
</AliasToAggregateType>
<AliasToAggregateType>
<Alias>min_blah2</Alias>
<Alias>min_blah</Alias>
<AggregateOperator>Min</AggregateOperator>
</AliasToAggregateType>
<AliasToAggregateType>
<Alias>min_blah</Alias>
<Alias>min_blah2</Alias>
<AggregateOperator>Min</AggregateOperator>
</AliasToAggregateType>
</GroupByAliasToAggregateType>
Expand Down Expand Up @@ -1536,15 +1536,15 @@ FROM c]]></RewrittenQuery>
<Aggregates />
<GroupByAliasToAggregateType>
<AliasToAggregateType>
<Alias>max_blah</Alias>
<Alias>$1</Alias>
<AggregateOperator>Max</AggregateOperator>
</AliasToAggregateType>
<AliasToAggregateType>
<Alias>max_blah2</Alias>
<AggregateOperator>Max</AggregateOperator>
</AliasToAggregateType>
<AliasToAggregateType>
<Alias>$1</Alias>
<Alias>max_blah</Alias>
<AggregateOperator>Max</AggregateOperator>
</AliasToAggregateType>
</GroupByAliasToAggregateType>
Expand Down Expand Up @@ -1594,11 +1594,11 @@ FROM c]]></RewrittenQuery>
<AggregateOperator>Average</AggregateOperator>
</AliasToAggregateType>
<AliasToAggregateType>
<Alias>avg_blah2</Alias>
<Alias>avg_blah</Alias>
<AggregateOperator>Average</AggregateOperator>
</AliasToAggregateType>
<AliasToAggregateType>
<Alias>avg_blah</Alias>
<Alias>avg_blah2</Alias>
<AggregateOperator>Average</AggregateOperator>
</AliasToAggregateType>
</GroupByAliasToAggregateType>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace Microsoft.Azure.Cosmos.Contracts
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
NaluTripician marked this conversation as resolved.
Show resolved Hide resolved
using System.IO;
using System.Linq;
using System.Reflection;
Expand Down Expand Up @@ -81,6 +82,25 @@ public void MappedRegionsTest()
CollectionAssert.AreEquivalent(locationNames, cosmosRegions);
}

[TestMethod]
public void RegionValueCheck()
{
string[] cosmosRegions = typeof(Regions)
.GetMembers(BindingFlags.Static | BindingFlags.Public)
.Select(e => e.Name)
.ToArray();
foreach (string region in cosmosRegions)
{
string locationNameValue = typeof(LocationNames).GetField(region).GetValue(null).ToString();
string regionNameValue = typeof(Regions).GetField(region).GetValue(null).ToString();
Assert.IsTrue(locationNameValue == regionNameValue);
NaluTripician marked this conversation as resolved.
Show resolved Hide resolved
}
string[] locationNames = typeof(LocationNames)
NaluTripician marked this conversation as resolved.
Show resolved Hide resolved
.GetMembers(BindingFlags.Static | BindingFlags.Public)
.Select(e => e.Name)
.ToArray();
}

[TestMethod]
public void RMContractTest()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7100,6 +7100,16 @@
"Attributes": [],
"MethodInfo": "System.String SwitzerlandWest;IsInitOnly:False;IsStatic:True;"
},
"System.String TaiwanNorth": {
"Type": "Field",
"Attributes": [],
"MethodInfo": "System.String TaiwanNorth;IsInitOnly:False;IsStatic:True;"
},
"System.String TaiwanNorthwest": {
"Type": "Field",
"Attributes": [],
"MethodInfo": "System.String TaiwanNorthwest;IsInitOnly:False;IsStatic:True;"
},
"System.String UAECentral": {
"Type": "Field",
"Attributes": [],
Expand Down
Loading