From a8beca574a1f10a5fe1a876c4505c6a3f9544fa9 Mon Sep 17 00:00:00 2001 From: Alan Parra Date: Mon, 23 Dec 2024 10:38:30 -0300 Subject: [PATCH] Exclude google.golang.org/grpc/stats/opentelemetry --- go.mod | 7 +++++++ integrations/event-handler/go.mod | 3 +++ integrations/terraform/go.mod | 3 +++ 3 files changed, 13 insertions(+) diff --git a/go.mod b/go.mod index 9303984c8bfc1..b6f00d94a6cbe 100644 --- a/go.mod +++ b/go.mod @@ -572,3 +572,10 @@ replace ( github.com/redis/go-redis/v9 => github.com/gravitational/redis/v9 v9.6.1-teleport.1 github.com/vulcand/predicate => github.com/gravitational/predicate v1.3.1 ) + +// stats/opentelemetry is provided by grpc-go since v1.69.0, v1.68.2 and v1.67.3. +// Before that it was its own module. Until all of our dependencies use, at +// least, one of the grpc-go versions above we need to exclude +// stats/opentelemetry in order to avoid "ambiguous import" errors on build. +// TODO(codingllama): Remove once no dependencies import stats/opentelemetry. +exclude google.golang.org/grpc/stats/opentelemetry v0.0.0-20240907200651-3ffb98b2c93a diff --git a/integrations/event-handler/go.mod b/integrations/event-handler/go.mod index a2497c636cd0d..5dee8c839544c 100644 --- a/integrations/event-handler/go.mod +++ b/integrations/event-handler/go.mod @@ -349,3 +349,6 @@ replace ( // otherwise we get significant increase in size of the "teleport" binary. sigs.k8s.io/kustomize/api => github.com/gravitational/kustomize/api v0.16.0-teleport.1 ) + +// TODO(codingllama): Remove once no dependencies import stats/opentelemetry. +exclude google.golang.org/grpc/stats/opentelemetry v0.0.0-20240907200651-3ffb98b2c93a diff --git a/integrations/terraform/go.mod b/integrations/terraform/go.mod index f39088460c4da..86044658f0289 100644 --- a/integrations/terraform/go.mod +++ b/integrations/terraform/go.mod @@ -411,3 +411,6 @@ replace ( github.com/vulcand/predicate => github.com/gravitational/predicate v1.3.1 sigs.k8s.io/kustomize/api => github.com/gravitational/kustomize/api v0.16.0-teleport.1 ) + +// TODO(codingllama): Remove once no dependencies import stats/opentelemetry. +exclude google.golang.org/grpc/stats/opentelemetry v0.0.0-20240907200651-3ffb98b2c93a