Skip to content

Conversation

gimlichael
Copy link
Member

@gimlichael gimlichael commented Jun 1, 2025

This pull request includes updates to workflows, package release notes, changelog entries, and source code to improve compatibility, fix bugs, and enhance functionality. The most notable changes include upgrading workflow dependencies, introducing fixes for state validation in hosting fixtures, and improving the developer experience for logging and testing.

Workflow Updates:

Package Release Notes and Changelog:

  • .nuget/*/PackageReleaseNotes.txt: Updated to version 10.0.2 with notes on upgraded dependencies, bug fixes, and improvements for all supported target frameworks. [1] [2] [3] [4]
  • CHANGELOG.md: Added a new entry for version 10.0.2, summarizing changes and fixes, including updates to HasValidState and AddXunitTestLogging methods, and fixes for ManagedHostFixture and ManagedWebHostFixture classes.

Hosting Fixtures and Logging Improvements:

  • ManagedWebHostFixture.cs and ManagedHostFixture.cs: Added state validation checks to ConfigureHost methods to prevent errors caused by uncontrolled dual calls. [1] [2]
  • WebHostFixtureExtensions.cs and GenericHostFixtureExtensions.cs: Refined HasValidState methods to simplify validation logic by excluding certain property checks. [1] [2]
  • XunitTestLogger.cs: Enhanced logging to handle scenarios where no active test is present, avoiding InvalidOperationException.

Miscellaneous Updates:

Summary by CodeRabbit

  • Bug Fixes

    • Improved fixture validation to prevent invalid or redundant host configuration during test runs.
    • Enhanced logging to handle cases where no active test is present without causing errors.
  • New Features

    • Updated support for .NET 9 and .NET 8 in release notes.
  • Chores

    • Upgraded dependencies to the latest compatible versions.
    • Updated test environment Docker image and central package versions.
  • Documentation

    • Refreshed changelog and package release notes with new version entries and detailed updates.

@gimlichael gimlichael self-assigned this Jun 1, 2025
@Copilot Copilot AI review requested due to automatic review settings June 1, 2025 21:00
Copy link

coderabbitai bot commented Jun 1, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This update introduces version 10.0.2 across multiple Codebelt.Extensions.Xunit packages, updating dependencies to the latest compatible versions and refining internal validation logic. Bug fixes address fixture state checks in host configuration methods, and workflow automation is updated to use version 2 of reusable pipelines. Minor improvements enhance logging robustness and test environment configuration.

Changes

File(s) Change Summary
.github/workflows/pipelines.yml Updated to use version 2 (@v2) of reusable workflows; removed upload-packed-artifact input from pack job.
Directory.Packages.props Upgraded Microsoft.NET.Test.Sdk from 17.13.0 to 17.14.0.
testenvironments.json Changed Docker image tag for Ubuntu test environment, removing "mono-" prefix.
CHANGELOG.md Added entry for version 10.0.2 detailing fixes and changes to fixture state checks and logging.
.nuget/Codebelt.Extensions.Xunit*/PackageReleaseNotes.txt Updated release notes for 10.0.2: dependency upgrades, bug fixes, and support for .NET 9 and .NET 8.
src/Codebelt.Extensions.Xunit.Hosting/GenericHostFixtureExtensions.cs Modified HasValidState to remove Host property check; updated documentation.
src/Codebelt.Extensions.Xunit.Hosting/ManagedHostFixture.cs Added early exit in ConfigureHost if fixture state is invalid.
src/Codebelt.Extensions.Xunit.Hosting/XunitTestLogger.cs Wrapped _output?.WriteLine in try-catch to handle InvalidOperationException if no active test is present.
src/Codebelt.Extensions.Xunit.Hosting.AspNetCore/ManagedWebHostFixture.cs Added early exit in ConfigureHost for invalid state; changed delegate invocation to explicit Invoke call.
src/Codebelt.Extensions.Xunit.Hosting.AspNetCore/WebHostFixtureExtensions.cs Modified HasValidState to remove Application property check; updated documentation.

Sequence Diagram(s)

sequenceDiagram
    participant TestRunner
    participant ManagedHostFixture
    participant Host

    TestRunner->>ManagedHostFixture: ConfigureHost(hostTest)
    ManagedHostFixture->>ManagedHostFixture: HasValidState()
    alt Invalid State
        ManagedHostFixture-->>TestRunner: Return (early exit)
    else Valid State
        ManagedHostFixture->>Host: Build and configure host
    end
Loading
sequenceDiagram
    participant Logger
    participant ITestOutputHelper

    Logger->>ITestOutputHelper: WriteLine(message)
    alt InvalidOperationException thrown
        Logger-->>Logger: Catch and ignore exception
    end
Loading

Possibly related PRs

  • codebeltnet/xunit#35: Updates workflow to use reusable workflows at version 1 (@v1), which this PR advances to version 2 (@v2).
  • codebeltnet/xunit#36: Refactors workflow to use reusable workflows at version 1; this PR continues that work by upgrading to version 2.

Poem

In the warren where tests run bright,
We patched our fixtures, made them right.
With early exits and logging grace,
Dependencies now keep their pace.
Pipelines leap to version two—
A bunny’s work, both swift and true!
🐇✨


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 4b120ec and aee41c6.

📒 Files selected for processing (1)
  • src/Codebelt.Extensions.Xunit.Hosting.AspNetCore/WebHostFixtureExtensions.cs (1 hunks)
✨ 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

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request implements minor fixes across workflows, release notes, changelog entries, and source code to improve compatibility, address state validation issues in hosting fixtures, and refine logging behavior. Key changes include:

  • Upgrading workflow dependencies to v2 in pipelines.
  • Updating package release notes and the changelog to version 10.0.2.
  • Adding state validation checks to ManagedHostFixture and ManagedWebHostFixture and enhancing logging in XunitTestLogger.

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
testenvironments.json Updated Docker image tag to reflect the new test runner environment
src/Codebelt.Extensions.Xunit.Hosting/XunitTestLogger.cs Wrapped write operations in a try/catch to gracefully handle missing active test output
src/Codebelt.Extensions.Xunit.Hosting/ManagedHostFixture.cs Added early exit based on fixture state validation
src/Codebelt.Extensions.Xunit.Hosting/GenericHostFixtureExtensions.cs Removed redundant check from HasValidState
src/Codebelt.Extensions.Xunit.Hosting.AspNetCore/WebHostFixtureExtensions.cs Simplified the valid state validation by excluding the Application property check
src/Codebelt.Extensions.Xunit.Hosting.AspNetCore/ManagedWebHostFixture.cs Added state validation check and updated callback invocation
Directory.Packages.props Upgraded Microsoft.NET.Test.Sdk version
CHANGELOG.md, PackageReleaseNotes.txt (multiple files) Updated version and details for 10.0.2 release
.github/workflows/pipelines.yml Updated workflow references from v1 to v2

{
if (hostTest == null) { throw new ArgumentNullException(nameof(hostTest)); }
if (!HasTypes(hostTest.GetType(), typeof(HostTest<>))) { throw new ArgumentOutOfRangeException(nameof(hostTest), typeof(HostTest<>), $"{nameof(hostTest)} is not assignable from HostTest<T>."); }
if (!this.HasValidState()) { return; } // had to include this due to dual-call this method (one uncontrolled from xUnit library reflection magic; second controlled from this library)
Copy link

Copilot AI Jun 1, 2025

Choose a reason for hiding this comment

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

Consider adding a logging statement or warning message before returning when HasValidState() is false so that unexpected early exits during host configuration can be more easily diagnosed.

Suggested change
if (!this.HasValidState()) { return; } // had to include this due to dual-call this method (one uncontrolled from xUnit library reflection magic; second controlled from this library)
if (!this.HasValidState())
{
Logger?.LogWarning("Exiting ConfigureHost early because the host is in an invalid state.");
return;
} // had to include this due to dual-call this method (one uncontrolled from xUnit library reflection magic; second controlled from this library)

Copilot uses AI. Check for mistakes.

{
ArgumentNullException.ThrowIfNull(hostTest);
if (!HasTypes(hostTest.GetType(), typeof(WebHostTest<>))) { throw new ArgumentOutOfRangeException(nameof(hostTest), typeof(WebHostTest<>), $"{nameof(hostTest)} is not assignable from WebHostTest<T>."); }
if (!this.HasValidState()) { return; } // had to include this due to dual-call this method (one uncontrolled from xUnit library reflection magic; second controlled from this library)
Copy link

Copilot AI Jun 1, 2025

Choose a reason for hiding this comment

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

Consider adding a logging or warning message for the early return when HasValidState() returns false, to help developers trace potential configuration issues in the web host fixture.

Suggested change
if (!this.HasValidState()) { return; } // had to include this due to dual-call this method (one uncontrolled from xUnit library reflection magic; second controlled from this library)
if (!this.HasValidState())
{
Logger?.LogWarning("Exiting ConfigureHost early because HasValidState() returned false. This may indicate a configuration issue.");
return;
} // had to include this due to dual-call this method (one uncontrolled from xUnit library reflection magic; second controlled from this library)

Copilot uses AI. Check for mistakes.

Copy link

codecov bot commented Jun 1, 2025

Codecov Report

Attention: Patch coverage is 70.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 91.99%. Comparing base (e6acd7b) to head (4b120ec).

Files with missing lines Patch % Lines
...debelt.Extensions.Xunit.Hosting/XunitTestLogger.cs 50.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #39      +/-   ##
==========================================
- Coverage   92.26%   91.99%   -0.28%     
==========================================
  Files          48       48              
  Lines         931      937       +6     
  Branches      120      122       +2     
==========================================
+ Hits          859      862       +3     
- Misses         62       65       +3     
  Partials       10       10              

☔ 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

sonarqubecloud bot commented Jun 1, 2025

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

♻️ Duplicate comments (2)
src/Codebelt.Extensions.Xunit.Hosting/ManagedHostFixture.cs (1)

40-40: Consider adding logging for better debugging experience.

The guard clause implementation looks correct for preventing dual calls. However, as previously suggested, adding a logging statement would help with debugging unexpected early exits during host configuration.

Consider applying this enhancement:

-            if (!this.HasValidState()) { return; } // had to include this due to dual-call this method (one uncontrolled from xUnit library reflection magic; second controlled from this library)
+            if (!this.HasValidState())
+            {
+                Logger?.LogWarning("Exiting ConfigureHost early because the host is in an invalid state.");
+                return;
+            } // had to include this due to dual-call this method (one uncontrolled from xUnit library reflection magic; second controlled from this library)
src/Codebelt.Extensions.Xunit.Hosting.AspNetCore/ManagedWebHostFixture.cs (1)

43-43: Consider adding logging for better debugging experience.

The guard clause implementation is consistent with the similar fix in ManagedHostFixture.cs. However, as previously suggested, adding a logging statement would help developers trace potential configuration issues.

Consider applying this enhancement:

-            if (!this.HasValidState()) { return; } // had to include this due to dual-call this method (one uncontrolled from xUnit library reflection magic; second controlled from this library)
+            if (!this.HasValidState()) 
+            { 
+                Logger?.LogWarning("Exiting ConfigureHost early because HasValidState() returned false. This may indicate a configuration issue."); 
+                return; 
+            } // had to include this due to dual-call this method (one uncontrolled from xUnit library reflection magic; second controlled from this library)
🧹 Nitpick comments (4)
src/Codebelt.Extensions.Xunit.Hosting/XunitTestLogger.cs (1)

44-51: Good defensive programming, but consider improving observability and test coverage.

The try-catch block appropriately handles the scenario where ITestOutputHelper.WriteLine() throws InvalidOperationException when no test is active. However, consider these improvements:

  1. Test Coverage: The static analysis indicates this code path isn't covered by tests.
  2. Observability: Silently swallowing exceptions might make debugging difficult.

Consider adding a debug log or counter to track when this scenario occurs:

 catch (InvalidOperationException)
 {
     // can happen when there is no currently active test (e.g., you should use the ITestOutputHelperAccessor capability)
+    System.Diagnostics.Debug.WriteLine($"No active test context available for logging: {message}");
 }

Also consider adding a unit test to verify this exception handling works correctly.

🧰 Tools
🪛 GitHub Check: codecov/patch

[warning] 48-49: src/Codebelt.Extensions.Xunit.Hosting/XunitTestLogger.cs#L48-L49
Added lines #L48 - L49 were not covered by tests


[warning] 51-51: src/Codebelt.Extensions.Xunit.Hosting/XunitTestLogger.cs#L51
Added line #L51 was not covered by tests

CHANGELOG.md (1)

17-17: Fix formatting issues flagged by static analysis.

Static analysis tools have identified minor formatting issues that should be addressed for professional documentation:

  1. Line 17: Use proper markdown link format for the URL instead of bare URL
  2. Line 23: Missing article "the" before "ConfigureHost method"

Apply these formatting fixes:

- AddXunitTestLogging method on the ServiceCollectionExtensions class in the Codebelt.Extensions.Xunit.Hosting namespace to be forgiving when no active test is present (relates to https://github.com/xunit/xunit/issues/2377)
+ AddXunitTestLogging method on the ServiceCollectionExtensions class in the Codebelt.Extensions.Xunit.Hosting namespace to be forgiving when no active test is present (relates to [xunit/xunit#2377](https://github.com/xunit/xunit/issues/2377))
- ManagedWebHostFixture class in the Codebelt.Extensions.Xunit.Hosting.AspNetCore namespace to exit ConfigureHost method if the fixture is not in a valid state (e.g., configuration delegate properties are null)
+ ManagedWebHostFixture class in the Codebelt.Extensions.Xunit.Hosting.AspNetCore namespace to exit the ConfigureHost method if the fixture is not in a valid state (e.g., configuration delegate properties are null)
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

17-17: Bare URL used
null

(MD034, no-bare-urls)

.nuget/Codebelt.Extensions.Xunit.Hosting.AspNetCore/PackageReleaseNotes.txt (2)

8-8: Refine grammar for the ConfigureHost exit note
Add the missing article and use “an invalid state” for consistency.
Apply this diff:

- FIXED ManagedWebHostFixture class in the Codebelt.Extensions.Xunit.Hosting.AspNetCore namespace to exit ConfigureHost method if the fixture is not in a valid state (e.g., configuration delegate properties are null)
+ FIXED ManagedWebHostFixture class in the Codebelt.Extensions.Xunit.Hosting.AspNetCore namespace to exit the ConfigureHost method if the fixture is in an invalid state (e.g., configuration delegate properties are null)
🧰 Tools
🪛 LanguageTool

[uncategorized] ~8-~8: You might be missing the article “the” here.
Context: ...it.Hosting.AspNetCore namespace to exit ConfigureHost method if the fixture is not in a valid...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


11-11: Improve grammar for HasValidState method change
Include the definite articles for clarity.
Apply this diff:

- CHANGED HasValidState method on the WebHostFixtureExtensions class in the Codebelt.Extensions.Xunit.Hosting.AspNetCore namespace to exclude check of Application property
+ CHANGED HasValidState method on the WebHostFixtureExtensions class in the Codebelt.Extensions.Xunit.Hosting.AspNetCore namespace to exclude the check of the Application property
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between e6acd7b and 4b120ec.

📒 Files selected for processing (13)
  • .github/workflows/pipelines.yml (4 hunks)
  • .nuget/Codebelt.Extensions.Xunit.App/PackageReleaseNotes.txt (1 hunks)
  • .nuget/Codebelt.Extensions.Xunit.Hosting.AspNetCore/PackageReleaseNotes.txt (1 hunks)
  • .nuget/Codebelt.Extensions.Xunit.Hosting/PackageReleaseNotes.txt (1 hunks)
  • .nuget/Codebelt.Extensions.Xunit/PackageReleaseNotes.txt (1 hunks)
  • CHANGELOG.md (1 hunks)
  • Directory.Packages.props (1 hunks)
  • src/Codebelt.Extensions.Xunit.Hosting.AspNetCore/ManagedWebHostFixture.cs (2 hunks)
  • src/Codebelt.Extensions.Xunit.Hosting.AspNetCore/WebHostFixtureExtensions.cs (1 hunks)
  • src/Codebelt.Extensions.Xunit.Hosting/GenericHostFixtureExtensions.cs (1 hunks)
  • src/Codebelt.Extensions.Xunit.Hosting/ManagedHostFixture.cs (1 hunks)
  • src/Codebelt.Extensions.Xunit.Hosting/XunitTestLogger.cs (1 hunks)
  • testenvironments.json (1 hunks)
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: gimlichael
PR: codebeltnet/xunit#17
File: src/Codebelt.Extensions.Xunit.Hosting/Codebelt.Extensions.Xunit.Hosting.csproj:22-26
Timestamp: 2024-10-09T14:10:40.721Z
Learning: In the `src/Codebelt.Extensions.Xunit.Hosting/Codebelt.Extensions.Xunit.Hosting.csproj` file, only certain .NET 8 packages are available in version 8.0.1, while others remain at 8.0.0, so package versions may differ due to availability.
.nuget/Codebelt.Extensions.Xunit/PackageReleaseNotes.txt (1)
Learnt from: gimlichael
PR: codebeltnet/xunit#17
File: src/Codebelt.Extensions.Xunit.Hosting/Codebelt.Extensions.Xunit.Hosting.csproj:22-26
Timestamp: 2024-10-09T14:10:40.721Z
Learning: In the `src/Codebelt.Extensions.Xunit.Hosting/Codebelt.Extensions.Xunit.Hosting.csproj` file, only certain .NET 8 packages are available in version 8.0.1, while others remain at 8.0.0, so package versions may differ due to availability.
.nuget/Codebelt.Extensions.Xunit.App/PackageReleaseNotes.txt (1)
Learnt from: gimlichael
PR: codebeltnet/xunit#17
File: src/Codebelt.Extensions.Xunit.Hosting/Codebelt.Extensions.Xunit.Hosting.csproj:22-26
Timestamp: 2024-10-09T14:10:40.721Z
Learning: In the `src/Codebelt.Extensions.Xunit.Hosting/Codebelt.Extensions.Xunit.Hosting.csproj` file, only certain .NET 8 packages are available in version 8.0.1, while others remain at 8.0.0, so package versions may differ due to availability.
.nuget/Codebelt.Extensions.Xunit.Hosting/PackageReleaseNotes.txt (1)
Learnt from: gimlichael
PR: codebeltnet/xunit#17
File: src/Codebelt.Extensions.Xunit.Hosting/Codebelt.Extensions.Xunit.Hosting.csproj:22-26
Timestamp: 2024-10-09T14:10:40.721Z
Learning: In the `src/Codebelt.Extensions.Xunit.Hosting/Codebelt.Extensions.Xunit.Hosting.csproj` file, only certain .NET 8 packages are available in version 8.0.1, while others remain at 8.0.0, so package versions may differ due to availability.
.nuget/Codebelt.Extensions.Xunit.Hosting.AspNetCore/PackageReleaseNotes.txt (1)
Learnt from: gimlichael
PR: codebeltnet/xunit#17
File: src/Codebelt.Extensions.Xunit.Hosting/Codebelt.Extensions.Xunit.Hosting.csproj:22-26
Timestamp: 2024-10-09T14:10:40.721Z
Learning: In the `src/Codebelt.Extensions.Xunit.Hosting/Codebelt.Extensions.Xunit.Hosting.csproj` file, only certain .NET 8 packages are available in version 8.0.1, while others remain at 8.0.0, so package versions may differ due to availability.
🧬 Code Graph Analysis (3)
src/Codebelt.Extensions.Xunit.Hosting.AspNetCore/WebHostFixtureExtensions.cs (1)
src/Codebelt.Extensions.Xunit.Hosting/GenericHostFixtureExtensions.cs (1)
  • HasValidState (17-21)
src/Codebelt.Extensions.Xunit.Hosting.AspNetCore/ManagedWebHostFixture.cs (1)
src/Codebelt.Extensions.Xunit.Hosting.AspNetCore/WebMinimalHostFixtureExtensions.cs (1)
  • HasValidState (18-22)
src/Codebelt.Extensions.Xunit.Hosting/ManagedHostFixture.cs (1)
src/Codebelt.Extensions.Xunit.Hosting.AspNetCore/WebMinimalHostFixtureExtensions.cs (1)
  • HasValidState (18-22)
🪛 LanguageTool
CHANGELOG.md

[uncategorized] ~23-~23: You might be missing the article “the” here.
Context: ...it.Hosting.AspNetCore namespace to exit ConfigureHost method if the fixture is not in a valid...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)

.nuget/Codebelt.Extensions.Xunit.Hosting.AspNetCore/PackageReleaseNotes.txt

[uncategorized] ~8-~8: You might be missing the article “the” here.
Context: ...it.Hosting.AspNetCore namespace to exit ConfigureHost method if the fixture is not in a valid...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)

🪛 markdownlint-cli2 (0.17.2)
CHANGELOG.md

17-17: Bare URL used
null

(MD034, no-bare-urls)

🪛 GitHub Check: codecov/patch
src/Codebelt.Extensions.Xunit.Hosting/XunitTestLogger.cs

[warning] 48-49: src/Codebelt.Extensions.Xunit.Hosting/XunitTestLogger.cs#L48-L49
Added lines #L48 - L49 were not covered by tests


[warning] 51-51: src/Codebelt.Extensions.Xunit.Hosting/XunitTestLogger.cs#L51
Added line #L51 was not covered by tests

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: call-codeql / 🛡️ Security Analysis
  • GitHub Check: call-sonarcloud / 🔬 Code Quality Analysis
🔇 Additional comments (13)
.github/workflows/pipelines.yml (1)

30-30: LGTM: Consistent workflow dependency upgrades.

The upgrade from @v1 to @v2 for all reusable workflows is well-executed and consistent across build, pack, test, and deploy jobs. This should provide access to improved features and compatibility.

Also applies to: 44-44, 57-57, 92-92

testenvironments.json (1)

12-12:

✅ Verification successful

Verify the updated Docker image exists and maintains compatibility.

The removal of the "mono-" prefix from the Docker image tag suggests a change from Mono runtime to native .NET runtime. Please ensure the new image gimlichael/ubuntu-testrunner:net8.0.409-9.0.300 exists and maintains compatibility with your test suite.


🏁 Script executed:

#!/bin/bash
# Description: Verify the Docker image exists and can be pulled successfully
# Expected: Image should be available and pullable

echo "Checking if Docker image exists and is accessible..."
docker pull gimlichael/ubuntu-testrunner:net8.0.409-9.0.300

echo "Comparing with previous image (if available)..."
docker pull gimlichael/ubuntu-testrunner:mono-net8.0.409-9.0.300 2>/dev/null || echo "Previous mono image not available locally"

Length of output: 538


🏁 Script executed:

#!/bin/bash
# Verify existence of Docker tags via Docker Registry HTTP API

echo "Retrieving Docker Hub token..."
TOKEN=$(curl -fs 'https://auth.docker.io/token?service=registry.docker.io&scope=repository:gimlichael/ubuntu-testrunner:pull' \
  | grep -o '"token":"[^"]*"' \
  | sed 's/"token":"\([^"]*\)"/\1/')
if [ -z "$TOKEN" ]; then
  echo "❌ Failed to retrieve auth token."
  exit 1
fi

# Check new image tag
echo "Checking tag net8.0.409-9.0.300..."
STATUS_NET=$(curl -fs -o /dev/null -w '%{http_code}' \
  -H "Authorization: Bearer $TOKEN" \
  -H "Accept: application/vnd.docker.distribution.manifest.v2+json" \
  https://registry-1.docker.io/v2/gimlichael/ubuntu-testrunner/manifests/net8.0.409-9.0.300)
echo "→ net8.0.409-9.0.300 HTTP status: $STATUS_NET"

# Check previous mono image tag
echo "Checking tag mono-net8.0.409-9.0.300..."
STATUS_MONO=$(curl -fs -o /dev/null -w '%{http_code}' \
  -H "Authorization: Bearer $TOKEN" \
  -H "Accept: application/vnd.docker.distribution.manifest.v2+json" \
  https://registry-1.docker.io/v2/gimlichael/ubuntu-testrunner/manifests/mono-net8.0.409-9.0.300)
echo "→ mono-net8.0.409-9.0.300 HTTP status: $STATUS_MONO"

# Interpret results
if [ "$STATUS_NET" -eq 200 ]; then
  echo "✅ New image exists."
else
  echo "❌ New image not found or inaccessible."
fi

if [ "$STATUS_MONO" -eq 200 ]; then
  echo "ℹ️ Previous mono image still exists."
else
  echo "ℹ️ Previous mono image not found."
fi

Length of output: 12004


Docker image tags verified – both net8.0.409-9.0.300 and mono-net8.0.409-9.0.300 exist on Docker Hub (HTTP 200).
No further changes to testenvironments.json are needed; proceed with the net8.0.409-9.0.300 image and ensure your test suite is green against the native .NET runtime variant.

Directory.Packages.props (1)

11-11:

✅ Verification successful

LGTM: Standard test SDK upgrade.

The upgrade to Microsoft.NET.Test.Sdk version 17.14.0 is a minor version increment that should maintain compatibility while providing bug fixes and improvements.


🌐 Web query:

What are the changes and improvements in Microsoft.NET.Test.Sdk version 17.14.0 compared to 17.13.0?

💡 Result:

The release notes for Microsoft.NET.Test.Sdk version 17.14.0-preview-25107-01 indicate several key changes and improvements compared to version 17.13.0:

  • .NET Version Updates: This release upgrades support to .NET 8 and .NET 9. Projects targeting .NET 6.0 or other end-of-life frameworks should either update to .NET 8 or newer or pin their Microsoft.NET.Test.Sdk version to 17.13.0. (newreleases.io)

  • UWP .NET 9 Support: Introduces a process query flag to support UWP applications targeting .NET 9. (newreleases.io)

  • WinUI and UWP .NET 9 Fixes: Addresses build issues for WinUI and UWP projects targeting .NET 9. (newreleases.io)

  • Test Discovery Improvements: Fixes an issue where communication errors were reported during test discovery aborts. (newreleases.io)

  • VSIX Enhancements: Adds a dump minitool to the VSIX package for improved diagnostics. (newreleases.io)

These updates aim to enhance compatibility with newer .NET versions, improve support for UWP and WinUI projects, and provide better diagnostic tools for test execution.

Citations:


🏁 Script executed:

#!/bin/bash
echo "Listing target frameworks across all .csproj files:"
rg --glob '*.csproj' '<TargetFramework' -n

Length of output: 616


Approve upgrade: Microsoft.NET.Test.Sdk 17.14.0 aligns with project frameworks

Projects in this repo target net8.0 and net9.0 (see .csproj files), and the 17.14.0 release adds first-class support and fixes for .NET 8/.NET 9, UWP and WinUI projects, plus diagnostics improvements. No compatibility issues expected.

– No changes required.

.nuget/Codebelt.Extensions.Xunit/PackageReleaseNotes.txt (1)

1-6: LGTM! Version update follows established format.

The new version 10.0.2 entry is properly formatted and accurately documents the dependency upgrades as intended for this release.

.nuget/Codebelt.Extensions.Xunit.App/PackageReleaseNotes.txt (1)

1-7: LGTM! Consistent version update across packages.

The new version 10.0.2 entry maintains consistency with the main package and properly documents the dependency upgrades for this coordinated release.

src/Codebelt.Extensions.Xunit.Hosting/GenericHostFixtureExtensions.cs (2)

15-15: LGTM! Documentation updated to reflect simplified validation logic.

The XML documentation correctly reflects the removal of the Host property check from the validation criteria, maintaining accuracy between documentation and implementation.


19-21: LGTM! Simplified validation logic aligns with PR objectives.

The implementation correctly validates only the essential callback properties, supporting the early exit guards in ConfigureHost methods to prevent invalid state configurations.

src/Codebelt.Extensions.Xunit.Hosting.AspNetCore/WebHostFixtureExtensions.cs (1)

19-21: LGTM! Implementation correctly simplified to focus on essential validation.

The validation logic properly delegates to the base HasValidState method and adds the web-specific ConfigureApplicationCallback check, aligning with the overall simplification strategy.

src/Codebelt.Extensions.Xunit.Hosting.AspNetCore/ManagedWebHostFixture.cs (1)

77-77: Explicit delegate invocation is consistent.

The explicit Invoke call on the ConfigureApplicationCallback delegate is good practice and ensures clarity about the delegate execution.

.nuget/Codebelt.Extensions.Xunit.Hosting/PackageReleaseNotes.txt (1)

1-13: Release notes accurately document the changes.

The version 10.0.2 release notes correctly document the bug fixes and improvements implemented in the source code files. The descriptions of the ManagedHostFixture early exit fix and the HasValidState method changes align with the actual code modifications.

CHANGELOG.md (1)

10-24: Changelog entry accurately documents version 10.0.2 changes.

The changelog entry properly follows the Keep a Changelog format and accurately documents the bug fixes and improvements. The content is consistent with the release notes and reflects the actual code changes made.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~23-~23: You might be missing the article “the” here.
Context: ...it.Hosting.AspNetCore namespace to exit ConfigureHost method if the fixture is not in a valid...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)

🪛 markdownlint-cli2 (0.17.2)

17-17: Bare URL used
null

(MD034, no-bare-urls)

.nuget/Codebelt.Extensions.Xunit.Hosting.AspNetCore/PackageReleaseNotes.txt (2)

1-2: Release notes version updated correctly
The version bump to 10.0.2 and supported TFMs (.NET 9 and .NET 8) aligns with the PR objectives.


5-5: Dependency upgrade note is clear
The description of upgraded dependencies for all supported TFMs accurately reflects the changes.

- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs)

# Bug Fixes
- FIXED ManagedWebHostFixture class in the Codebelt.Extensions.Xunit.Hosting.AspNetCore namespace to exit ConfigureHost method if the fixture is not in a valid state (e.g., configuration delegate properties are null)
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Missing release note for ConfigureApplicationCallback invocation change
The PR summary and changelog mention switching to explicit Invoke syntax for ConfigureApplicationCallback, but this isn’t documented here. Please add an entry under Improvements to cover that change.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~8-~8: You might be missing the article “the” here.
Context: ...it.Hosting.AspNetCore namespace to exit ConfigureHost method if the fixture is not in a valid...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)

🤖 Prompt for AI Agents
In .nuget/Codebelt.Extensions.Xunit.Hosting.AspNetCore/PackageReleaseNotes.txt
at line 8, add a new entry under the Improvements section to document the change
to using explicit Invoke syntax for ConfigureApplicationCallback. This entry
should clearly state that the ConfigureApplicationCallback invocation was
updated to use explicit Invoke calls, reflecting the PR summary and changelog
accurately.

@gimlichael gimlichael merged commit 956a241 into main Jun 1, 2025
0 of 3 checks passed
@gimlichael gimlichael deleted the v10.0.2/minor-fixes branch June 1, 2025 21:12
@coderabbitai coderabbitai bot mentioned this pull request Jun 15, 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