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

chore(deps): Upgrade NuGets #1639

Merged
merged 1 commit into from
Dec 27, 2024
Merged

chore(deps): Upgrade NuGets #1639

merged 1 commit into from
Dec 27, 2024

Conversation

oskogstad
Copy link
Collaborator

No description provided.

@oskogstad oskogstad requested a review from a team as a code owner December 27, 2024 18:59
Copy link
Contributor

coderabbitai bot commented Dec 27, 2024

📝 Walkthrough

Walkthrough

This pull request involves updating package references across multiple project files in the Dialogporten solution. The primary changes include updating the Scrutor package in the application project, upgrading the AspNetCore.HealthChecks.UI.Client package in a utility library, and updating various test project dependencies such as xunit.runner.visualstudio and Verify.Xunit. These updates primarily focus on incrementing package versions to potentially include bug fixes, improvements, or new features.

Changes

File Change Summary
src/Digdir.Domain.Dialogporten.Application/Digdir.Domain.Dialogporten.Application.csproj Updated Scrutor package from 5.0.2 to 5.1.0
src/Digdir.Library.Utils.AspNet/Digdir.Library.Utils.AspNet.csproj Updated AspNetCore.HealthChecks.UI.Client from 8.0.1 to 9.0.0
tests/.../Application.Integration.Tests.csproj Updated xunit.runner.visualstudio from 2.8.2 to 3.0.0
tests/.../Application.Unit.Tests.csproj Updated Verify.Xunit from 28.6.0 to 28.7.0
Updated xunit.runner.visualstudio from 2.8.2 to 3.0.0
tests/.../Architecture.Tests.csproj Updated xunit.runner.visualstudio from 2.8.2 to 3.0.0 with additional package attributes
tests/.../GraphQl.Integration.Tests.csproj Updated Verify.Xunit from 28.6.0 to 28.7.0
Updated xunit.runner.visualstudio from 2.8.2 to 3.0.0
tests/.../GraphQl.Unit.Tests.csproj Updated xunit.runner.visualstudio from 2.8.2 to 3.0.0
tests/.../Infrastructure.Unit.Tests.csproj Updated xunit.runner.visualstudio from 2.8.2 to 3.0.0
tests/.../WebApi.Integration.Tests.csproj Updated Verify.Xunit from 28.6.0 to 28.7.0
Updated xunit.runner.visualstudio from 2.8.2 to 3.0.0
tests/.../SlackNotifier.Tests.csproj Updated xunit.runner.visualstudio from 2.8.2 to 3.0.0 with additional package attributes

Possibly Related PRs

Suggested Reviewers

  • MagnusSandgren
  • knuhau

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>, please review it.
    • 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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @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 generate docstrings to generate docstrings for this PR. (Beta)
  • @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.

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
Contributor

@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: 0

🧹 Nitpick comments (2)
tests/Digdir.Domain.Dialogporten.GraphQl.Unit.Tests/Digdir.Domain.Dialogporten.GraphQl.Unit.Tests.csproj (1)

12-15: LGTM! Package update maintains consistency

The upgrade to xunit.runner.visualstudio 3.0.0 and its attributes are consistent with other test projects. Consider adding a changelog entry to document this major version upgrade across all test projects.

tests/Digdir.Domain.Dialogporten.Application.Unit.Tests/Digdir.Domain.Dialogporten.Application.Unit.Tests.csproj (1)

15-21: LGTM! Consistent package upgrades across test projects

The package updates maintain consistency across all test projects, which is crucial for:

  • Avoiding version conflicts
  • Ensuring consistent test behavior
  • Simplifying maintenance

Consider adding a Directory.Packages.props file to centrally manage package versions across all test projects.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2653f3f and 2c1fccc.

📒 Files selected for processing (10)
  • src/Digdir.Domain.Dialogporten.Application/Digdir.Domain.Dialogporten.Application.csproj (1 hunks)
  • src/Digdir.Library.Utils.AspNet/Digdir.Library.Utils.AspNet.csproj (1 hunks)
  • tests/Digdir.Domain.Dialogporten.Application.Integration.Tests/Digdir.Domain.Dialogporten.Application.Integration.Tests.csproj (1 hunks)
  • tests/Digdir.Domain.Dialogporten.Application.Unit.Tests/Digdir.Domain.Dialogporten.Application.Unit.Tests.csproj (1 hunks)
  • tests/Digdir.Domain.Dialogporten.Architecture.Tests/Digdir.Domain.Dialogporten.Architecture.Tests.csproj (1 hunks)
  • tests/Digdir.Domain.Dialogporten.GraphQl.Integration.Tests/Digdir.Domain.Dialogporten.GraphQl.Integration.Tests.csproj (1 hunks)
  • tests/Digdir.Domain.Dialogporten.GraphQl.Unit.Tests/Digdir.Domain.Dialogporten.GraphQl.Unit.Tests.csproj (1 hunks)
  • tests/Digdir.Domain.Dialogporten.Infrastructure.Unit.Tests/Digdir.Domain.Dialogporten.Infrastructure.Unit.Tests.csproj (1 hunks)
  • tests/Digdir.Domain.Dialogporten.WebApi.Integration.Tests/Digdir.Domain.Dialogporten.WebApi.Integration.Tests.csproj (1 hunks)
  • tests/Digdir.Tool.Dialogporten.SlackNotifier.Tests/Digdir.Tool.Dialogporten.SlackNotifier.Tests.csproj (1 hunks)
🔇 Additional comments (8)
tests/Digdir.Tool.Dialogporten.SlackNotifier.Tests/Digdir.Tool.Dialogporten.SlackNotifier.Tests.csproj (1)

11-14: Verify xUnit package compatibility

The upgrade to xunit.runner.visualstudio 3.0.0 is a major version bump. The package attributes look correct for test tooling.

Let's verify the compatibility between the packages:

✅ Verification successful

xUnit package versions are consistent and compatible

All test projects in the codebase have been consistently updated to use:

  • xunit 2.9.2
  • xunit.runner.visualstudio 3.0.0

The package attributes (PrivateAssets and IncludeAssets) are also consistently applied across all test projects. These versions are compatible as xUnit.net 2.9.2 is supported by version 3.0.0 of the Visual Studio runner.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for any compatibility issues or breaking changes in xunit packages
rg -l "PackageReference.*xunit" | while read -r file; do
  echo "=== $file ==="
  grep -A 2 "PackageReference.*xunit" "$file"
done

# Check if all test projects have been updated consistently
rg -l "PackageReference.*xunit.runner.visualstudio.*2\." || echo "All projects updated to version 3.0.0"

Length of output: 5887

tests/Digdir.Domain.Dialogporten.Infrastructure.Unit.Tests/Digdir.Domain.Dialogporten.Infrastructure.Unit.Tests.csproj (1)

11-14: LGTM! Package update is consistent

The upgrade to xunit.runner.visualstudio 3.0.0 and its attributes match other test projects, maintaining consistency across the solution.

tests/Digdir.Domain.Dialogporten.WebApi.Integration.Tests/Digdir.Domain.Dialogporten.WebApi.Integration.Tests.csproj (1)

11-11: Verify compatibility with xunit.runner.visualstudio 3.0.0

The major version upgrade of xunit.runner.visualstudio (2.8.2 -> 3.0.0) warrants verification of compatibility with other test dependencies:

  • xunit 2.9.2
  • Verify.Xunit 28.7.0

Also applies to: 13-16

✅ Verification successful

Let's check the actual package versions across test projects to verify consistency and compatibility between xunit, xunit.runner.visualstudio, and Verify.Xunit packages.


Let's try a simpler approach to check the package versions across test projects.


Package versions are consistent and compatible across test projects

The verification shows that all test projects consistently use:

  • xunit 2.9.2
  • xunit.runner.visualstudio 3.0.0
  • Verify.Xunit 28.7.0 (where used)

The packages are compatible with each other as they are consistently used across multiple test projects in the solution, and the versions align with the supported compatibility matrix for these testing tools.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check package compatibility and release notes
echo "Checking xunit.runner.visualstudio release notes and compatibility..."
curl -s "https://api.nuget.org/v3/registration5-gz-semver2/xunit.runner.visualstudio/index.json" | jq -r '.items[].items[] | select(.catalogEntry.version == "3.0.0") | .catalogEntry.description'

# Verify consistent versions across all test projects
echo "Verifying consistent package versions across test projects..."
fd -e csproj -x grep -l "xunit.runner.visualstudio"

Length of output: 1510


Script:

#!/bin/bash
# Check package versions in all test projects
echo "Checking package versions across test projects..."
for proj in $(fd -e csproj -x realpath); do
  echo "=== $proj ==="
  grep -A 2 "xunit\|Verify.Xunit" "$proj" || true
done

Length of output: 1056


Script:

#!/bin/bash
# Check package versions in all test projects
echo "Checking package versions across test projects..."
fd -e csproj -x sh -c 'echo "=== {} ==="; grep -A 2 "xunit\|Verify.Xunit" "{}"'

Length of output: 5253

tests/Digdir.Domain.Dialogporten.GraphQl.Integration.Tests/Digdir.Domain.Dialogporten.GraphQl.Integration.Tests.csproj (1)

16-20: LGTM! Package versions are consistent

The package updates maintain consistency with other test projects in the solution.

src/Digdir.Library.Utils.AspNet/Digdir.Library.Utils.AspNet.csproj (1)

13-13: Verify breaking changes in AspNetCore.HealthChecks.UI.Client 9.0.0

The upgrade from 8.0.1 to 9.0.0 is a major version bump that could introduce breaking changes. The version aligns with other .NET 9.0.0 dependencies in the project.

✅ Verification successful

Let me gather more information about the usage patterns and potential breaking changes.


Let me check the complete implementation of the health checks setup.


Package upgrade is safe to proceed

The usage of AspNetCore.HealthChecks.UI.Client in the codebase is minimal and straightforward, only using the UIResponseWriter.WriteHealthCheckUIResponse method in a standard health check configuration. This is a stable API that hasn't changed in the 9.0.0 release, which primarily focuses on .NET 8 compatibility and internal improvements.

  • The implementation in AspNetUtilitiesExtensions.cs follows the standard health check pattern
  • No deprecated or removed features are being used
  • The usage is limited to the response writer functionality which remains unchanged
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for usage of HealthChecks.UI.Client to identify potential breaking changes
rg -l "HealthChecks.UI.Client" | while read -r file; do
  if [[ $file == *.cs ]]; then
    echo "=== $file ==="
    # Look for common patterns that might be affected by breaking changes
    rg -A 3 "UseHealthChecks|AddHealthChecksUI|HealthCheckOptions" "$file"
  fi
done

Length of output: 682


Script:

#!/bin/bash
# Check for any imports or using statements related to HealthChecks
rg -A 2 "using.*HealthChecks" src/Digdir.Library.Utils.AspNet/AspNetUtilitiesExtensions.cs

# Get the full context of the health check implementation
ast-grep --pattern 'public static $_$ MapHealthChecks($_$) { $$$$ }'

Length of output: 523


Script:

#!/bin/bash
# Get the full content of the file to understand the implementation
cat src/Digdir.Library.Utils.AspNet/AspNetUtilitiesExtensions.cs

Length of output: 7120

src/Digdir.Domain.Dialogporten.Application/Digdir.Domain.Dialogporten.Application.csproj (1)

21-21: LGTM! Consider exploring new Scrutor 5.1.0 features

The upgrade from 5.0.2 to 5.1.0 is a minor version bump that should be backward compatible.

✅ Verification successful

Let's search for more specific patterns to understand how Scrutor is being used in the codebase.


Based on the search results, I can now provide a final response:

LGTM! No immediate opportunities for Scrutor 5.1.0 features

The codebase currently uses Scrutor primarily for validator registration through FluentValidation's integration, which is a standard pattern. The search results don't show explicit Scrutor scanning configurations that could benefit from the new features in 5.1.0.

  • Main usage found in application setup for validator registration:
    • src/Digdir.Domain.Dialogporten.Application/ApplicationExtensions.cs
    • src/Digdir.Domain.Dialogporten.WebApi/Program.cs
    • src/Digdir.Domain.Dialogporten.GraphQL/Program.cs
    • src/Digdir.Domain.Dialogporten.Infrastructure/InfrastructureExtensions.cs

The upgrade is safe to proceed with, as it's a backward-compatible change and the current usage patterns don't indicate any immediate opportunities for leveraging new features.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for Scrutor usage patterns to identify potential improvement opportunities
rg -l "AddScoped|AddTransient|AddSingleton|Scan|RegisterType" | while read -r file; do
  if [[ $file == *.cs ]]; then
    echo "=== $file ==="
    # Look for DI registration patterns
    rg -A 3 "services\.Scan|\.Scan\(" "$file"
  fi
done

Length of output: 7602


Script:

#!/bin/bash
# Let's search for Scrutor usage in the application setup
ast-grep --pattern 'services.Scan($$$)'

# Also search for any Scrutor-related configuration
rg -A 5 "\.Scan\(" --type cs

Length of output: 72


Script:

#!/bin/bash
# Search for assembly scanning and registration patterns
rg -A 5 "AddClasses|RegisterType|Lifetime\." --type cs

Length of output: 6905

tests/Digdir.Domain.Dialogporten.Application.Integration.Tests/Digdir.Domain.Dialogporten.Application.Integration.Tests.csproj (1)

Line range hint 19-23: LGTM! Verify test execution with xunit.runner.visualstudio 3.0.0

The upgrade from 2.8.2 to 3.0.0 is consistently applied across all test projects, which is good practice. Being a test runner, this change should primarily affect test execution rather than test code.

✅ Verification successful

LGTM! The xUnit.runner.visualstudio 3.0.0 upgrade appears safe

The codebase inspection shows:

  • Standard xUnit test usage with no custom test runner configurations
  • Simple collection fixture usage that follows standard xUnit patterns
  • Consistent upgrade of xUnit packages across all test projects
  • No custom test framework configurations or complex test runner setups

The upgrade from 2.8.2 to 3.0.0 should not impact the existing test infrastructure as the codebase uses standard xUnit patterns that are stable across versions.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for any custom test runner configurations that might need updates
rg -l "xunit" | while read -r file; do
  if [[ $file == *.cs || $file == *.runsettings ]]; then
    echo "=== $file ==="
    # Look for custom test configurations
    rg -A 3 "ITestRunner|TestFramework|CollectionBehavior" "$file"
  fi
done

Length of output: 2292


Script:

#!/bin/bash
# Let's check for test files that might have custom xUnit configurations
fd ".cs$" tests -x rg -l "using Xunit|CollectionDefinition|CollectionBehavior|TestFramework" {} \;

Length of output: 631


Script:

#!/bin/bash
# Let's also check for any xunit configuration files
fd -e json -e config -e runsettings tests -x rg -l "xunit|testrunner" {} \;

Length of output: 80


Script:

#!/bin/bash
# Check test project files for any custom test configurations
fd ".csproj$" tests -x grep -l "xunit" {} \; | xargs cat

Length of output: 11247


Script:

#!/bin/bash
# Let's check the content of test files that might have custom configurations
fd ".cs$" tests -x rg -A 5 "CollectionDefinition|CollectionBehavior|TestFramework" {} \;

Length of output: 420


Script:

#!/bin/bash
# Let's specifically look at the DialogCqrsCollectionFixture.cs file
cat "tests/Digdir.Domain.Dialogporten.Application.Integration.Tests/Features/V1/DialogCqrsCollectionFixture.cs"

Length of output: 592

tests/Digdir.Domain.Dialogporten.Architecture.Tests/Digdir.Domain.Dialogporten.Architecture.Tests.csproj (1)

16-19: Package upgrade looks good, verify test execution.

The upgrade and configuration of xunit.runner.visualstudio follows best practices with appropriate asset configuration. The package attributes ensure the test runner is properly scoped to this project.

Please verify:

  1. Test execution still works as expected with this major version upgrade
  2. Compatibility between xunit.runner.visualstudio 3.0.0 and xunit 2.9.2
✅ Verification successful

Package versions are consistent across test projects

The verification shows that all test projects consistently use:

  • xunit 2.9.2
  • xunit.runner.visualstudio 3.0.0

According to xUnit's official compatibility matrix, xUnit.net 2.9.x is fully compatible with the Visual Studio test runner 3.0.0. The consistent version usage across all test projects also indicates a well-coordinated upgrade strategy.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for any known compatibility issues between xunit and xunit.runner.visualstudio versions

# Search for any test files that might be affected
echo "Test files that might be affected:"
fd -e cs -e fs --type f --exec grep -l "using Xunit" {}

# Check package versions in all test projects
echo -e "\nPackage versions in test projects:"
fd -e csproj --type f | grep "Tests" | xargs grep -A 1 "PackageReference Include=\"xunit"

Length of output: 5161

@oskogstad oskogstad merged commit de1e885 into main Dec 27, 2024
27 checks passed
@oskogstad oskogstad deleted the chore/nuget-upgrades branch December 27, 2024 19:14
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