Skip to content

Commit

Permalink
cmd/upload: delete unused buckets from bucketProject map
Browse files Browse the repository at this point in the history
The upload command doesn't need to track these anymore since they're
no longer used.

Change-Id: I0d96f0cf3572b9f157617ff07e9f3d1496dc4d47
Reviewed-on: https://go-review.googlesource.com/c/build/+/622456
Reviewed-by: Roland Shoemaker <[email protected]>
Reviewed-by: Dmitri Shuralyov <[email protected]>
Auto-Submit: Dmitri Shuralyov <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
  • Loading branch information
dmitshur authored and gopherbot committed Oct 25, 2024
1 parent d28f106 commit 3c7e2cc
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions cmd/upload/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ var (
cacheable = flag.Bool("cacheable", true, "object should be cacheable")
file = flag.String("file", "", "read object from `file` ('-' for stdin)")
verbose = flag.Bool("verbose", false, "verbose logging")
project = flag.String("project", "", "GCE Project. If blank, it's automatically inferred from the bucket name for the common Go buckets.")
project = flag.String("project", "", "GCP Project. If blank, it's automatically inferred from the bucket name for the common Go buckets.")
doGzip = flag.Bool("gzip", false, "gzip the stored contents (not the upload's Content-Encoding); this forces the Content-Type to be application/octet-stream. To prevent misuse, the object name must also end in '.gz'")
extraEnv = flag.String("env", "", "comma-separated list of addition KEY=val environment pairs to include in build environment when building a target to upload")
)
Expand Down Expand Up @@ -60,7 +60,7 @@ func main() {

proj := *project
if proj == "" {
proj, _ = bucketProject[bucket]
proj = bucketProject[bucket]
if proj == "" {
log.Fatalf("bucket %q doesn't have an associated project in upload.go", bucket)
}
Expand Down Expand Up @@ -138,15 +138,12 @@ func main() {
}
}

// bucketProject is a map from bucket name to its Google Cloud Platform project ID.
var bucketProject = map[string]string{
"dev-gccgo-builder-data": "gccgo-dashboard-dev",
"dev-go-builder-data": "go-dashboard-dev",
"gccgo-builder-data": "gccgo-dashboard-builders",
"go-builder-data": "symbolic-datum-552",
"go-build-log": "symbolic-datum-552",
"http2-demo-server-tls": "symbolic-datum-552",
"gobuilder": "999119582588", // deprecated
"golang": "999119582588",
"dev-go-builder-data": "go-dashboard-dev",
"go-builder-data": "symbolic-datum-552",
"go-build-log": "symbolic-datum-552",
"golang": "999119582588",
}

// alreadyUploaded reports whether *file has already been uploaded and the correct contents
Expand Down

0 comments on commit 3c7e2cc

Please sign in to comment.