Skip to content

Conversation

gimlichael
Copy link
Member

@gimlichael gimlichael commented May 25, 2025

This pull request includes updates across multiple areas, including dependency upgrades, workflow optimizations, and minor code and test adjustments. The most significant changes focus on upgrading dependencies, improving CI/CD workflows by reusing modular workflows, and refining code and test implementations.

Dependency Upgrades:

  • Updated various package versions in Directory.Packages.props, including Codebelt.Extensions.Asp.Versioning to 9.0.3, Swashbuckle.AspNetCore to 8.1.2, and others. These upgrades ensure compatibility with the latest features and bug fixes.
  • Updated the Docker image in testenvironments.json to use gimlichael/ubuntu-testrunner:net8.0.409-9.0.300.

CI/CD Workflow Improvements:

  • Simplified the .github/workflows/pipelines.yml file by replacing inline job definitions with reusable workflows for build, pack, test, and nuget tasks. This reduces redundancy and improves maintainability. [1] [2]

Documentation Updates:

  • Updated CHANGELOG.md and PackageReleaseNotes.txt with details about new versions, including 9.0.3, which focuses on dependency updates for supported target frameworks. [1] [2]

Code Enhancements:

  • Added a <remarks> tag to the AddRestfulSwagger method in ServiceCollectionExtensions.cs to clarify the expected call order for proper configuration.

Test Adjustments:

  • Removed redundant services.AddSwaggerGen() calls in multiple test methods to streamline test setups in ServiceCollectionExtensionsTest.cs and SwaggerGenOptionsExtensionsTest.cs. [1] [2] [3] [4] [5]

Summary by CodeRabbit

  • New Features

    • Updated release notes and changelog to include details for versions 9.0.2 and 9.0.3, highlighting support for .NET 8 and .NET 9 and dependency upgrades.
  • Bug Fixes

    • Updated package dependencies to the latest compatible versions to ensure improved stability and compatibility.
  • Documentation

    • Added a clarification in the API documentation regarding service configuration requirements.
  • Chores

    • Upgraded Docker and test environment images to newer versions.
    • Refactored CI workflows to use reusable templates for improved maintainability.
    • Simplified test setups for easier maintenance.

@gimlichael gimlichael self-assigned this May 25, 2025
Copy link

coderabbitai bot commented May 25, 2025

Walkthrough

This update revises package versions, Docker images, and test environments to newer releases. The GitHub workflow is refactored to use reusable workflows, and XML documentation is improved. Test code is streamlined by removing redundant service registrations and simplifying factory method calls. Changelog and release notes are updated.

Changes

File(s) Change Summary
Directory.Packages.props Updated multiple package versions to newer patch/minor releases.
.docfx/Dockerfile.docfx, testenvironments.json Upgraded Docker base images and test runner tags; enabled multi-platform builds in Dockerfile.
.github/workflows/pipelines.yml Refactored workflow to use reusable workflow calls; removed explicit job steps; updated job dependencies and names.
CHANGELOG.md, .nuget/Codebelt.Extensions.Swashbuckle.AspNetCore/PackageReleaseNotes.txt Added changelog and release notes entries for version 9.0.3 and 9.0.2.
src/Codebelt.Extensions.Swashbuckle.AspNetCore/ServiceCollectionExtensions.cs Added XML documentation remark to AddRestfulSwagger method.
test/Codebelt.Extensions.Swashbuckle.AspNetCore.Tests/ServiceCollectionExtensionsTest.cs Removed redundant AddSwaggerGen() calls from test methods.
test/Codebelt.Extensions.Swashbuckle.AspNetCore.Tests/SwaggerGenOptionsExtensionsTest.cs Removed explicit hostFixture: null arguments from test factory calls.

Sequence Diagram(s)

sequenceDiagram
    participant Developer
    participant GitHub Actions
    participant Reusable Workflows
    participant Docker Build
    participant Test Runner

    Developer->>GitHub Actions: Push code/update
    GitHub Actions->>Reusable Workflows: Call build/pack/test/deploy workflows
    Reusable Workflows->>Docker Build: Build with updated images (multi-platform)
    Reusable Workflows->>Test Runner: Execute tests with updated environment
    Reusable Workflows-->>GitHub Actions: Return results/artifacts
    GitHub Actions-->>Developer: Report build/test/deploy status
Loading

Possibly related PRs

  • #3: Updates package versions in Directory.Packages.props, similar to this PR's dependency updates.
  • #4: Updates packages and Docker images for .NET 9 RC2, related by focus on dependency and environment version bumps.
  • #8: Updates Dockerfile base images, directly related as this PR continues those image upgrades.

Poem

🐇
With packages fresh and Docker anew,
Workflows refactored, the pipelines flew.
Tests run lighter, docs now clear,
Changelogs tell the tale this year.
Hop, hop, hooray—dependencies shine!
Another smooth release, right on time.

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this 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

codecov bot commented May 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.81%. Comparing base (099aa6f) to head (bc80da3).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #10   +/-   ##
=======================================
  Coverage   84.81%   84.81%           
=======================================
  Files          11       11           
  Lines         237      237           
  Branches        9        9           
=======================================
  Hits          201      201           
  Misses         36       36           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

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

🧹 Nitpick comments (1)
.docfx/Dockerfile.docfx (1)

6-6: Use COPY instead of ADD for the documentation folder.
Hadolint [DL3020] recommends replacing ADD [".", "docfx"] with COPY [".", "docfx"] to avoid unintended behaviors.

- ADD [".", "docfx"]
+ COPY [".", "docfx"]
🧰 Tools
🪛 Hadolint (2.12.0)

[error] 6-6: Use COPY instead of ADD for files and folders

(DL3020)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 099aa6f and bc80da3.

📒 Files selected for processing (9)
  • .docfx/Dockerfile.docfx (1 hunks)
  • .github/workflows/pipelines.yml (2 hunks)
  • .nuget/Codebelt.Extensions.Swashbuckle.AspNetCore/PackageReleaseNotes.txt (1 hunks)
  • CHANGELOG.md (1 hunks)
  • Directory.Packages.props (1 hunks)
  • src/Codebelt.Extensions.Swashbuckle.AspNetCore/ServiceCollectionExtensions.cs (1 hunks)
  • test/Codebelt.Extensions.Swashbuckle.AspNetCore.Tests/ServiceCollectionExtensionsTest.cs (2 hunks)
  • test/Codebelt.Extensions.Swashbuckle.AspNetCore.Tests/SwaggerGenOptionsExtensionsTest.cs (3 hunks)
  • testenvironments.json (1 hunks)
🧰 Additional context used
🪛 LanguageTool
.nuget/Codebelt.Extensions.Swashbuckle.AspNetCore/PackageReleaseNotes.txt

[uncategorized] ~11-~11: You might be missing the article “the” here.
Context: ... 8
 

ALM

  • CHANGED Dependencies to latest and greatest with respect to TFMs
     
    V...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


[style] ~11-~11: ‘with respect to’ might be wordy. Consider a shorter alternative.
Context: ...GED Dependencies to latest and greatest with respect to TFMs
 
Version 9.0.1
Availability: ....

(EN_WORDINESS_PREMIUM_WITH_RESPECT_TO)

🪛 Hadolint (2.12.0)
.docfx/Dockerfile.docfx

[error] 6-6: Use COPY instead of ADD for files and folders

(DL3020)

⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: call-codecov / 📊 Code Coverage Analysis
  • GitHub Check: call-codeql / 🛡️ Security Analysis
  • GitHub Check: call-sonarcloud / 🔬 Code Quality Analysis
🔇 Additional comments (15)
test/Codebelt.Extensions.Swashbuckle.AspNetCore.Tests/SwaggerGenOptionsExtensionsTest.cs (1)

45-45: LGTM! Test setup simplification looks good.

The removal of the explicit hostFixture: null parameter from WebHostTestFactory.Create calls simplifies the test setup without affecting the test functionality. This aligns well with the PR's objective of streamlining test configurations.

Also applies to: 116-116, 187-187

src/Codebelt.Extensions.Swashbuckle.AspNetCore/ServiceCollectionExtensions.cs (1)

21-21: Excellent documentation improvement!

Adding the <remarks> tag to clarify that AddRestfulSwagger() expects a prior call to services.AddRestfulApiVersioning() is very helpful for developers. This makes the dependency explicit and helps prevent configuration errors.

test/Codebelt.Extensions.Swashbuckle.AspNetCore.Tests/ServiceCollectionExtensionsTest.cs (1)

46-46: Good test cleanup!

The removal of redundant services.AddSwaggerGen() calls streamlines the test setup since AddRestfulSwagger() handles Swagger generation internally. This makes the tests cleaner and more focused on testing the actual functionality.

Also applies to: 172-172

Directory.Packages.props (1)

7-18:

❓ Verification inconclusive

Package version updates look appropriate for maintenance release.

All the version bumps appear to be minor/patch updates which is appropriate for a maintenance release. The updates align well with the PR's objective of keeping dependencies current.

However, let's verify these package versions are valid and secure:


🏁 Script executed:

#!/bin/bash
# Description: Verify package versions and check for security advisories

echo "Checking package versions and security advisories..."

# Check NuGet for package versions and security information
packages=(
    "Codebelt.Extensions.Asp.Versioning/9.0.3"
    "Codebelt.Extensions.Xunit.App/10.0.1"
    "Cuemon.Extensions.AspNetCore.Mvc.Formatters.Text.Json/9.0.5"
    "Microsoft.AspNetCore.OpenApi/9.0.5"
    "Microsoft.NET.Test.Sdk/17.14.0"
    "Swashbuckle.AspNetCore/8.1.2"
    "xunit.runner.visualstudio/3.1.0"
)

for package in "${packages[@]}"; do
    IFS='/' read -r name version <<< "$package"
    echo "Checking $name version $version..."
    
    # Check if version exists on NuGet
    curl -s "https://api.nuget.org/v3-flatcontainer/$name/index.json" | jq -r '.versions[]' | grep -q "^$version$"
    if [ $? -eq 0 ]; then
        echo "$name $version exists"
    else
        echo "$name $version not found"
    fi
done

# Check for known vulnerabilities using GitHub API
gh api graphql -f query='
{
  securityVulnerabilities(first: 10, ecosystem: NUGET, package: "Swashbuckle.AspNetCore") {
    nodes {
      advisory {
        summary
        severity
        publishedAt
      }
      vulnerableVersionRange
      firstPatchedVersion {
        identifier
      }
    }
  }
}'

Length of output: 4253


Confirm bumped package versions exist in NuGet feed

All of these are patch/minor bumps in Directory.Packages.props (lines 7–18) and look appropriate for a maintenance release. However, the flat-container API check failed because it requires lowercase package IDs, so we haven’t been able to automatically verify that each version is published. Please:

• Verify that each <PackageVersion Include="…"> value matches the lowercase NuGet package ID.
• Manually confirm on nuget.org (or your private feed) that the specified versions are available.
• Optionally re-run your verification script using lowercase IDs to ensure each package/version exists.

CHANGELOG.md (1)

10-12: Changelog entry for version 9.0.3 is clear and accurate.
The new entry correctly follows the existing format and documents the package dependency update.

testenvironments.json (1)

12-12: Updated test environment Docker image tag.
The dockerImage tag has been bumped to net8.0.409-9.0.300 as intended. Ensure this image is available in the registry.

.docfx/Dockerfile.docfx (1)

1-1: Added multi-platform build support via --platform directive.
The FROM statements for the base and build stages now include --platform=$BUILDPLATFORM, enabling cross-platform builds. This aligns well with the updated CI/CD workflows.

Also applies to: 4-4, 11-11

.nuget/Codebelt.Extensions.Swashbuckle.AspNetCore/PackageReleaseNotes.txt (4)

1-2: New release entry for version 9.0.3 is accurate.
The version header and availability platforms are correct.


4-5: Release note description for 9.0.3 is clear.
The bullet correctly reflects the dependency upgrades.


7-8: New release entry for version 9.0.2 is accurate.
The version header and availability platforms are correct.


10-11: Release note description for 9.0.2 is consistent.
The bullet accurately documents the dependency updates.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~11-~11: You might be missing the article “the” here.
Context: ... 8
 

ALM

  • CHANGED Dependencies to latest and greatest with respect to TFMs
     
    V...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


[style] ~11-~11: ‘with respect to’ might be wordy. Consider a shorter alternative.
Context: ...GED Dependencies to latest and greatest with respect to TFMs
 
Version 9.0.1
Availability: ....

(EN_WORDINESS_PREMIUM_WITH_RESPECT_TO)

.github/workflows/pipelines.yml (4)

26-36: Refactored build job to use reusable workflow.
The job is renamed to call-build and correctly invokes jobs-dotnet-build with matrix-driven configuration and strong-name key input along with GCP secrets. This reduces duplication and aligns with the new CI/CD strategy.


39-48: Streamlined pack job via reusable workflow.
The call-pack job now depends on build and leverages jobs-dotnet-pack, passing configuration, artifact upload flag, and version output. Looks good.


51-62: Simplified test job with reusable workflow.
The call-test job now uses jobs-dotnet-test with OS and configuration matrix and appropriate build switches. This is consistent and maintainable.


92-93: Updated deploy job to use jobs-nuget-push.
Gated deployment on all prior jobs and switched to the new NuGet push workflow. This aligns with the CI/CD improvements.

@gimlichael gimlichael merged commit 29e275e into main May 25, 2025
17 checks passed
@gimlichael gimlichael deleted the v9.0.3/package-maintenance branch May 25, 2025 20:08
@coderabbitai coderabbitai bot mentioned this pull request Jun 16, 2025
@coderabbitai coderabbitai bot mentioned this pull request Jul 10, 2025
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