From 57c681f27a6120dce7f5eb575dc61deb6cdb1e77 Mon Sep 17 00:00:00 2001 From: Sourabh Jain Date: Thu, 17 Oct 2024 21:55:39 +0530 Subject: [PATCH] Package Upgrade: Refactors code to upgrade DiagnosticSource Library from 6.0.1 to 8.0.1 (#4810) ## Description ### Why Upgrade? The new `DiagnosticSource` library includes additional Meter API features that we plan to utilize moving forward. ### Is this a Breaking Change? No, this upgrade is not expected to cause breaking changes. After reviewing this [documentation](https://learn.microsoft.com/en-us/dotnet/core/compatibility/core-libraries/8.0/parameterinfo-hasdefaultvalue), no issues related to `DiagnosticSource` or `ActivitySource` were found. ### Potential Impact on Existing Customers? Upon upgrading to this version, customers may need to update some dependencies that rely on the older version of the `DiagnosticSource` library. ## Type of change - [] New feature (non-breaking change which adds functionality) --- Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj | 4 ++-- .../Microsoft.Azure.Cosmos.EmulatorTests.csproj | 4 ++-- .../Contracts/DirectContractTests.cs | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj b/Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj index bfe90ace04..55b2fba26a 100644 --- a/Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj +++ b/Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj @@ -114,7 +114,7 @@ - + @@ -127,7 +127,7 @@ - + diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Microsoft.Azure.Cosmos.EmulatorTests.csproj b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Microsoft.Azure.Cosmos.EmulatorTests.csproj index f0a6ea6ada..adda626bdd 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Microsoft.Azure.Cosmos.EmulatorTests.csproj +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Microsoft.Azure.Cosmos.EmulatorTests.csproj @@ -52,9 +52,9 @@ - + - + diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DirectContractTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DirectContractTests.cs index fbec19c2cd..e5e8901788 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DirectContractTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DirectContractTests.cs @@ -121,14 +121,14 @@ public void ProjectPackageDependenciesTest() { "Newtonsoft.Json", new Version(10, 0, 2) }, { "Microsoft.Bcl.AsyncInterfaces", new Version(1, 0, 0) }, { "System.Configuration.ConfigurationManager", new Version(6, 0, 0) }, - { "System.Memory", new Version(4, 5, 4) }, + { "System.Memory", new Version(4, 5, 5) }, { "System.Buffers", new Version(4, 5, 1) }, { "System.Runtime.CompilerServices.Unsafe", new Version(6, 0, 0) }, { "System.Threading.Tasks.Extensions", new Version(4, 5, 4) }, { "System.ValueTuple", new Version(4, 5, 0) }, { "Microsoft.Bcl.HashCode", new Version(1, 1, 0) }, { "Azure.Core", new Version(1, 19, 0) }, - { "System.Diagnostics.DiagnosticSource", new Version(6, 0, 1) }, + { "System.Diagnostics.DiagnosticSource", new Version(8, 0, 1) }, { "System.Net.Http", new Version(4, 3, 4) }, { "System.Text.RegularExpressions", new Version(4, 3, 1) }, }; @@ -177,10 +177,10 @@ public void PackageDependenciesTest() } } - // Dependency version should match + // Dependency version should greater than minimum version defined foreach (KeyValuePair e in allDependencies) { - Assert.AreEqual(e.Value, projDependencies[e.Key], e.Key); + Assert.IsTrue(e.Value.CompareTo(projDependencies[e.Key]) <= 0, e.Key); } CollectionAssert.IsSubsetOf(allDependencies.Keys, projDependencies.Keys);