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 7 commits into
Conversation
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.
8f04997 to
05aba49
Compare
0065855 to
292550e
Compare
9c3b5d0 to
89a6ab5
Compare
89a6ab5 to
1372076
Compare
…oogleapis#8982) 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: - [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/{{metadata['repo']['name']}}/issues) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) Fixes googleapis#8829 --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…onfig interface properties (googleapis#8782) 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: - [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/{{metadata['repo']['name']}}/issues) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) Fixes googleapis#7352 --------- Co-authored-by: Dhriti07 <56169283+Dhriti07@users.noreply.github.com>
…event resource leaks
…ream override in tests
…estruction in upload flow
38b85a9 to
94037d4
Compare
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> 🦕