From d2ebd76a5d3f8529d4b8e3fc8b1199ad68b29387 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Tue, 18 Jul 2023 08:01:31 +0200 Subject: [PATCH] common/kafka: switch to github.com/IBM/sarama --- common/kafka/config.go | 2 +- common/kafka/config_test.go | 2 +- common/kafka/logs.go | 2 +- common/kafka/scram.go | 2 +- common/kafka/tests.go | 2 +- console/data/docs/06-internals.md | 2 +- go.mod | 2 +- go.sum | 4 ++-- inlet/core/enricher_test.go | 2 +- inlet/core/root_test.go | 2 +- inlet/kafka/config.go | 2 +- inlet/kafka/config_test.go | 2 +- inlet/kafka/functional_test.go | 2 +- inlet/kafka/root.go | 2 +- inlet/kafka/root_test.go | 2 +- inlet/kafka/tests.go | 4 ++-- orchestrator/kafka/functional_test.go | 2 +- orchestrator/kafka/root.go | 2 +- 18 files changed, 20 insertions(+), 20 deletions(-) diff --git a/common/kafka/config.go b/common/kafka/config.go index f51d132b..d95007e5 100644 --- a/common/kafka/config.go +++ b/common/kafka/config.go @@ -16,7 +16,7 @@ import ( "akvorado/common/helpers/bimap" - "github.com/Shopify/sarama" + "github.com/IBM/sarama" ) // Configuration defines how we connect to a Kafka cluster. diff --git a/common/kafka/config_test.go b/common/kafka/config_test.go index 46862c95..ccc3955f 100644 --- a/common/kafka/config_test.go +++ b/common/kafka/config_test.go @@ -8,7 +8,7 @@ import ( "akvorado/common/helpers" - "github.com/Shopify/sarama" + "github.com/IBM/sarama" "github.com/gin-gonic/gin" ) diff --git a/common/kafka/logs.go b/common/kafka/logs.go index c8ab6916..16afe44d 100644 --- a/common/kafka/logs.go +++ b/common/kafka/logs.go @@ -7,7 +7,7 @@ import ( "fmt" "sync/atomic" - "github.com/Shopify/sarama" + "github.com/IBM/sarama" "akvorado/common/reporter" ) diff --git a/common/kafka/scram.go b/common/kafka/scram.go index f4ec2483..73536e56 100644 --- a/common/kafka/scram.go +++ b/common/kafka/scram.go @@ -1,7 +1,7 @@ // SPDX-FileCopyrightText: 2013 Shopify // SPDX-License-Identifier: MIT -// From https://github.com/Shopify/sarama/blob/main/examples/sasl_scram_client/scram_client.go +// From https://github.com/IBM/sarama/blob/main/examples/sasl_scram_client/scram_client.go package kafka diff --git a/common/kafka/tests.go b/common/kafka/tests.go index 21e84e92..ef7ae211 100644 --- a/common/kafka/tests.go +++ b/common/kafka/tests.go @@ -9,7 +9,7 @@ import ( "testing" "time" - "github.com/Shopify/sarama" + "github.com/IBM/sarama" "akvorado/common/helpers" ) diff --git a/console/data/docs/06-internals.md b/console/data/docs/06-internals.md index be2781cc..69a98d74 100644 --- a/console/data/docs/06-internals.md +++ b/console/data/docs/06-internals.md @@ -106,7 +106,7 @@ of the databases in order to update a local cached copy. ## Kafka The Kafka component relies on -[Sarama](https://github.com/Shopify/sarama). It is tested using the +[Sarama](https://github.com/IBM/sarama). It is tested using the mock interface provided by this package. *Sarama* uses `go-metrics` to store metrics. We convert them to Prometheus to keep them. The logger is global and there is a hack to be plug it into the reporter design diff --git a/go.mod b/go.mod index bfc116cc..1d241d9d 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.19 require ( github.com/ClickHouse/clickhouse-go/v2 v2.10.1 - github.com/Shopify/sarama v1.38.1 + github.com/IBM/sarama v1.40.0 github.com/alecthomas/chroma v0.10.0 github.com/antonmedv/expr v1.12.6 github.com/benbjohnson/clock v1.3.5 diff --git a/go.sum b/go.sum index 3f28cc22..d37c3425 100644 --- a/go.sum +++ b/go.sum @@ -4,10 +4,10 @@ github.com/ClickHouse/ch-go v0.52.1 h1:nucdgfD1BDSHjbNaG3VNebonxJzD8fX8jbuBpfo5V github.com/ClickHouse/ch-go v0.52.1/go.mod h1:B9htMJ0hii/zrC2hljUKdnagRBuLqtRG/GrU3jqCwRk= github.com/ClickHouse/clickhouse-go/v2 v2.10.1 h1:WCnusqEeCO/9sLFVIv57le/O1ydUb+x9+SYYhJ11fsY= github.com/ClickHouse/clickhouse-go/v2 v2.10.1/go.mod h1:teXfZNM90iQ99Jnuht+dxQXCuhDZ8nvvMoTJOFrcmcg= +github.com/IBM/sarama v1.40.0 h1:QTVmX+gMKye52mT5x+Ve/Bod2D0Gy7ylE2Wslv+RHtc= +github.com/IBM/sarama v1.40.0/go.mod h1:6pBloAs1WanL/vsq5qFTyTGulJUntZHhMLOUYEIs9mg= github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= -github.com/Shopify/sarama v1.38.1 h1:lqqPUPQZ7zPqYlWpTh+LQ9bhYNu2xJL6k1SJN4WVe2A= -github.com/Shopify/sarama v1.38.1/go.mod h1:iwv9a67Ha8VNa+TifujYoWGxWnu2kNVAQdSdZ4X2o5g= github.com/Shopify/toxiproxy/v2 v2.5.0 h1:i4LPT+qrSlKNtQf5QliVjdP08GyAH8+BUIc9gT0eahc= github.com/alecthomas/chroma v0.10.0 h1:7XDcGkCQopCNKjZHfYrNLraA+M7e0fMiJ/Mfikbfjek= github.com/alecthomas/chroma v0.10.0/go.mod h1:jtJATyUxlIORhUOFNA9NZDWGAQ8wpxQQqNSB4rjA/1s= diff --git a/inlet/core/enricher_test.go b/inlet/core/enricher_test.go index 1b813d8f..8049636d 100644 --- a/inlet/core/enricher_test.go +++ b/inlet/core/enricher_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - "github.com/Shopify/sarama" + "github.com/IBM/sarama" "github.com/gin-gonic/gin" "github.com/mitchellh/mapstructure" diff --git a/inlet/core/root_test.go b/inlet/core/root_test.go index eec75423..54444b93 100644 --- a/inlet/core/root_test.go +++ b/inlet/core/root_test.go @@ -14,7 +14,7 @@ import ( "testing" "time" - "github.com/Shopify/sarama" + "github.com/IBM/sarama" "github.com/gin-gonic/gin" "akvorado/common/daemon" diff --git a/inlet/kafka/config.go b/inlet/kafka/config.go index a48593b4..7df6ea9b 100644 --- a/inlet/kafka/config.go +++ b/inlet/kafka/config.go @@ -6,7 +6,7 @@ package kafka import ( "time" - "github.com/Shopify/sarama" + "github.com/IBM/sarama" "akvorado/common/kafka" ) diff --git a/inlet/kafka/config_test.go b/inlet/kafka/config_test.go index 82aac356..a157a57c 100644 --- a/inlet/kafka/config_test.go +++ b/inlet/kafka/config_test.go @@ -8,7 +8,7 @@ import ( "akvorado/common/helpers" - "github.com/Shopify/sarama" + "github.com/IBM/sarama" ) func TestCompressionCodecUnmarshal(t *testing.T) { diff --git a/inlet/kafka/functional_test.go b/inlet/kafka/functional_test.go index 15caea47..f88cb291 100644 --- a/inlet/kafka/functional_test.go +++ b/inlet/kafka/functional_test.go @@ -10,7 +10,7 @@ import ( "testing" "time" - "github.com/Shopify/sarama" + "github.com/IBM/sarama" "akvorado/common/daemon" "akvorado/common/helpers" diff --git a/inlet/kafka/root.go b/inlet/kafka/root.go index 29f3d9b1..a2645fe0 100644 --- a/inlet/kafka/root.go +++ b/inlet/kafka/root.go @@ -11,7 +11,7 @@ import ( "strings" "time" - "github.com/Shopify/sarama" + "github.com/IBM/sarama" "gopkg.in/tomb.v2" "akvorado/common/daemon" diff --git a/inlet/kafka/root_test.go b/inlet/kafka/root_test.go index 68495a88..a01639ce 100644 --- a/inlet/kafka/root_test.go +++ b/inlet/kafka/root_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - "github.com/Shopify/sarama" + "github.com/IBM/sarama" gometrics "github.com/rcrowley/go-metrics" "akvorado/common/daemon" diff --git a/inlet/kafka/tests.go b/inlet/kafka/tests.go index 7de7795d..b4da2762 100644 --- a/inlet/kafka/tests.go +++ b/inlet/kafka/tests.go @@ -8,8 +8,8 @@ package kafka import ( "testing" - "github.com/Shopify/sarama" - "github.com/Shopify/sarama/mocks" + "github.com/IBM/sarama" + "github.com/IBM/sarama/mocks" "akvorado/common/daemon" "akvorado/common/helpers" diff --git a/orchestrator/kafka/functional_test.go b/orchestrator/kafka/functional_test.go index e5b297f0..861e2348 100644 --- a/orchestrator/kafka/functional_test.go +++ b/orchestrator/kafka/functional_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - "github.com/Shopify/sarama" + "github.com/IBM/sarama" "akvorado/common/helpers" "akvorado/common/kafka" diff --git a/orchestrator/kafka/root.go b/orchestrator/kafka/root.go index 8a912ac2..98129e25 100644 --- a/orchestrator/kafka/root.go +++ b/orchestrator/kafka/root.go @@ -8,7 +8,7 @@ import ( "fmt" "strings" - "github.com/Shopify/sarama" + "github.com/IBM/sarama" "akvorado/common/kafka" "akvorado/common/reporter"