feat(server): Reimplement creation & uploading of layers

The new build process can now call out to Nix to create layers and
upload them to the bucket if necessary.

The layer cache is populated, but not yet used.
This commit is contained in:
Vincent Ambo 2019-09-30 17:40:01 +01:00 committed by Vincent Ambo
parent 61269175c0
commit 87e196757b
3 changed files with 258 additions and 95 deletions

View file

@ -328,7 +328,7 @@ func dominate(budget int, graph *simple.DirectedGraph) []Layer {
// GroupLayers applies the algorithm described above the its input and returns a
// list of layers, each consisting of a list of Nix store paths that it should
// contain.
func GroupLayers(refs *RuntimeGraph, pop *Popularity, budget int) []Layer {
func Group(refs *RuntimeGraph, pop *Popularity, budget int) []Layer {
graph := buildGraph(refs, pop)
return dominate(budget, graph)
}