fix: do not spam the log with checksum related INFO messages when downloading using transfer_manager by rafalh · Pull Request #1357 · googleapis/python-storage

@product-auto-label bot added size: xs

Pull request size is extra small.

api: storage

Issues related to the googleapis/python-storage API.

labels

Oct 2, 2024

@rafalh rafalh changed the title Fix checksum related INFO messages spamming the log when downloading … Fix checksum related INFO messages spamming the log when downloading using transfer_manager

Oct 2, 2024

@rafalh rafalh changed the title Fix checksum related INFO messages spamming the log when downloading using transfer_manager fix: do not spam the log with checksum related INFO messages when downloading using transfer_manager

Oct 2, 2024

@rafalh rafalh marked this pull request as ready for review

October 2, 2024 10:44

cojenco

@rafalh

…nloading using transfer_manager

`download_chunks_concurrently` function does not allow to set `checksum` field in `download_kwargs`. It also does not set it on its own so it takes the default value of `"md5"` (see `Blob._prep_and_do_download`). Because ranged downloads do not return checksums it results in a lot of INFO messages (tens/hundreds):
```
INFO google.resumable_media._helpers - No MD5 checksum was returned from the service while downloading ...
(which happens for composite objects), so client-side content integrity checking is not being performed.
```
To fix it set the `checksum` field to `None` which means no checksum checking for individual chunks. Note that `transfer_manager` has its own checksum checking logic (enabled by `crc32c_checksum` argument)

@rafalh