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

[Instrumentation.WCF] Switch .NET6 to .NET8 #2263

Merged
merged 3 commits into from
Oct 30, 2024

Conversation

Kielek
Copy link
Contributor

@Kielek Kielek commented Oct 29, 2024

Follow up to #2243

Changes

[Instrumentation.WCF] Switch .NET6 to .NET8

Merge requirement checklist

  • CONTRIBUTING guidelines followed (license requirements, nullable enabled, static analysis, etc.)
  • Unit tests added/updated
  • Appropriate CHANGELOG.md files updated for non-trivial changes
  • [ ] Changes in public API reviewed (if applicable)

@Kielek Kielek requested a review from a team as a code owner October 29, 2024 04:48
@github-actions github-actions bot requested a review from CodeBlanch October 29, 2024 04:48
@github-actions github-actions bot added the comp:instrumentation.wcf Things related to OpenTelemetry.Instrumentation.Wcf label Oct 29, 2024
Copy link

codecov bot commented Oct 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.34%. Comparing base (71655ce) to head (4595337).
Report is 563 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2263      +/-   ##
==========================================
+ Coverage   73.91%   78.34%   +4.43%     
==========================================
  Files         267       29     -238     
  Lines        9615      702    -8913     
==========================================
- Hits         7107      550    -6557     
+ Misses       2508      152    -2356     
Flag Coverage Δ
unittests-Instrumentation.Wcf 78.34% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 269 files with indirect coverage changes

@@ -23,10 +23,10 @@
<Reference Include="System.ServiceModel" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == '$(NetStandardMinimumSupportedVersion)' OR '$(TargetFramework)' == 'net6.0' " >
<ItemGroup Condition="'$(TargetFramework)' == '$(NetStandardMinimumSupportedVersion)' OR '$(TargetFramework)' == '$(NetMinimumSupportedVersion)' " >
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would switch this to detect .NETCoreApp so it doesn't need adjustment if some other target (eg $(NetMinimumSupportedVersion);net9.0) is added.

  <ItemGroup Condition="'$(TargetFramework)' == '$(NetStandardMinimumSupportedVersion)' OR '$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
    <PackageReference Include="System.Security.Cryptography.Xml" Version="4.7.1" />
    <PackageReference Include="System.ServiceModel.Primitives" Version="4.7.0" />
    <PackageReference Include="System.Drawing.Common" Version="4.7.2" Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'" />
  </ItemGroup>

But also consider bumping to 8.0.0 versions for net8.0+:

  <ItemGroup Condition="'$(TargetFramework)' == '$(NetStandardMinimumSupportedVersion)'">
    <PackageReference Include="System.ServiceModel.Primitives" Version="4.7.0" />

    <!-- System.Security.Cryptography.Xml is indirect reference. It is needed to upgrade it directly to avoid https://github.com/advisories/GHSA-rxg9-xrhp-64gj -->
    <PackageReference Include="System.Security.Cryptography.Xml" Version="4.7.1" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
    <PackageReference Include="System.ServiceModel.Primitives" Version="8.0.0" />

    <!-- System.Security.Cryptography.Xml is indirect reference. It is needed to upgrade it directly to avoid https://github.com/advisories/GHSA-555c-2p6r-68mm -->
    <PackageReference Include="System.Security.Cryptography.Xml" Version="8.0.2" />
  </ItemGroup>

The 8.0.0 versions don't bring in System.Drawing.Common at all. The current form will force System.Drawing.Common onto users who may have already bumped to 8.0.0 to eliminate it 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First part done. Second deferred to #2274

Copy link
Member

@CodeBlanch CodeBlanch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some feedback, but LGTM

@github-actions github-actions bot requested a review from CodeBlanch October 30, 2024 08:53
@Kielek Kielek merged commit 2ca95ad into open-telemetry:main Oct 30, 2024
55 checks passed
@Kielek Kielek deleted the wcf-net8 branch October 30, 2024 09:33
Kielek added a commit to Kielek/opentelemetry-dotnet-contrib that referenced this pull request Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:instrumentation.wcf Things related to OpenTelemetry.Instrumentation.Wcf
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants