Skip to content

Commit

Permalink
Package Upgrade: Refactors code to upgrade DiagnosticSource Library f…
Browse files Browse the repository at this point in the history
…rom 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)
  • Loading branch information
sourabh1007 authored Oct 17, 2024
1 parent 05a9688 commit 57c681f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
<ItemGroup>
<PackageReference Include="Azure.Core" Version="1.19.0" />
<PackageReference Include="System.Collections.Immutable" Version="1.7.0" />
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="6.0.1" />
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="8.0.1" />
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="1.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="16.0.102" PrivateAssets="All" />
Expand All @@ -127,7 +127,7 @@
<PackageReference Include="System.Configuration.ConfigurationManager" Version="6.0.0" />

<!--HybridRow Dependencies-->
<PackageReference Include="System.Memory" Version="4.5.4" />
<PackageReference Include="System.Memory" Version="4.5.5" />
<PackageReference Include="System.Buffers" Version="4.5.1" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@

<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.5.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="3.1.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.2" />
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="6.7.1" />
<PackageReference Include="OpenTelemetry" Version="1.3.1" />
<PackageReference Include="OpenTelemetry" Version="1.9.0" />
<PackageReference Include="System.Reflection.Emit" Version="4.3.0" />
<PackageReference Include="System.Security.SecureString" Version="4.3.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="3.1.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) },
};
Expand Down Expand Up @@ -177,10 +177,10 @@ public void PackageDependenciesTest()
}
}

// Dependency version should match
// Dependency version should greater than minimum version defined
foreach (KeyValuePair<string, Version> 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);
Expand Down

0 comments on commit 57c681f

Please sign in to comment.