I noticed some strange behavior with fetch_wasabi_file when the user specifies the checksum. If the file is not present, it will download without a problem even if the downloaded file has the wrong checksum. This is because the checksum is never checked. But if you run when the file is already present, it then fails because it compares the checksum. An easy patch for this would be to compare the checksum after downloading the file for the first time, if a checksum is provided by the user.
The relevant part of the code is here:
|
s3.download_file(Bucket=bucket, Key=file, Filename=output) |
I noticed some strange behavior with
fetch_wasabi_filewhen the user specifies the checksum. If the file is not present, it will download without a problem even if the downloaded file has the wrong checksum. This is because the checksum is never checked. But if you run when the file is already present, it then fails because it compares the checksum. An easy patch for this would be to compare the checksum after downloading the file for the first time, if a checksum is provided by the user.The relevant part of the code is here:
cosipy/cosipy/util/data_fetching.py
Line 245 in 6d8a36e