Skip to content

Commit

Permalink
fix(bazel): add missing otel deps & resolve patches
Browse files Browse the repository at this point in the history
  • Loading branch information
noahdietz committed Apr 5, 2024
1 parent b4703da commit cc82d85
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
36 changes: 35 additions & 1 deletion repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -1206,24 +1206,50 @@ def com_googleapis_gapic_generator_go_repositories():
name = "io_opentelemetry_go_contrib_instrumentation_google_golang_org_grpc_otelgrpc",
importpath = "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc",
sum = "h1:P+/g8GpuJGYbOp2tAdKrIPUX9JO02q8Q0YNlHolpibA=",
build_directives = [
"gazelle:resolve go go.opentelemetry.io/otel @io_opentelemetry_go_otel//:go_default_library",
"gazelle:resolve go go.opentelemetry.io/otel/attribute @io_opentelemetry_go_otel//attribute",
"gazelle:resolve go go.opentelemetry.io/otel/codes @io_opentelemetry_go_otel//codes",
"gazelle:resolve go go.opentelemetry.io/otel/metric @io_opentelemetry_go_otel_metric//:go_default_library",
"gazelle:resolve go go.opentelemetry.io/otel/metric/noop @io_opentelemetry_go_otel_metric//noop:go_default_library",
"gazelle:resolve go go.opentelemetry.io/otel/propagation @io_opentelemetry_go_otel//propagation",
"gazelle:resolve go go.opentelemetry.io/otel/semconv/v1.17.0 @io_opentelemetry_go_otel//semconv/v1.17.0:v1_17_0",
"gazelle:resolve go go.opentelemetry.io/otel/trace @io_opentelemetry_go_otel_trace//:go_default_library",
],
version = "v0.48.0",
)
go_repository(
name = "io_opentelemetry_go_contrib_instrumentation_net_http_otelhttp",
importpath = "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp",
build_directives = [
"gazelle:resolve go go.opentelemetry.io/otel @io_opentelemetry_go_otel//:go_default_library",
"gazelle:resolve go go.opentelemetry.io/otel/attribute @io_opentelemetry_go_otel//attribute",
"gazelle:resolve go go.opentelemetry.io/otel/metric @io_opentelemetry_go_otel_metric//:go_default_library",
"gazelle:resolve go go.opentelemetry.io/otel/propagation @io_opentelemetry_go_otel//propagation",
"gazelle:resolve go go.opentelemetry.io/otel/semconv/v1.20.0 @io_opentelemetry_go_otel//semconv/v1.20.0:v1_20_0",
"gazelle:resolve go go.opentelemetry.io/otel/trace @io_opentelemetry_go_otel_trace//:go_default_library",
],
sum = "h1:doUP+ExOpH3spVTLS0FcWGLnQrPct/hD/bCPbDRUEAU=",
version = "v0.48.0",
)
go_repository(
name = "io_opentelemetry_go_otel",
importpath = "go.opentelemetry.io/otel",
sum = "h1:Df0pqjqExIywbMCMTxkAwzjLZtRf+bBKLbUcpxO2C9E=",
build_directives = [
"gazelle:resolve go go.opentelemetry.io/otel/trace @io_opentelemetry_go_otel_trace//:go_default_library",
"gazelle:resolve go go.opentelemetry.io/otel/metric @io_opentelemetry_go_otel_metric//:go_default_library",
"gazelle:resolve go go.opentelemetry.io/otel/metric/embedded @io_opentelemetry_go_otel_metric//embedded:go_default_library",
],
version = "v1.23.0",
)
go_repository(
name = "io_opentelemetry_go_otel_metric",
importpath = "go.opentelemetry.io/otel/metric",
sum = "h1:pazkx7ss4LFVVYSxYew7L5I6qvLXHA0Ap2pwV+9Cnpo=",
build_directives = [
"gazelle:resolve go go.opentelemetry.io/otel/attribute @io_opentelemetry_go_otel//attribute:go_default_library",
],
version = "v1.23.0",
)
go_repository(
Expand All @@ -1237,13 +1263,20 @@ def com_googleapis_gapic_generator_go_repositories():
importpath = "go.opentelemetry.io/otel/trace",
sum = "h1:37Ik5Ib7xfYVb4V1UtnT97T1jI+AoIYkJyPkuL4iJgI=",
version = "v1.23.0",
build_directives = [
"gazelle:resolve go go.opentelemetry.io/otel/attribute @io_opentelemetry_go_otel//attribute:go_default_library",
],
)

go_repository(
name = "org_golang_google_api",
importpath = "google.golang.org/api",
sum = "h1:CKHrQD1BLRii6xdkatBDXyKzM0mkawt2QP+H3LtPmSE=",
version = "v0.167.0",
build_directives = [
"gazelle:resolve go go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp @io_opentelemetry_go_contrib_instrumentation_net_http_otelhttp//:go_default_library",
"gazelle:resolve go go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc @io_opentelemetry_go_contrib_instrumentation_google_golang_org_grpc_otelgrpc//:go_default_library",
],
)

go_repository(
Expand Down Expand Up @@ -1400,7 +1433,7 @@ def _maybe(repo_rule, name, strip_repo_prefix = "", **kwargs):
# targets. This way we get both the _maybe functionality and still use
# gazelle update-repos. The real go_repository rule is loaded with an alias:
# gazelle_go_repository.
def go_repository(name, importpath, sum, version, build_file_proto_mode = "", build_extra_args = []):
def go_repository(name, importpath, sum, version, build_file_proto_mode = "", build_extra_args = [], build_directives = []):
_maybe(
gazelle_go_repository,
name = name,
Expand All @@ -1409,4 +1442,5 @@ def go_repository(name, importpath, sum, version, build_file_proto_mode = "", bu
version = version,
build_file_proto_mode = build_file_proto_mode,
build_extra_args = build_extra_args,
build_directives = build_directives,
)
2 changes: 2 additions & 0 deletions rules_go_gapic/go_gapic.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ def go_gapic_library(
"@com_github_google_uuid//:go_default_library",
"@com_github_googleapis_gax_go_v2//:go_default_library",
"@com_github_googleapis_gax_go_v2//apierror:go_default_library",
"@io_opentelemetry_go_contrib_instrumentation_net_http_otelhttp//:go_default_library",
"@io_opentelemetry_go_contrib_instrumentation_google_golang_org_grpc_otelgrpc//:go_default_library",
"@org_golang_google_api//googleapi:go_default_library",
"@org_golang_google_api//option:go_default_library",
"@org_golang_google_api//option/internaloption:go_default_library",
Expand Down

0 comments on commit cc82d85

Please sign in to comment.