Skip to content

Commit 0ed19d7

Browse files
committed
Decrease coupling between services
Previously, the different services had many unnesscary dependencies, such as the database cannot run without cleanup, and that the it cannot accept BEP uploads without starting the gRPC BES server, and Graphql API. This change removes many unnesscary dependencies and decreases the coupling between different services. Some of the changes: - Reorganizes bb_portal.proto - Moves the database and database cleanup configuration to its own top level configuration. - Separate BES/BEP uploading and the Graphql API into two different services. - Replace instanceNameAuthorizer with individual authorizers for each service and blob access. - Make it possible to - not serve the frontend - not serve the graphql api - run without database cleanup - run without a http server - run without the BES gRPC server - run database cleanup without the BES
1 parent ba8e3f4 commit 0ed19d7

33 files changed

Lines changed: 1142 additions & 724 deletions

File tree

cmd/bb_portal/BUILD.bazel

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,34 @@ go_library(
77
importpath = "github.com/buildbarn/bb-portal/cmd/bb_portal",
88
visibility = ["//visibility:private"],
99
deps = [
10+
"//ent/gen/ent/migrate",
1011
"//ent/gen/ent/runtime",
12+
"//internal/api/http/graphql_api_service",
1113
"//internal/api/http/zstdmiddleware",
1214
"//internal/bep",
15+
"//internal/database",
16+
"//internal/database/common",
17+
"//internal/database/dbcleanupservice",
1318
"//pkg/frontend",
1419
"//pkg/grpcweb/blobstoreservice",
1520
"//pkg/grpcweb/schedulerservice",
21+
"//pkg/prometheus_metrics",
1622
"//pkg/proto/configuration/bb_portal",
23+
"@com_github_buildbarn_bb_storage//pkg/auth",
1724
"@com_github_buildbarn_bb_storage//pkg/auth/configuration",
25+
"@com_github_buildbarn_bb_storage//pkg/blobstore",
26+
"@com_github_buildbarn_bb_storage//pkg/blobstore/configuration",
27+
"@com_github_buildbarn_bb_storage//pkg/clock",
28+
"@com_github_buildbarn_bb_storage//pkg/digest",
1829
"@com_github_buildbarn_bb_storage//pkg/global",
30+
"@com_github_buildbarn_bb_storage//pkg/grpc",
1931
"@com_github_buildbarn_bb_storage//pkg/http/server",
2032
"@com_github_buildbarn_bb_storage//pkg/program",
2133
"@com_github_buildbarn_bb_storage//pkg/util",
2234
"@com_github_buildbarn_bb_storage//pkg/zstd",
2335
"@io_opentelemetry_go_contrib_instrumentation_net_http_otelhttp//:otelhttp",
2436
"@io_opentelemetry_go_otel//:otel",
37+
"@io_opentelemetry_go_otel_trace//:trace",
2538
"@org_golang_google_grpc//codes",
2639
"@org_golang_google_grpc//status",
2740
],

0 commit comments

Comments
 (0)