paketo-buildpacks / libpak

An opinionated extension to the libcnb Cloud Native Buildpack Library
Apache License 2.0
15 stars 17 forks source link

Only rely on shasum for dependency cache hit #266

Closed c0d1ngm0nk3y closed 1 year ago

c0d1ngm0nk3y commented 1 year ago

fixes #233, like proposed here, let's do this change in the next major update. It is not breaking, but it will change the behaviour in a subtle way. Before, it was possible that the very same dependency was downloaded again.

Summary

When checking if some dependency can be reused, it should be enough to check the shasum. There is no need to verify that the metadata is the same (the binary is).

Use Cases

This caused cache misses when the metadata was different (e.g. DeprecationDate).

Checklist

anthonydahanne commented 1 year ago

hello @c0d1ngm0nk3y I just noticed your PR, and unfortunately I previously merged a significant change in release-2.x : https://github.com/paketo-buildpacks/libpak/pull/265

Can you please rebase on top of release-2.x please? Thank you!

c0d1ngm0nk3y commented 1 year ago

I have updated the branch. Any comments?