Skip to content

Commit

Permalink
chore(build): switch to IBM/sarama
Browse files Browse the repository at this point in the history
  • Loading branch information
hainenber committed Sep 13, 2023
1 parent fdac7a0 commit dddd504
Show file tree
Hide file tree
Showing 18 changed files with 74 additions and 38 deletions.
2 changes: 1 addition & 1 deletion component/loki/source/azure_event_hubs/azure_event_hubs.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"net"
"sync"

"github.com/Shopify/sarama"
"github.com/IBM/sarama"
"github.com/go-kit/log/level"
"github.com/grafana/agent/component"
"github.com/grafana/agent/component/common/loki"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"strings"
"time"

"github.com/Shopify/sarama"
"github.com/IBM/sarama"
"github.com/grafana/agent/component/common/loki"
"github.com/grafana/loki/pkg/logproto"
"github.com/prometheus/common/model"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"testing"
"time"

"github.com/Shopify/sarama"
"github.com/IBM/sarama"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/model/relabel"
"github.com/stretchr/testify/assert"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/xdg-go/scram"
)

// copied from https://github.com/Shopify/sarama/blob/44627b731c60bb90efe25573e7ef2b3f8df3fa23/examples/sasl_scram_client/scram_client.go
// copied from https://github.com/IBM/sarama/blob/44627b731c60bb90efe25573e7ef2b3f8df3fa23/examples/sasl_scram_client/scram_client.go
var (
SHA256 scram.HashGeneratorFcn = sha256.New
SHA512 scram.HashGeneratorFcn = sha512.New
Expand Down
2 changes: 1 addition & 1 deletion component/loki/source/internal/kafkatarget/config.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package kafkatarget

import (
"github.com/Shopify/sarama"
"github.com/IBM/sarama"
"github.com/grafana/agent/component/common/loki"
"github.com/grafana/dskit/flagext"
promconfig "github.com/prometheus/common/config"
Expand Down
2 changes: 1 addition & 1 deletion component/loki/source/internal/kafkatarget/consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"sync"
"time"

"github.com/Shopify/sarama"
"github.com/IBM/sarama"
"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/grafana/dskit/backoff"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"testing"
"time"

"github.com/Shopify/sarama"
"github.com/IBM/sarama"
"github.com/go-kit/log"
"github.com/prometheus/common/model"
"github.com/stretchr/testify/require"
Expand Down
2 changes: 1 addition & 1 deletion component/loki/source/internal/kafkatarget/kafkatarget.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"fmt"
"time"

"github.com/Shopify/sarama"
"github.com/IBM/sarama"
"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/grafana/agent/component/common/loki"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

"github.com/grafana/agent/component/common/loki/client/fake"

"github.com/Shopify/sarama"
"github.com/IBM/sarama"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/model/relabel"
"github.com/stretchr/testify/require"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/azcore"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Shopify/sarama"
"github.com/IBM/sarama"
)

func NewOAuthProvider(opts OAuthConfig) (sarama.AccessTokenProvider, error) {
Expand Down
2 changes: 1 addition & 1 deletion component/loki/source/internal/kafkatarget/parser.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package kafkatarget

import (
"github.com/Shopify/sarama"
"github.com/IBM/sarama"
"github.com/grafana/agent/component/common/loki"
"github.com/grafana/loki/pkg/logproto"
"github.com/prometheus/common/model"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"sync"
"time"

"github.com/Shopify/sarama"
"github.com/IBM/sarama"
"github.com/go-kit/log"
"github.com/go-kit/log/level"
promconfig "github.com/prometheus/common/config"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/grafana/dskit/flagext"
"github.com/prometheus/common/config"

"github.com/Shopify/sarama"
"github.com/IBM/sarama"
"github.com/go-kit/log"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/model/relabel"
Expand Down
2 changes: 1 addition & 1 deletion component/loki/source/kafka/kafka.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"sync"

"github.com/Shopify/sarama"
"github.com/IBM/sarama"
"github.com/go-kit/log/level"
"github.com/grafana/agent/component"
"github.com/grafana/agent/component/common/config"
Expand Down
2 changes: 1 addition & 1 deletion component/prometheus/exporter/kafka/kafka.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package kafka
import (
"fmt"

"github.com/Shopify/sarama"
"github.com/IBM/sarama"
"github.com/grafana/agent/component"
"github.com/grafana/agent/component/discovery"
"github.com/grafana/agent/component/prometheus/exporter"
Expand Down
7 changes: 4 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ require (
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.1
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0
github.com/Azure/go-autorest/autorest v0.11.29
github.com/IBM/sarama v1.40.1
github.com/Lusitaniae/apache_exporter v0.11.1-0.20220518131644-f9522724dab4
github.com/Masterminds/sprig/v3 v3.2.3
github.com/PuerkitoBio/rehttp v1.1.0
github.com/Shopify/sarama v1.38.1
github.com/alecthomas/kingpin/v2 v2.3.2
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137
github.com/aws/aws-sdk-go v1.44.327
Expand Down Expand Up @@ -542,7 +542,7 @@ require (
github.com/samber/lo v1.38.1 // indirect
github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da // indirect
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b // indirect
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17 // indirect
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 // indirect
github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646 // indirect
github.com/sergi/go-diff v1.2.0 // indirect
Expand Down Expand Up @@ -624,6 +624,7 @@ require (
)

require (
github.com/Shopify/sarama v1.38.1 // indirect
github.com/drone/envsubst v1.0.3 // indirect
github.com/julienschmidt/httprouter v1.3.0 // indirect
github.com/leoluk/perflib_exporter v0.2.0 // indirect
Expand Down Expand Up @@ -714,8 +715,8 @@ exclude github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.194
// Add exclude directives so Go doesn't pick old incompatible k8s.io/client-go
// versions.
exclude (
k8s.io/client-go v12.0.0+incompatible
k8s.io/client-go v8.0.0+incompatible
k8s.io/client-go v12.0.0+incompatible
)

replace github.com/github/smimesign => github.com/grafana/smimesign v0.2.1-0.20220408144937-2a5adf3481d3
Loading

0 comments on commit dddd504

Please sign in to comment.