backend/gs: disable GRPC API to reduce binary size bloat

Since cloud.google.com/go/storage v1.44.0 the GRPC API is enabled by
default. However, this causes the restic binary size to explode by 20MB.
So just disable it again.
This commit is contained in:
Michael Eischer
2025-03-24 10:49:59 +01:00
parent 171f303399
commit 2b65ef5710
2 changed files with 11 additions and 7 deletions

View File

@@ -106,7 +106,9 @@ func build(sourceDir, outputDir, goos, goarch string) (filename string) {
}
outputFile := filepath.Join(outputDir, filename)
tags := "selfupdate"
// disable_grpc_modules is necessary to reduce the binary size since cloud.google.com/go/storage v1.44.0
// see https://github.com/googleapis/google-cloud-go/issues/11448
tags := "selfupdate,disable_grpc_modules"
if opts.Tags != "" {
tags += "," + opts.Tags
}