fix: close temp file handle before removal #3672
fix: close temp file handle before removal #3672mdelapenya merged 3 commits intotestcontainers:mainfrom
Conversation
On some OS (such as Windows), keeping a file descriptor open prevents you from deleting the file.
On some OS (such as Windows), keeping a file descriptor open prevents you from deleting the file.
✅ Deploy Preview for testcontainers-go ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
Summary by CodeRabbit
WalkthroughBoth the DinD and K3s container image loading modules add explicit closure of temporary image tar files immediately after creation. Each module now checks for close errors and returns a wrapped error before proceeding with file operations. Deferred cleanup remains unchanged. ChangesTemporary File Resource Management
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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 |
mdelapenya
left a comment
There was a problem hiding this comment.
LGTM! I recently saw something similar for other project on Windows, so this makes sense, thanks!
What does this PR do?
When using LoadFile on
dindork3s, the temporary file descriptor is not closed.On some OS (such as windows), this fails upon deletion of the temp file.
Why is it important?
Related issues