Skip to content

chore(examples): Enable NuGet restore lock mode#1659

Merged
HofmeisterAn merged 2 commits intodevelopfrom
feature/add-packages-lock
Mar 11, 2026
Merged

chore(examples): Enable NuGet restore lock mode#1659
HofmeisterAn merged 2 commits intodevelopfrom
feature/add-packages-lock

Conversation

@HofmeisterAn
Copy link
Collaborator

@HofmeisterAn HofmeisterAn commented Mar 11, 2026

What does this PR do?

Enable the NuGet restore lock mode for the WeatherForecast example.

Why is it important?

-

Related issues

-

Summary by CodeRabbit

  • Chores
    • Added NuGet package lock files across projects and enabled locked package restore (build & Docker).
    • Updated UI package and namespace to the newer Fluent UI provider and adjusted project imports.
  • Documentation
    • README updated to require Chrome 145 and note WebDriver includes multiple browsers.
  • Tests
    • Streamlined WebDriver test wait logic for more stable UI tests.

@HofmeisterAn HofmeisterAn added the chore A change that doesn't impact the existing functionality, e.g. internal refactorings or cleanups label Mar 11, 2026
@netlify
Copy link

netlify bot commented Mar 11, 2026

Deploy Preview for testcontainers-dotnet ready!

Name Link
🔨 Latest commit be6a1ef
🔍 Latest deploy log https://app.netlify.com/projects/testcontainers-dotnet/deploys/69b1a5ba5750cd0008369ac5
😎 Deploy Preview https://deploy-preview-1659--testcontainers-dotnet.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link

coderabbitai bot commented Mar 11, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 9b50b29a-6165-47b5-9f46-d068bfb13d1b

📥 Commits

Reviewing files that changed from the base of the PR and between fb6ab04 and be6a1ef.

📒 Files selected for processing (14)
  • examples/WeatherForecast/Directory.Packages.props
  • examples/WeatherForecast/README.md
  • examples/WeatherForecast/src/WeatherForecast.Contexts/packages.lock.json
  • examples/WeatherForecast/src/WeatherForecast.Entities/packages.lock.json
  • examples/WeatherForecast/src/WeatherForecast.Interactors/packages.lock.json
  • examples/WeatherForecast/src/WeatherForecast.Repositories/packages.lock.json
  • examples/WeatherForecast/src/WeatherForecast/Pages/_Layout.cshtml
  • examples/WeatherForecast/src/WeatherForecast/Usings.cs
  • examples/WeatherForecast/src/WeatherForecast/WeatherForecast.csproj
  • examples/WeatherForecast/src/WeatherForecast/_Imports.razor
  • examples/WeatherForecast/src/WeatherForecast/packages.lock.json
  • examples/WeatherForecast/tests/WeatherForecast.InProcess.Tests/packages.lock.json
  • examples/WeatherForecast/tests/WeatherForecast.Tests/WeatherForecastTest.cs
  • examples/WeatherForecast/tests/WeatherForecast.Tests/packages.lock.json
💤 Files with no reviewable changes (1)
  • examples/WeatherForecast/src/WeatherForecast/Pages/_Layout.cshtml
✅ Files skipped from review due to trivial changes (1)
  • examples/WeatherForecast/README.md
🚧 Files skipped from review as they are similar to previous changes (3)
  • examples/WeatherForecast/src/WeatherForecast/packages.lock.json
  • examples/WeatherForecast/src/WeatherForecast.Entities/packages.lock.json
  • examples/WeatherForecast/src/WeatherForecast.Interactors/packages.lock.json

Walkthrough

Adds NuGet lockfile support to the WeatherForecast example: enables RestorePackagesWithLockFile, uses --locked-mode in the Docker restore, generates packages.lock.json files for projects, updates package references/FluentUI namespace, and adjusts a WebDriver test wait usage.

Changes

Cohort / File(s) Summary
Build Configuration
examples/WeatherForecast/Directory.Build.props, examples/WeatherForecast/Dockerfile
Enable lockfile-based restores by setting RestorePackagesWithLockFile=true and passing --locked-mode to dotnet restore.
Generated Lockfiles (projects & tests)
examples/WeatherForecast/src/WeatherForecast/packages.lock.json, examples/WeatherForecast/src/WeatherForecast.Contexts/packages.lock.json, examples/WeatherForecast/src/WeatherForecast.Entities/packages.lock.json, examples/WeatherForecast/src/WeatherForecast.Interactors/packages.lock.json, examples/WeatherForecast/src/WeatherForecast.Repositories/packages.lock.json, examples/WeatherForecast/tests/WeatherForecast.Tests/packages.lock.json, examples/WeatherForecast/tests/WeatherForecast.InProcess.Tests/packages.lock.json
Added packages.lock.json files capturing resolved dependency graphs for net10.0 across app and test projects.
Package/version updates & FluentUI rename
examples/WeatherForecast/Directory.Packages.props, examples/WeatherForecast/src/WeatherForecast/WeatherForecast.csproj, examples/WeatherForecast/src/WeatherForecast/Usings.cs, examples/WeatherForecast/src/WeatherForecast/_Imports.razor
Replaced Microsoft.Fast.Components.FluentUI with Microsoft.FluentUI.AspNetCore.Components, updated Selenium/WebDriver versions in centralized package props, and adjusted global/usings and project PackageReference accordingly.
Layout / README
examples/WeatherForecast/src/WeatherForecast/Pages/_Layout.cshtml, examples/WeatherForecast/README.md
Removed external Fluent UI web components script tag from layout and updated README note about required Chrome/WebDriver version.
Test adjustment
examples/WeatherForecast/tests/WeatherForecast.Tests/WeatherForecastTest.cs
Consolidated WebDriverWait usage: create one wait instance, use it for initial element wait and subsequent waits; added null-forgiving operator on BaseAddress navigation.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇 I hopped through packages, one by one,
I pinned each step beneath the sun,
With locks in place and builds made neat,
Reproducible trails beneath my feet,
A little rabbit’s tidy feat! ✨🔒

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is largely incomplete. While it answers 'What does this PR do?' adequately, the 'Why is it important?' section is empty, and critical sections like 'How to test this PR' and 'Related issues' lack substance or explanation. Add rationale in the 'Why is it important?' section explaining the benefits of lock mode (reproducible builds, security, etc.), and provide testing instructions or clarify if this is a documentation-only change.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: enabling NuGet restore lock mode for the WeatherForecast example project, which aligns with the actual changes shown across configuration files and lock files.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/add-packages-lock

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

Comment @coderabbitai help to get the list of available commands and usage tips.

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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@examples/WeatherForecast/tests/WeatherForecast.InProcess.Tests/packages.lock.json`:
- Around line 534-541: The project has a transitive dependency on
System.Text.Json 7.0.4 (via Microsoft.Fast.Components.FluentUI 3.8.0) which is
vulnerable (CVE-2024-30105); fix by adding an explicit PackageReference for
System.Text.Json version 8.0.4 or later in the project file (override the
transitive version) or, alternatively, upgrade
Microsoft.Fast.Components.FluentUI to a version that itself depends on
System.Text.Json >= 8.0.4; make sure the explicit package reference
xmlns/includes the desired Version="8.0.4" (or higher) to force NuGet to resolve
the safe version.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 4c72e3c7-ac8e-4d43-8df1-bd88e5c56d74

📥 Commits

Reviewing files that changed from the base of the PR and between 4ea44aa and fb6ab04.

📒 Files selected for processing (9)
  • examples/WeatherForecast/Directory.Build.props
  • examples/WeatherForecast/Dockerfile
  • examples/WeatherForecast/src/WeatherForecast.Contexts/packages.lock.json
  • examples/WeatherForecast/src/WeatherForecast.Entities/packages.lock.json
  • examples/WeatherForecast/src/WeatherForecast.Interactors/packages.lock.json
  • examples/WeatherForecast/src/WeatherForecast.Repositories/packages.lock.json
  • examples/WeatherForecast/src/WeatherForecast/packages.lock.json
  • examples/WeatherForecast/tests/WeatherForecast.InProcess.Tests/packages.lock.json
  • examples/WeatherForecast/tests/WeatherForecast.Tests/packages.lock.json

@HofmeisterAn HofmeisterAn merged commit d07629c into develop Mar 11, 2026
11 checks passed
@HofmeisterAn HofmeisterAn deleted the feature/add-packages-lock branch March 11, 2026 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore A change that doesn't impact the existing functionality, e.g. internal refactorings or cleanups

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant