Skip to content

Commit

Permalink
Remove the HTTP backend
Browse files Browse the repository at this point in the history
The HTTP backend was mainly of use to talk to bazel-remote, but as far
as I know, that also supports gRPC perfectly fine nowadays. There is
absolutely no reason to prefer HTTP over gRPC. The latter supports doing
bulk existence checks, querying capabilities, while the former does not.
  • Loading branch information
EdSchouten committed Oct 8, 2023
1 parent ba53c0a commit def1579
Show file tree
Hide file tree
Showing 5 changed files with 677 additions and 924 deletions.
1 change: 0 additions & 1 deletion pkg/blobstore/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ go_library(
"existence_caching_blob_access.go",
"fsac_read_buffer_factory.go",
"hierarchical_instance_names_blob_access.go",
"http_blob_access.go",
"icas_read_buffer_factory.go",
"iscc_read_buffer_factory.go",
"metrics_blob_access.go",
Expand Down
18 changes: 0 additions & 18 deletions pkg/blobstore/configuration/new_blob_access.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package configuration
import (
"archive/zip"
"context"
"net/http"
"os"
"sync"
"time"
Expand All @@ -20,7 +19,6 @@ import (
"github.com/buildbarn/bb-storage/pkg/eviction"
"github.com/buildbarn/bb-storage/pkg/filesystem"
"github.com/buildbarn/bb-storage/pkg/grpc"
bb_http "github.com/buildbarn/bb-storage/pkg/http"
"github.com/buildbarn/bb-storage/pkg/program"
pb "github.com/buildbarn/bb-storage/pkg/proto/configuration/blobstore"
digest_pb "github.com/buildbarn/bb-storage/pkg/proto/configuration/digest"
Expand Down Expand Up @@ -85,22 +83,6 @@ func (nc *simpleNestedBlobAccessCreator) newNestedBlobAccessBare(configuration *
BlobAccess: readcaching.NewReadCachingBlobAccess(slow.BlobAccess, fast.BlobAccess, replicator),
DigestKeyFormat: slow.DigestKeyFormat,
}, "read_caching", nil
case *pb.BlobAccessConfiguration_Http:
roundTripper, err := bb_http.NewRoundTripperFromConfiguration(backend.Http.Client)
if err != nil {
return BlobAccessInfo{}, "", util.StatusWrap(err, "Failed to create HTTP client")
}
return BlobAccessInfo{
BlobAccess: blobstore.NewHTTPBlobAccess(
backend.Http.Address,
storageTypeName,
readBufferFactory,
&http.Client{
Transport: bb_http.NewMetricsRoundTripper(roundTripper, "HTTPBlobAccess"),
},
creator.GetDefaultCapabilitiesProvider()),
DigestKeyFormat: digest.KeyWithInstance,
}, "remote", nil
case *pb.BlobAccessConfiguration_Sharding:
backends := make([]blobstore.BlobAccess, 0, len(backend.Sharding.Shards))
weights := make([]uint32, 0, len(backend.Sharding.Shards))
Expand Down
122 changes: 0 additions & 122 deletions pkg/blobstore/http_blob_access.go

This file was deleted.

Loading

0 comments on commit def1579

Please sign in to comment.