Skip to content

fix: Do not set console buffer width (ConsoleLogger)#1623

Merged
HofmeisterAn merged 2 commits intodevelopfrom
bugfix/do-not-set-console-buffer-width
Jan 17, 2026
Merged

fix: Do not set console buffer width (ConsoleLogger)#1623
HofmeisterAn merged 2 commits intodevelopfrom
bugfix/do-not-set-console-buffer-width

Conversation

@HofmeisterAn
Copy link
Copy Markdown
Collaborator

@HofmeisterAn HofmeisterAn commented Jan 17, 2026

What does this PR do?

It looks like setting the console buffer width can cause issues in some environments, and according to the docs, using this API is not recommended. I no longer remember why we added it. I ran a few simple tests and didn't encounter any obvious issues, so I think it's safe to remove it to avoid potential problems.

Why is it important?

-

Related issues

Summary by CodeRabbit

  • Refactor
    • Simplified console logger implementation by removing Windows-specific buffer width handling.
    • Updated internal documentation formatting.

✏️ Tip: You can customize this high-level summary in your review settings.

@HofmeisterAn HofmeisterAn added the bug Something isn't working label Jan 17, 2026
@netlify
Copy link
Copy Markdown

netlify bot commented Jan 17, 2026

Deploy Preview for testcontainers-dotnet ready!

Name Link
🔨 Latest commit ae605a8
🔍 Latest deploy log https://app.netlify.com/projects/testcontainers-dotnet/deploys/696b50a4dceccd00089196de
😎 Deploy Preview https://deploy-preview-1623--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
Copy Markdown

coderabbitai bot commented Jan 17, 2026

Walkthrough

The ConsoleLogger class was modified to remove problematic Windows-specific buffer width adjustment that was interfering with Microsoft Testing Platform output. The unnecessary System.Runtime.InteropServices dependency was removed, and documentation comments were updated.

Changes

Cohort / File(s) Summary
ConsoleLogger bug fix
src/Testcontainers/Logger.cs
Removed Console.BufferWidth adjustment that was causing output distortion in Microsoft Testing Platform; removed unused System.Runtime.InteropServices directive; updated documentation comments with formatting tags.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A buffer too wide caused display to break,
So out came the offending line we'd make—
Now platforms dance in harmony so true,
No skewing, no chaos, just clean output through! 🌟

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
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 (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: removing console buffer width setting from ConsoleLogger.
Description check ✅ Passed The description covers the WHAT and includes a related issue link, but the WHY section is incomplete (marked with a dash) and testing instructions are missing.
Linked Issues check ✅ Passed The PR fully addresses the objective from issue #1620 by removing the Console.BufferWidth assignment that was causing output skewing in Microsoft Testing Platform.
Out of Scope Changes check ✅ Passed All changes are directly related to the stated objective: removing console buffer width handling and the associated using directive are within scope of issue #1620.

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

✨ 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

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

@HofmeisterAn HofmeisterAn merged commit f56b58b into develop Jan 17, 2026
82 checks passed
@HofmeisterAn HofmeisterAn deleted the bugfix/do-not-set-console-buffer-width branch January 17, 2026 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: ConsoleLogger skews Microsoft Testing Platform output

1 participant