hinshun / ipcs

containerd meets ipfs to distribute content
MIT License
53 stars 3 forks source link

Integrate with buildkit #6

Open hinshun opened 5 years ago

hinshun commented 5 years ago

POC buildkit using ipcs as psuedo-local build cache.

  1. How do define a "cache-miss". For instance, LLB vertex is cacheable with hash sha256:foobar, it's impossible to know if the IPFS network does not have content for that hash. We either traverse the full network, limit hops to certain depth, set a timeout on fetching the content. On a separate topic, can I race a LLB vertex execution to fetching its cache?
AkihiroSuda commented 5 years ago

Execute op and attempt to pull the cache in parallel, and cancel the op if the cache is found?

hinshun commented 5 years ago

Yes exactly, thanks for commenting @AkihiroSuda. I only just started digging through buildkit's cache code, so I'm not that familiar with it yet. For buildkit's containerd worker, does buildkit cache using containerd's content store through its proxy content store? If so, how does the runc worker cache?