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

⚗️ gha seems to have problems with .net9rc1 #79

Closed
wants to merge 3 commits into from

Conversation

gimlichael
Copy link
Owner

@gimlichael gimlichael commented Sep 12, 2024

PR Classification

Update to .NET installation process in CI pipeline.

PR Summary

Updated the .NET installation step to use a newer action and specified versions.

  • .github/workflows/ci.yml: Replaced codebeltnet/install-dotnet@v1 with actions/setup-dotnet@v4.
  • .github/workflows/ci.yml: Added installation of .NET versions 6.0.x, 8.0.x, and conditional preview version 9.0.100-preview.7.24407.12.
  • .github/workflows/ci.yml: Set dotnet-quality parameter to preview for the preview version.

Problem discovered for:

  • Cuemon.AspNetCore.Mvc.FunctionalTests
  • Cuemon.AspNetCore.Mvc.Tests

Summary by CodeRabbit

  • New Features

    • Enhanced workflow flexibility by allowing installation of specific .NET versions, including a preview version based on user input.
  • Bug Fixes

    • Improved compatibility and testing capabilities with updated installation methods for .NET.
    • Updated various package references to preview versions, potentially introducing new features and bug fixes.

- Cuemon.AspNetCore.Mvc.Tests
- Cuemon.AspNetCore.Mvc.FunctionalTests

Try to use preview7
Copy link

coderabbitai bot commented Sep 12, 2024

Walkthrough

The changes involve a comprehensive update to the GitHub Actions workflow for .NET installation, transitioning from codebeltnet/install-dotnet@v1 to actions/setup-dotnet@v4. This update enables the installation of multiple .NET versions (6.0.x, 8.0.x, and a specific preview version) and modifies several project files to reference newer preview versions of various packages, enhancing compatibility and testing capabilities.

Changes

File Change Summary
.github/workflows/pipelines.yml Updated .NET installation steps: commented out old method, added new method for multiple versions, and introduced conditional installation for preview version based on includePreview.
src/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json/*.csproj Updated Microsoft.AspNetCore.Mvc.NewtonsoftJson package from 9.0.0-rc.1.24452.1 to 9.0.0-preview.7.24406.2.
src/Cuemon.Extensions.DependencyInjection/*.csproj Updated Microsoft.Extensions.DependencyInjection and Microsoft.Extensions.Options.ConfigurationExtensions packages from 9.0.0-rc.1.24431.7 to 9.0.0-preview.7.24405.7.
src/Cuemon.Extensions.Hosting/*.csproj Updated Microsoft.Extensions.Hosting package from 9.0.0-rc.1.24431.7 to 9.0.0-preview.7.24405.7.
src/Cuemon.Extensions.Net/*.csproj Updated Microsoft.Extensions.Http package from 9.0.0-rc.1.24431.7 to 9.0.0-preview.7.24405.7.
src/Cuemon.Extensions.Text.Json/*.csproj Updated System.Text.Json package from 9.0.0-rc.1.24431.7 to 9.0.0-preview.7.24405.7.
src/Cuemon.Extensions.Xunit.Hosting.AspNetCore/*.csproj Updated Microsoft.AspNetCore.TestHost package from 9.0.0-rc.1.24452.1 to 9.0.0-preview.7.24406.2.
src/Cuemon.Extensions.Xunit.Hosting/*.csproj Updated several packages from 9.0.0-rc.1.24431.7 to 9.0.0-preview.7.24405.7, including Microsoft.Extensions.Hosting, Microsoft.Extensions.Configuration, and related packages.
test/Cuemon.Data.Tests/*.csproj Updated Microsoft.Data.Sqlite package from 9.0.0-rc.1.24451.1 to 9.0.0-preview.7.24405.3.

Possibly related PRs

  • Improved performance for .NET 9.0+ through System.Threading.Lock. #73: This PR focuses on performance improvements for .NET 9.0+ through the implementation of System.Threading.Lock, which is relevant to the changes in the main PR that also involve updates to threading and locking mechanisms.
  • V9.0.0/lock refactoring #77: This PR includes significant updates to support .NET 9, including the introduction of System.Threading.Lock and modifications to various classes to enhance compatibility and simplicity, aligning with the main PR's focus on updating the .NET installation process and related dependencies.
  • V9.0.0/xunit testoutputhelperaccessor #78: This PR enhances unit test logging capabilities and introduces the ITestOutputHelperAccessor interface, which may relate to the overall improvements in the project's structure and logging mechanisms mentioned in the main PR.

Poem

In the meadow where code does play,
A rabbit hops, hip-hip-hooray!
With .NET versions, we now can choose,
Preview or stable, we’ll never lose!
Hopping along, our workflow’s bright,
Thanks to the changes, all feels right! 🐇✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 8df266f and 6f06792.

Files selected for processing (8)
  • src/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json.csproj (1 hunks)
  • src/Cuemon.Extensions.DependencyInjection/Cuemon.Extensions.DependencyInjection.csproj (1 hunks)
  • src/Cuemon.Extensions.Hosting/Cuemon.Extensions.Hosting.csproj (1 hunks)
  • src/Cuemon.Extensions.Net/Cuemon.Extensions.Net.csproj (1 hunks)
  • src/Cuemon.Extensions.Text.Json/Cuemon.Extensions.Text.Json.csproj (1 hunks)
  • src/Cuemon.Extensions.Xunit.Hosting.AspNetCore/Cuemon.Extensions.Xunit.Hosting.AspNetCore.csproj (1 hunks)
  • src/Cuemon.Extensions.Xunit.Hosting/Cuemon.Extensions.Xunit.Hosting.csproj (1 hunks)
  • test/Cuemon.Data.Tests/Cuemon.Data.Tests.csproj (1 hunks)
Additional comments not posted (8)
src/Cuemon.Extensions.Hosting/Cuemon.Extensions.Hosting.csproj (1)

13-13: LGTM!

The change updates the version of the Microsoft.Extensions.Hosting package reference for the net9 target framework from a release candidate to a preview version. This may involve new features, bug fixes, or changes in functionality that could affect how the hosting environment is utilized within the application.

However, the change is isolated to the net9 target framework and is in a package reference, so it will not directly affect the code in the project. That said, it's important to review the release notes of the new package version to ensure there are no breaking changes or new features that may indirectly affect the code.

Overall, the change looks good to me.

src/Cuemon.Extensions.Text.Json/Cuemon.Extensions.Text.Json.csproj (1)

20-20: Verify the reason for the change and its impact on the application.

I noticed that the System.Text.Json package version has been updated from a release candidate to a preview version for the target framework condition that starts with 'net9'. While this change may have been made to address issues or take advantage of new features in the preview version, it's important to ensure that the preview version is stable and compatible with the rest of the application.

Can you please provide more context on the reason for this change and its impact on the application? Also, have you thoroughly tested the application with the preview version to ensure stability and compatibility?

src/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json.csproj (1)

14-14: Verify the impact of the package version update on the application.

The change looks good. However, since the package version has been updated from a release candidate to a preview version, it's important to verify that this update does not introduce any breaking changes or unexpected behavior in the application.

Run the following script to search for potential usage of the updated package:

If any usage is found, ensure that the application is thoroughly tested with the updated package to confirm that it behaves as expected.

src/Cuemon.Extensions.DependencyInjection/Cuemon.Extensions.DependencyInjection.csproj (1)

13-14: Verify the reason for downgrading the package versions.

I noticed that the versions of Microsoft.Extensions.DependencyInjection and Microsoft.Extensions.Options.ConfigurationExtensions have been changed from 9.0.0-rc.1.24431.7 to 9.0.0-preview.7.24405.7 for the net9 target framework condition.

This change indicates a downgrade from a release candidate version to a preview version. Preview versions are typically less stable and may have incomplete features compared to release candidates.

Can you please provide more context on why this downgrade is necessary? Are there any compatibility issues with the release candidate version that necessitate this change?

Also, please exercise caution when using preview versions, especially in a production environment. Ensure that thorough testing is done to verify that the preview versions work as expected and do not introduce any breaking changes or bugs in the project.

src/Cuemon.Extensions.Xunit.Hosting.AspNetCore/Cuemon.Extensions.Xunit.Hosting.AspNetCore.csproj (1)

19-19: Verify the impact of the package version update.

The change in the version of the Microsoft.AspNetCore.TestHost package from a release candidate to a preview version aligns with the PR objective of resolving issues related to the .NET 9 release candidate. However, it's important to verify that the update does not introduce any unexpected behavior or compatibility issues in the testing framework's integration with ASP.NET Core applications.

Run the following script to verify the impact of the package version update:

Verification successful

No issues found with the package version update.

The update to the Microsoft.AspNetCore.TestHost package version does not introduce any test failures, errors, or deprecated API usage in the relevant test directories. This suggests that the update is compatible with the current codebase.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the impact of the package version update on the testing framework.

# Test 1: Search for test failures or errors related to the package update.
rg --type cs -i $'(fail|error).*AspNetCore\.TestHost' tests/

# Test 2: Search for usage of deprecated or removed APIs from the package.
rg --type cs -i $'(obsolete|deprecated).*AspNetCore\.TestHost' src/ tests/

Length of output: 231


Script:

#!/bin/bash
# Description: Locate test files and verify the impact of the package version update.

# Locate directories or files related to tests.
fd --type d --name test
fd --type f --name '*.cs' --exec grep -l 'Test' {}

# Adjusted verification script based on located test files.
# Test 1: Search for test failures or errors related to the package update.
rg --type cs -i $'(fail|error).*AspNetCore\.TestHost' <correct_test_directory>

# Test 2: Search for usage of deprecated or removed APIs from the package.
rg --type cs -i $'(obsolete|deprecated).*AspNetCore\.TestHost' src/ <correct_test_directory>

Length of output: 804


Script:

#!/bin/bash
# Description: Locate test files and verify the impact of the package version update.

# Locate directories or files related to tests.
fd --type d 'test'
fd --type f '.cs' --exec grep -l 'Test' {}

# Adjusted verification script based on located test files.
# Test 1: Search for test failures or errors related to the package update.
rg --type cs -i $'(fail|error).*AspNetCore\.TestHost' tests/

# Test 2: Search for usage of deprecated or removed APIs from the package.
rg --type cs -i $'(obsolete|deprecated).*AspNetCore\.TestHost' src/ tests/

Length of output: 23167


Script:

#!/bin/bash
# Description: Verify the impact of the package version update using the correct test directories.

# Test 1: Search for test failures or errors related to the package update in relevant test directories.
rg --type cs -i $'(fail|error).*AspNetCore\.TestHost' test/Cuemon.Extensions.Xunit.Hosting.AspNetCore.Tests/

# Test 2: Search for usage of deprecated or removed APIs from the package in relevant directories.
rg --type cs -i $'(obsolete|deprecated).*AspNetCore\.TestHost' src/ test/Cuemon.Extensions.Xunit.Hosting.AspNetCore.Tests/

Length of output: 233

test/Cuemon.Data.Tests/Cuemon.Data.Tests.csproj (1)

29-29: Verify the impact of the package version change.

The change is consistent with the PR objective of updating the .NET installation process within the CI pipeline to resolve issues related to the .NET 9 release candidate. However, please ensure that the shift from the release candidate version to the preview version of the Microsoft.Data.Sqlite package does not introduce any breaking changes or unexpected behavior in the application.

src/Cuemon.Extensions.Xunit.Hosting/Cuemon.Extensions.Xunit.Hosting.csproj (2)

14-14: Verify compatibility with the preview version.

The change is consistent with the PR objective of updating the .NET installation process within the CI pipeline to use preview versions. However, please ensure that you thoroughly test the application with the 9.0.0-preview.7.24405.7 version of Microsoft.Extensions.Hosting to identify any potential compatibility issues or breaking changes introduced by the preview version.


15-15: LGTM!

@@ -10,7 +10,7 @@
</PropertyGroup>

<ItemGroup Condition="$(TargetFramework.StartsWith('net9'))">
<PackageReference Include="Microsoft.Extensions.Http" Version="9.0.0-rc.1.24431.7" />
<PackageReference Include="Microsoft.Extensions.Http" Version="9.0.0-preview.7.24405.7" />
Copy link

Choose a reason for hiding this comment

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

Clarify the reason for the rollback and ensure compatibility through testing.

The change in the package version from 9.0.0-rc.1.24431.7 to 9.0.0-preview.7.24405.7 appears to be a rollback from a release candidate to a preview version. Preview versions are typically less stable than release candidates and may introduce breaking changes.

Please provide clarification on the reason for this rollback. Additionally, ensure that the preview version is compatible with the rest of the application and its dependencies by conducting thorough testing to identify any potential issues.

@gimlichael
Copy link
Owner Author

Silently fixed by Microsoft .. without details: dotnet/sdk#43432

@gimlichael gimlichael closed this Jan 6, 2025
Copy link

codecov bot commented Jan 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.21%. Comparing base (cf9609d) to head (6f06792).
Report is 24 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #79   +/-   ##
=======================================
  Coverage   80.21%   80.21%           
=======================================
  Files         708      708           
  Lines       21638    21638           
  Branches     2180     2180           
=======================================
  Hits        17357    17357           
  Misses       4228     4228           
  Partials       53       53           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gimlichael gimlichael deleted the v9.0.0/net9rc1-gha-troubleshoot branch January 6, 2025 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant