Please make sure you have searched for information in the following guides.
A screenshot that you have tested with "Try this API".
N/A, the bug is in the client code.
Link to the code that reproduces this issue. A link to a public Github Repository or gist with a minimal reproduction.
https://gist.github.com/MartinKolarik/04bcb1ac4209d3afee62a31667f666d7
A step-by-step description of how to reproduce the issue, based on the linked reproduction.
- Create a large local file.
- Start
bucket.upload.
- Force an early failure (e.g., upload to a bucket without write permissions).
- Delete the local file while the process is alive.
- Check
/proc/<pid>/fd and df/du.
A clear and concise description of what the bug is, and what you expected to happen.
The file descriptor open in bucket.upload remains allocated until the process exists. This causes a small memory leak and prevents the local file from being fully deleted. The relevant code is: https://github.com/googleapis/nodejs-storage/blob/c7004daae0b506eeefc5f4f241d9e3df3589b0e8/src/bucket.ts#L4364-L4379
A clear and concise description WHY you expect this behavior, i.e., was it a recent change, there is documentation that points to this behavior, etc. **
The file descriptor should always be closed when the function finishes.
Please make sure you have searched for information in the following guides.
A screenshot that you have tested with "Try this API".
N/A, the bug is in the client code.
Link to the code that reproduces this issue. A link to a public Github Repository or gist with a minimal reproduction.
https://gist.github.com/MartinKolarik/04bcb1ac4209d3afee62a31667f666d7
A step-by-step description of how to reproduce the issue, based on the linked reproduction.
bucket.upload./proc/<pid>/fdanddf/du.A clear and concise description of what the bug is, and what you expected to happen.
The file descriptor open in
bucket.uploadremains allocated until the process exists. This causes a small memory leak and prevents the local file from being fully deleted. The relevant code is: https://github.com/googleapis/nodejs-storage/blob/c7004daae0b506eeefc5f4f241d9e3df3589b0e8/src/bucket.ts#L4364-L4379A clear and concise description WHY you expect this behavior, i.e., was it a recent change, there is documentation that points to this behavior, etc. **
The file descriptor should always be closed when the function finishes.