Skip to content

Commit

Permalink
cmd/coordinator: switch to UBA on snapshots and logs
Browse files Browse the repository at this point in the history
I'm enabling UBA on go-build-log and go-build-snapshots, at which point
setting per-object ACLs will fail.

For golang/go#53890.

Change-Id: I9fe0d423146daedcc71b88ba03d035404279bb58
Reviewed-on: https://go-review.googlesource.com/c/build/+/418793
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Heschi Kreinick <heschi@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
  • Loading branch information
heschi committed Jul 22, 2022
1 parent cb3e08c commit 9ed544e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
2 changes: 0 additions & 2 deletions cmd/coordinator/buildstatus.go
Expand Up @@ -25,7 +25,6 @@ import (
"time"

"cloud.google.com/go/errorreporting"
"cloud.google.com/go/storage"
"go4.org/syncutil"
"golang.org/x/build/buildenv"
"golang.org/x/build/buildlet"
Expand Down Expand Up @@ -894,7 +893,6 @@ func (st *buildStatus) writeSnapshot(bc buildlet.Client) (err error) {
}
wr := sc.Bucket(bucket).Object(st.SnapshotObjectName()).NewWriter(ctx)
wr.ContentType = "application/octet-stream"
wr.ACL = append(wr.ACL, storage.ACLRule{Entity: storage.AllUsers, Role: storage.RoleReader})
if n, err := io.Copy(wr, tgz); err != nil {
st.logf("failed to write snapshot to GCS after copying %d bytes: %v", n, err)
return err
Expand Down
4 changes: 0 additions & 4 deletions cmd/coordinator/coordinator.go
Expand Up @@ -2025,10 +2025,6 @@ func newBuildLogBlob(objName string) (obj io.WriteCloser, url_ string) {

wr := pool.NewGCEConfiguration().StorageClient().Bucket(bucket).Object(objName).NewWriter(context.Background())
wr.ContentType = "text/plain; charset=utf-8"
wr.ACL = append(wr.ACL, storage.ACLRule{
Entity: storage.AllUsers,
Role: storage.RoleReader,
})

return wr, fmt.Sprintf("https://storage.googleapis.com/%s/%s", bucket, objName)
}
Expand Down

0 comments on commit 9ed544e

Please sign in to comment.