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

Add .NET 9 in tests for AspNetCore, Runtime and Process instrumentation libraries #2313

Open
wants to merge 25 commits into
base: main
Choose a base branch
from

Conversation

xiang17
Copy link
Contributor

@xiang17 xiang17 commented Nov 12, 2024

Depends on and merged commits from #2316. Please review that PR first.

Towards #2319.

Changes

Add .NET 9 target framework in tests for AspNetCore, Runtime and Process instrumentation libraries.

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: only updated tests.
  • [ ] Changes in public API reviewed (if applicable)

@github-actions github-actions bot added infra Infra work - CI/CD, code coverage, linters comp:instrumentation.aspnetcore Things related to OpenTelemetry.Instrumentation.AspNetCore comp:instrumentation.process Things related to OpenTelemetry.Instrumentation.Process comp:instrumentation.runtime Things related to OpenTelemetry.Instrumentation.Runtime labels Nov 12, 2024
Copy link

codecov bot commented Nov 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.02%. Comparing base (71655ce) to head (ecef58a).
Report is 595 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2313      +/-   ##
==========================================
- Coverage   73.91%   72.02%   -1.90%     
==========================================
  Files         267      359      +92     
  Lines        9615    13761    +4146     
==========================================
+ Hits         7107     9911    +2804     
- Misses       2508     3850    +1342     
Flag Coverage Δ
unittests-Exporter.InfluxDB 93.92% <ø> (?)

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

see 379 files with indirect coverage changes

@xiang17 xiang17 mentioned this pull request Nov 12, 2024
1 task
…ore.App.Ref with version (= 8.0.11)`. However 8.0.11 was released less than 20 min ago. Maybe the restore step had a delay and didn't get the new version yet?

D:\a\opentelemetry-dotnet-contrib\opentelemetry-dotnet-contrib\src\OpenTelemetry.Exporter.Geneva\OpenTelemetry.Exporter.Geneva.csproj : error NU1102: Unable to find package Microsoft.AspNetCore.App.Ref with version (= 8.0.11)
D:\a\opentelemetry-dotnet-contrib\opentelemetry-dotnet-contrib\src\OpenTelemetry.Exporter.Geneva\OpenTelemetry.Exporter.Geneva.csproj : error NU1102:   - Found 128 version(s) in NuGet [ Nearest version: 9.0.0-preview.1.24081.5 ]
D:\a\opentelemetry-dotnet-contrib\opentelemetry-dotnet-contrib\src\OpenTelemetry.Exporter.Geneva\OpenTelemetry.Exporter.Geneva.csproj : error NU1102:   - Found 0 version(s) in C:\Program Files\dotnet\library-packs
  Failed to restore D:\a\opentelemetry-dotnet-contrib\opentelemetry-dotnet-contrib\src\OpenTelemetry.Exporter.Geneva\OpenTelemetry.Exporter.Geneva.csproj (in 20.62 sec).
…uild-test-exporter-geneva-integration / build-test (ubuntu-24.04, net8.0) runs on Ubuntu 22.04.1 LTS. If not set, the version is newer. For example, build-test-exporter-influxdb / build-test (ubuntu-latest, net8.0) runs on Ubuntu 22.04.5 LTS.
…fail in GitHub CI for now, both for confluentkafka-integration and stackexchangeredis-integration. The current latest SDK in mcr.microsoft.com/dotnet/sdk:9.0 is 9.0.100-rc.2.24474.11, as shown in CI.

I'll revert global.json to use rc.2 for now.
… doesn't have net9.0 targets yet. I'll leave to the component owners to upgrade them.
…gured because the default list includes net462
Comment on lines 33 to 34
<SupportedNetTargetsWithNet9>net9.0;net8.0</SupportedNetTargetsWithNet9>
<SupportedNetTargets>net8.0</SupportedNetTargets>
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we just try to add to all packages by default? If it pass without issues, we could merge it. IMO it should be standard procedure on the repo-level instead of handling it one by one.

The only exception can occur when the tests are failing. Then we can create SupportedNetTargetsWithoutNet9 to handle is separately.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There were a lot of issues in this PR and I already split into another PR (#2316).

Can I keep this PR simple and do the follow up for other packages in another PR?

# Conflicts:
#	.github/workflows/verifyaotcompat.yml
#	test/OpenTelemetry.AotCompatibility.TestApp/OpenTelemetry.AotCompatibility.TestApp.csproj
@github-actions github-actions bot removed comp:instrumentation.stackexchangeredis Things related to OpenTelemetry.Instrumentation.StackExchangeRedis comp:instrumentation.confluentkafka Things related to OpenTelemetry.Instrumentation.ConfluentKafka labels Nov 13, 2024
@rajkumar-rangaraj
Copy link
Contributor

Could you please update the changelog's to state .NET 9.0 was added.

@xiang17
Copy link
Contributor Author

xiang17 commented Nov 13, 2024

Could you please update the changelog's to state .NET 9.0 was added.

I wanted to but realized all CHANGELOG.md files are in src folder. And this PR only happens for test projects (all under test folder except one in build/Common.nonprod.props) and in CI.

I could still add an entry in all involved projects but technically they have no changes (because their target framework is NetMinimumSupportedVersion instead of a list of all supported versions).

@rajkumar-rangaraj
Copy link
Contributor

I wanted to but realized all CHANGELOG.md files are in src folder.

I think the plan is to add net9.0 targets to AspNetCore, Runtime and Process instrumentation libraries projects. Are you planning to cover in new PR?

@github-actions github-actions bot added documentation Improvements or additions to documentation comp:instrumentation.grpccore Things related to OpenTelemetry.Instrumentation.GrpcCore labels Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:exporter.geneva Things related to OpenTelemetry.Exporter.Geneva comp:instrumentation.aspnetcore Things related to OpenTelemetry.Instrumentation.AspNetCore comp:instrumentation.grpccore Things related to OpenTelemetry.Instrumentation.GrpcCore comp:instrumentation.process Things related to OpenTelemetry.Instrumentation.Process comp:instrumentation.runtime Things related to OpenTelemetry.Instrumentation.Runtime documentation Improvements or additions to documentation infra Infra work - CI/CD, code coverage, linters perf Performance related
Projects
None yet
Development

Successfully merging this pull request may close these issues.