Skip to content

docs: Explain immutable builder behavior#1693

Merged
HofmeisterAn merged 1 commit into
developfrom
feature/doc-builder-immutability
May 22, 2026
Merged

docs: Explain immutable builder behavior#1693
HofmeisterAn merged 1 commit into
developfrom
feature/doc-builder-immutability

Conversation

@HofmeisterAn

@HofmeisterAn HofmeisterAn commented May 22, 2026

Copy link
Copy Markdown
Collaborator

What does this PR do?

Occasionally, developers run into misunderstandings about how the fluent builder API in Testcontainers works. Testcontainers builders are immutable. Every builder method returns a new instance that includes the updated configuration, while the existing builder instance remains unchanged.

Why is it important?

To make this behavior clearer and more explicit for developers, this PR documents it.

Related issues

Summary by CodeRabbit

  • Chores

    • Updated MongoDB.Driver dependency to version 3.8.1.
  • Documentation

    • Added new documentation section explaining builder configuration reuse, including examples of deriving multiple containers from a shared base configuration.

Review Change Stack

@HofmeisterAn
HofmeisterAn requested a review from a team as a code owner May 22, 2026 07:27
@HofmeisterAn HofmeisterAn added the documentation Docs, docs, docs. label May 22, 2026
@netlify

netlify Bot commented May 22, 2026

Copy link
Copy Markdown

Deploy Preview for testcontainers-dotnet ready!

Name Link
🔨 Latest commit 7ee83c7
🔍 Latest deploy log https://app.netlify.com/projects/testcontainers-dotnet/deploys/6a1005701027bf00084bd42a
😎 Deploy Preview https://deploy-preview-1693--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

coderabbitai Bot commented May 22, 2026

Copy link
Copy Markdown

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: 4d1bc1ce-d980-4d4c-a6b0-fd4be8ffdf19

📥 Commits

Reviewing files that changed from the base of the PR and between 3e8e1db and 7ee83c7.

📒 Files selected for processing (2)
  • Directory.Packages.props
  • docs/api/create_docker_container.md

Walkthrough

This PR makes two independent updates: bumping MongoDB.Driver to 3.8.1 and adding documentation explaining Testcontainers builder immutability with practical reuse examples.

Changes

Maintenance and Documentation Updates

Layer / File(s) Summary
MongoDB.Driver version bump
Directory.Packages.props
MongoDB.Driver PackageVersion is updated from 3.8.0 to 3.8.1.
Builder immutability documentation
docs/api/create_docker_container.md
New "Reusing builder configurations" section documents builder immutability and provides examples for deriving multiple containers from a shared base builder via chaining and conditional reassignment.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

A little hop through MongoDB's halls,
Version bumps and doc calls—
Builders immutable, reused with care,
Testcontainers tested with rabbit's flair! 🐰

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'docs: explain immutable builder behavior' directly summarizes the main change: documentation added to explain the immutable builder pattern used in Testcontainers.
Description check ✅ Passed The description includes the two mandatory sections ('What does this PR do?' and 'Why is it important?'), the recommended 'Related issues' section, and appropriately omits optional/incomplete sections.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/doc-builder-immutability

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


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.

@HofmeisterAn
HofmeisterAn merged commit 47b6d51 into develop May 22, 2026
154 checks passed
@HofmeisterAn
HofmeisterAn deleted the feature/doc-builder-immutability branch May 22, 2026 08:03
@HofmeisterAn HofmeisterAn changed the title docs: explain immutable builder behavior docs: Explain immutable builder behavior May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Docs, docs, docs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant