fix(storage): destroy local read stream on upload write failure to prevent resource leaks#25
fix(storage): destroy local read stream on upload write failure to prevent resource leaks#25thiyaguk09 wants to merge 12 commits into
Conversation
…event resource leaks
There was a problem hiding this comment.
Code Review
This pull request updates the bucket upload logic to ensure that the local read stream is explicitly destroyed if a read or write error occurs, and adds a corresponding unit test to verify this behavior. The review feedback suggests destroying the writable stream on read errors to prevent resource leaks, asserting that the read stream is defined in the test before checking its destroyed state, and resetting the mock override in an afterEach hook to avoid test pollution.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
…ream override in tests
…estruction in upload flow
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #<issue_number_goes_here> 🦕