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

[repo] Bump SDK to 9.0.100 #2316

Merged
merged 17 commits into from
Nov 13, 2024

Conversation

xiang17
Copy link
Contributor

@xiang17 xiang17 commented Nov 12, 2024

Towards #2319.

Changes

  • Added .NET 9 SDK in CI for building projects while minimizing changes: target frameworks are not updated for any projects except for AOT compatibility test. Individual component owners can add support for .NET 9 SDK at their own pace.
  • Added support for .NET 9 in AOT compatibility test.
  • Updated docker compose to run integration tests for Kafka and StackExchangeRedis to build with .NET 9 SDK in Docker.
  • Set AnalysisLevel to 8.0 to minimize changes in this PR.

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: components are not upgraded. Only building with new SDK version.
  • [ ] Changes in public API reviewed (if applicable)

@github-actions github-actions bot added the infra Infra work - CI/CD, code coverage, linters label 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.04%. Comparing base (71655ce) to head (a283531).
Report is 593 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2316      +/-   ##
==========================================
- Coverage   73.91%   72.04%   -1.88%     
==========================================
  Files         267      359      +92     
  Lines        9615    13771    +4156     
==========================================
+ Hits         7107     9921    +2814     
- Misses       2508     3850    +1342     

see 379 files with indirect coverage changes

@@ -10,7 +10,7 @@
<NetMinimumSupportedVersion>net8.0</NetMinimumSupportedVersion>
<NetStandardMinimumSupportedVersion>netstandard2.0</NetStandardMinimumSupportedVersion>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AnalysisLevel>latest-all</AnalysisLevel>
<AnalysisLevel>8.0</AnalysisLevel>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

If I don't set the AnalysisLevel to 8.0, there will be tons of syntax suggestions showing as errors and failing build: #2313.

…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.
@github-actions github-actions bot added comp:instrumentation.confluentkafka Things related to OpenTelemetry.Instrumentation.ConfluentKafka comp:instrumentation.stackexchangeredis Things related to OpenTelemetry.Instrumentation.StackExchangeRedis labels Nov 12, 2024
…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.
@github-actions github-actions bot added the comp:exporter.geneva Things related to OpenTelemetry.Exporter.Geneva label Nov 12, 2024
@@ -50,8 +50,8 @@ public UnixUserEventsDataTransportTests(ITestOutputHelper testOutputHelper)
this.testOutputHelper = testOutputHelper;
}

[SkipUnlessPlatformMatchesFact(TestPlatform.Linux, requireElevatedProcess: true)]
public void UserEvents_Enabled_Succes_Linux()
[Fact(Skip = "This would fail on Ubuntu. Skipping for now.")]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These two tests are failing (only on Ubuntu) after upgrading to .NET 9. Disabling them for now to be inspected later.

Copy link
Contributor

Choose a reason for hiding this comment

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

Consider creating separate issue and link them in the code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Created #2326.

@xiang17 xiang17 marked this pull request as ready for review November 13, 2024 00:52
@xiang17 xiang17 requested a review from a team as a code owner November 13, 2024 00:52
@xiang17 xiang17 mentioned this pull request Nov 13, 2024
2 tasks
… stable version now.

docker run --rm mcr.microsoft.com/dotnet/sdk:9.0 dotnet --info
.NET SDK:
 Version:           9.0.100
 Commit:            59db016f11
 Workload version:  9.0.100-manifests.3068a692
 MSBuild version:   17.12.7+5b8665660

The image info is: `Digest: sha256:7d24e90a392e88eb56093e4eb325ff883ad609382a55d42f17fd557b997022ca`.

Earlier today, the version was rc.2:

 docker run --rm mcr.microsoft.com/dotnet/sdk:9.0@sha256:c6a6d7995042bc8905825c2f1e2f8717733e90738a09fb0d30f917596f4bcb10 dotnet --info
.NET SDK:
 Version:           9.0.100-rc.2.24474.11
 Commit:            315e1305db
 Workload version:  9.0.100-manifests.cea95dba
 MSBuild version:   17.12.0-preview-24473-03+fea15fbd1
@@ -50,8 +50,8 @@ public UnixUserEventsDataTransportTests(ITestOutputHelper testOutputHelper)
this.testOutputHelper = testOutputHelper;
}

[SkipUnlessPlatformMatchesFact(TestPlatform.Linux, requireElevatedProcess: true)]
public void UserEvents_Enabled_Succes_Linux()
[Fact(Skip = "This would fail on Ubuntu. Skipping for now.")]
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider creating separate issue and link them in the code.

@@ -104,8 +104,6 @@ jobs:
with:
project-name: Component[OpenTelemetry.Exporter.Geneva]
code-cov-name: Exporter.Geneva
os-list: '[ "ubuntu-24.04" ]' # Note: This may be switched to latest once ubuntu-latest has a kernel version >= 6.8.0-1014-azure
tfm-list: '[ "net8.0" ]' # Note: Should be able to remove this once the above is using ubuntu-latest
Copy link
Contributor

Choose a reason for hiding this comment

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

There is couple other occurrences of tfm-list which should be updated in this file (extended by net9.0)

Copy link
Member

Choose a reason for hiding this comment

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

I don't think we need to do that until projects actually have net9.0 targets added.

@Kielek Kielek self-requested a review November 13, 2024 03:21
@CodeBlanch CodeBlanch changed the title Build projects with .NET 9 SDK [repo] Bump SDK to 9.0.100 Nov 13, 2024
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.

LGTM

@Kielek Kielek merged commit b2c20e3 into open-telemetry:main Nov 13, 2024
136 checks passed
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.confluentkafka Things related to OpenTelemetry.Instrumentation.ConfluentKafka comp:instrumentation.stackexchangeredis Things related to OpenTelemetry.Instrumentation.StackExchangeRedis infra Infra work - CI/CD, code coverage, linters
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants