aptly icon indicating copy to clipboard operation
aptly copied to clipboard

Fix broken MD5 hash cache.

Open Melraidin opened this issue 7 months ago • 3 comments

This change fixes issues causing no matches to occur for existing objects at S3 in some cases. This issue caused all versions of a package in a repo to be uploaded again to S3.

Lookups in the cache of file MD5s were failing as the key in the map had its prefix stripped while the key used for the lookup did not have the prefix stripped. This change stops stripping the prefix when building the cache.

Retrieving object MD5s from object metadata (as opposed to the etag that comes with the object list) were failing as the key in the metadata map is now "md5" (all lowercase) vs. "Md5" that was used pre-v2 AWS SDK.

Checklist

  • [ ] unit-test added (if change is algorithm)
  • [ ] functional test added/updated (if change is functional)
  • [ ] man page updated (if applicable)
  • [ ] bash completion updated (if applicable)
  • [ ] documentation updated
  • [ ] author name in AUTHORS

Melraidin avatar Jul 11 '24 20:07 Melraidin