bldr icon indicating copy to clipboard operation
bldr copied to clipboard

Changing source does not invalidate cache

Open AlekSi opened this issue 4 years ago • 3 comments

   - sources:
-      - url: https://ftp.gnu.org/gnu/make/make-4.3.tar.gz
+      - url: https://ftp.gnu.org/gnu/make/make-4.4.tar.gz
         destination: make.tar.gz
         sha256: e05fdde47c5f7ca45cb697e973894ff4f5d79e13b750ed57d7b66d8defc78e19
         sha512: 9a1185cc468368f4ec06478b1cfa343bf90b5cd7c92c0536567db0315b0ee909af53ecce3d44cfd93dd137dbca1ed13af5713e8663590c4fdd21ea635d78496b

If make-4.3.tar.gz was previously downloaded, that patch does not trigger a rebuild.

AlekSi avatar Jul 12 '21 14:07 AlekSi

That works as expected, as long as sha256 stays the same (it's the way buildkit caching works)

smira avatar Jul 13 '21 07:07 smira

Yes, I understand now how that works in BuildKit, but that's not "right" and is confusing for users. I wonder if we can do something about that.

AlekSi avatar Jul 13 '21 08:07 AlekSi

Ah, I see what you mean, you "forgot" to update SHA. We could fix it by putting download URL in the download sub-tree, so that it changes from buildkit point of view.

smira avatar Jul 13 '21 12:07 smira