overture-stack / score

Secure Cloud Object REsource: file transfer microservice
https://www.overture.bio/products/score
GNU Affero General Public License v3.0
18 stars 10 forks source link

Commiting fix related to Download of an ObjectId with/without .meta files #400

Closed Azher2Ali closed 1 month ago

Azher2Ali commented 1 month ago

When processing an objectid without the presence of .meta file, the method retrieves a .meta file which is null, leading to a different execution flow compared to other objectids with a present .meta file. Previously, if objectSpec was null, the service did not handle it effectively, leading to issues. Additionally, an exception for "Id not found" is thrown when the .meta file is missing, but this is now caught and handled by returning null instead of causing a service failure. Also,after receving suggestions from @jmimico, the significant change here is the mapping of the object’s MD5 hash to the ETag. ETag values in S3 are often used to determine object integrity and may represent MD5 hashes.

jmimico commented 1 month ago

It's important to note however that for larger files where multipart uploads were used, the Etag may add a "-partnumberX" to the Etag md5 string. This probably wont be a problem with small files that just have the md5 as a string for the etag but might show up (depending on string matching) for larger files.

Azher2Ali commented 1 month ago

It's important to note however that for larger files where multipart uploads were used, the Etag may add a "-partnumberX" to the Etag md5 string. This probably wont be a problem with small files that just have the md5 as a string for the etag but might show up (depending on string matching) for larger files.

Noted, I did come across that while referring to multipart uploads.