Skip to content

Commit 57c681f

Browse files
authored
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)
1 parent 05a9688 commit 57c681f

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
<ItemGroup>
115115
<PackageReference Include="Azure.Core" Version="1.19.0" />
116116
<PackageReference Include="System.Collections.Immutable" Version="1.7.0" />
117-
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="6.0.1" />
117+
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="8.0.1" />
118118
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" />
119119
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="1.0.0" />
120120
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="16.0.102" PrivateAssets="All" />
@@ -127,7 +127,7 @@
127127
<PackageReference Include="System.Configuration.ConfigurationManager" Version="6.0.0" />
128128

129129
<!--HybridRow Dependencies-->
130-
<PackageReference Include="System.Memory" Version="4.5.4" />
130+
<PackageReference Include="System.Memory" Version="4.5.5" />
131131
<PackageReference Include="System.Buffers" Version="4.5.1" />
132132
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
133133
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" />

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@
5252

5353
<ItemGroup>
5454
<PackageReference Include="Microsoft.CSharp" Version="4.5.0" />
55-
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="3.1.0" />
55+
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.2" />
5656
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="6.7.1" />
57-
<PackageReference Include="OpenTelemetry" Version="1.3.1" />
57+
<PackageReference Include="OpenTelemetry" Version="1.9.0" />
5858
<PackageReference Include="System.Reflection.Emit" Version="4.3.0" />
5959
<PackageReference Include="System.Security.SecureString" Version="4.3.0" />
6060
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="3.1.0" />

Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DirectContractTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,14 @@ public void ProjectPackageDependenciesTest()
121121
{ "Newtonsoft.Json", new Version(10, 0, 2) },
122122
{ "Microsoft.Bcl.AsyncInterfaces", new Version(1, 0, 0) },
123123
{ "System.Configuration.ConfigurationManager", new Version(6, 0, 0) },
124-
{ "System.Memory", new Version(4, 5, 4) },
124+
{ "System.Memory", new Version(4, 5, 5) },
125125
{ "System.Buffers", new Version(4, 5, 1) },
126126
{ "System.Runtime.CompilerServices.Unsafe", new Version(6, 0, 0) },
127127
{ "System.Threading.Tasks.Extensions", new Version(4, 5, 4) },
128128
{ "System.ValueTuple", new Version(4, 5, 0) },
129129
{ "Microsoft.Bcl.HashCode", new Version(1, 1, 0) },
130130
{ "Azure.Core", new Version(1, 19, 0) },
131-
{ "System.Diagnostics.DiagnosticSource", new Version(6, 0, 1) },
131+
{ "System.Diagnostics.DiagnosticSource", new Version(8, 0, 1) },
132132
{ "System.Net.Http", new Version(4, 3, 4) },
133133
{ "System.Text.RegularExpressions", new Version(4, 3, 1) },
134134
};
@@ -177,10 +177,10 @@ public void PackageDependenciesTest()
177177
}
178178
}
179179

180-
// Dependency version should match
180+
// Dependency version should greater than minimum version defined
181181
foreach (KeyValuePair<string, Version> e in allDependencies)
182182
{
183-
Assert.AreEqual(e.Value, projDependencies[e.Key], e.Key);
183+
Assert.IsTrue(e.Value.CompareTo(projDependencies[e.Key]) <= 0, e.Key);
184184
}
185185

186186
CollectionAssert.IsSubsetOf(allDependencies.Keys, projDependencies.Keys);

0 commit comments

Comments
 (0)