#What are the drawbacks of using export cache with dagger?

1 messages ยท Page 1 of 1 (latest)

burnt atlas
#

Mostly for security reasons, we are unable to adopt your cloud cache for now.
On another help question i was asking about pre-warming the engine.

Reading the discord i see a lot of comments about how export cache / buildkit layer cache has too many issues to be a really good solution.

Are you guys able to sort of enumerate them here? Would help save me some time investigating.

Im aware of the lack of cache volume support - wondering what else i might run into.

Thanks!

fervent holly
burnt atlas
#

Sounds like

  • operational / configuration complexity
  • less continuous / incremental - comapred with dagger cache which is continuously working
  • doesnt work with cache volume mounts - becasue of this cant depend on it reuse incremental cache outputs, which effectively means things are getting rebuilt from scratch a lot more than you would like
#

Anything else would you say?

fervent holly
#
  • default buildkit cache exporters are synchronous and blocking (non lazy)
#

cc @brisk wharf not sure if we're missing anything else here

brisk wharf
#

The above are the major points ๐Ÿ‘

Only other I'd add is that dagger cloud cache includes base image layers, git sources (i.e. Directory objects created by our Git apis), and http sources (i.e. File objects created by our HTTP api), but upstream buildkit remote cache currently doesn't.

For some use cases, this can make a difference since the cache service is often closer+faster than the places those image/git/http sources were originally pulled from. But this is relatively minor compared to the above points.

burnt atlas
#

Awesome thank you guys

wind echo
brisk wharf
# wind echo out of curiosity - was discussing this with <@336241811179962368>, i don't actua...

It's that buildkit explicitly doesn't do it right now. When I talked to Tonis about it most recently he said he wasn't sure if discluding images was the right call, but that's the behavior currently (unless anything changed recently). I believe the behavior is enforced by buildkit somewhere around here: https://github.com/sipsma/buildkit/blob/e08224fa5567ad24f66b5ed6ead04c5c318ec86e/solver/exporter.go#L59-L59

But I can't remember exactly where and that code is extremely dense to sift through

#

Mainly due to the fact that we want engine-wide cache exports that run in the background independent of a single client session, but the fact that we can choose to include images/git sources was a nice side effect

wind echo
#

agh i was expecting it might be something like that lol - i was hoping for a nice little "oh just switch this option off/on"

brisk wharf
wind echo
#

Ah, no it was more just relevant in me trying to understand caching differences between the remote buildkit exporters and the cloud caching ๐Ÿ˜„

#

if ExportRoots is set, then the Sources get exported

brisk wharf
#

Ohh right but IIRC that's only used for provenance, not exposed to be usable for cache

#

(again, unless something changed recently)

wind echo
#

no i think that's right, all the magic here is just doing the incredibly complicated if len(deps) > 0 (a check we don't have)

#

๐ŸŽ‰ my question answered (thankssssss โค๏ธ)