fix: Restore tar archive write performance regressed by padding trim#1719
fix: Restore tar archive write performance regressed by padding trim#1719HofmeisterAn wants to merge 3 commits into
Conversation
✅ Deploy Preview for testcontainers-dotnet ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
WalkthroughRemoves the explicit ChangesTarBlockFactor cleanup and documentation
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/Testcontainers/TarArchiveDefaults.cs`:
- Line 7: The comment in TarArchiveDefaults should be corrected to reflect the
actual padding size produced by the default factor. Update the wording around
the trailing zeros calculation so it states that a factor of 20 corresponds to
20 × 512 bytes, which is about 10 KB, not ~8 KB, and keep the explanation
aligned with the TarArchiveDefaults constant or related padding logic.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 404da95a-de65-4e21-bb7a-e91a46fe6206
📒 Files selected for processing (2)
src/Testcontainers/Images/DockerfileArchive.cssrc/Testcontainers/TarArchiveDefaults.cs
|
Thanks 👍 |
What does this PR do?
The block factor of 1 introduced to fix the Podman EPIPE race (podman-container-tools/buildah#6678) was inadvertently applied to the Dockerfile build context path (
DockerfileArchive), which writes to a FileStream on disk. At a block factor of 1, SharpZipLib flushes on every 512-byte block, significantly degrading image build performance./cc @Rob-Hague @artiomchi
Why is it important?
-
Related issues
Summary by CodeRabbit
Bug Fixes
Documentation
1is recommended to avoid padding-related issues that can surface as broken-pipe errors, and cautioned against using the setting for Dockerfile build context due to performance impact.