cmd/coordinator: don't write truncated snapshots to GCS

Updates golang/go#12671

Change-Id: Ife3354f4a013cbfd9a5e960077adde8406da67ca
Reviewed-on: https://go-review.googlesource.com/14739
Reviewed-by: Glenn Lewis <gmlewis@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Brad Fitzpatrick 2015-09-18 19:24:29 +00:00
Родитель ab3e6dfd6e
Коммит ce74e0b6e0
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -1563,7 +1563,8 @@ func (st *buildStatus) writeSnapshot() error {
wr.ContentType = "application/octet-stream"
wr.ACL = append(wr.ACL, storage.ACLRule{Entity: storage.AllUsers, Role: storage.RoleReader})
if _, err := io.Copy(wr, tgz); err != nil {
wr.Close()
st.logf("failed to write snapshot to GCS: %v", err)
wr.CloseWithError(err)
return err
}