about summary refs log tree commit diff
path: root/tools/nixery/server
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2019-10-03T21·13+0100
committerVincent Ambo <github@tazj.in>2019-10-03T21·50+0100
commit9bb6d0ae255c1340fe16687d740fad948e6a9335 (patch)
tree9fc2538e38757609c3c90ab6e1485bde40e6678a /tools/nixery/server
parent48a5ecda97e4b2ea9faa2d3031376078ccc301be (diff)
fix(server): Ensure build cache objects are written to GCS
Cache writes might not be flushed without this call.
Diffstat (limited to 'tools/nixery/server')
-rw-r--r--tools/nixery/server/builder/cache.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/nixery/server/builder/cache.go b/tools/nixery/server/builder/cache.go
index 060ed9a84b13..b3b9dffab7d3 100644
--- a/tools/nixery/server/builder/cache.go
+++ b/tools/nixery/server/builder/cache.go
@@ -213,4 +213,9 @@ func cacheLayer(ctx context.Context, s *State, key string, entry manifest.Entry)
 		log.Printf("failed to cache build '%s': %s\n", key, err)
 		return
 	}
+
+	if err = w.Close(); err != nil {
+		log.Printf("failed to cache build '%s': %s\n", key, err)
+		return
+	}
 }