Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(build): switch and bump new version for IBM/sarama #5180

Merged
merged 6 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 22 additions & 13 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Main (unreleased)
- Flow: Allow `grafana-agent run` to accept a path to a directory of `*.river` files.
This will load all River files in the directory as a single configuration;
component names must be unique across all loaded files. (@rfratto, @hainenber)


### Enhancements

Expand All @@ -88,37 +88,46 @@ Main (unreleased)
- Flow: improve river config validation step in `prometheus.scrape` by comparing `scrape_timeout` with `scrape_interval`. (@wildum)

- Add support for `windows_certificate_filter` under http tls config block. (@mattdurham)

- Add `openstack` config converter to convert OpenStack yaml config (static mode) to river config (flow mode). (@wildum)

- Some `otelcol` components will now display their debug metrics via the
Agent's `/metrics` endpoint. Those components include `otelcol.receiver.otlp`,
`otelcol.exporter.otlp` and `otelcol.processor.batch`. There may also be metrics
- Some `otelcol` components will now display their debug metrics via the
Agent's `/metrics` endpoint. Those components include `otelcol.receiver.otlp`,
`otelcol.exporter.otlp` and `otelcol.processor.batch`. There may also be metrics
from other components which are not documented yet. (@ptodev)

- Agent Management: Honor 503 ServiceUnavailable `Retry-After` header. (@jcreixell)

### Bugfixes

- Fixed `otelcol.exporter.prometheus` label names for the `otel_scope_info`
metric to match the OTLP Instrumentation Scope spec. `name` is now `otel_scope_name`
and `version` is now `otel_version_name`. (@erikbaranowski)

- Fixed a bug where converting `YACE` cloudwatch config to river skipped converting static jobs. (@berler)

### Other changes

- Use Go 1.21.1 for builds. (@rfratto)

- Read contextual attributes from Faro measurements (@codecapitano)

- Rename Grafana Agent service in windows app and features to not include the description

- Correct YAML level for `multitenancy_enabled` option in Mimir's config in examples. (@hainenber)

- Operator: Update default config reloader version. (@captncraig)

- Sorting of common fields in log messages emitted by the agent in Flow mode
have been standardized. The first fields will always be `ts`, `level`, and
`msg`, followed by non-common fields. Previously, the position of `msg` was
not consistent. (@rfratto)
- Documentation updated to link discovery.http and prometheus.scrape advanced configs (@proffalken)
- Bump SNMP exporter version to v0.23 (@marctc)

### Bugfixes
- Documentation updated to link discovery.http and prometheus.scrape advanced configs (@proffalken)

- Fixed `otelcol.exporter.prometheus` label names for the `otel_scope_info`
metric to match the OTLP Instrumentation Scope spec. `name` is now `otel_scope_name`
and `version` is now `otel_version_name`. (@erikbaranowski)
- Bump SNMP exporter version to v0.23 (@marctc)

- Fixed a bug where converting `YACE` cloudwatch config to river skipped converting static jobs. (@berler)
- Switch to `IBM/sarama` module. (@hainenber)

v0.36.2 (2023-09-22)
--------------------
Expand All @@ -133,7 +142,7 @@ v0.36.2 (2023-09-22)

- Fix `loki.source.file` race condition in cleaning up metrics when stopping to tail files. (@thampiotr)

- Fixed the `agent_prometheus_scrape_targets_gauge` incorrectly reporting all discovered targets
- Fixed the `agent_prometheus_scrape_targets_gauge` incorrectly reporting all discovered targets
instead of targets that belong to current instance when clustering is enabled. (@thampiotr)

v0.36.1 (2023-09-06)
Expand Down
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
8 changes: 4 additions & 4 deletions component/loki/source/internal/kafkatarget/target_syncer.go
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 Expand Up @@ -65,11 +65,11 @@ func NewSyncer(

switch cfg.KafkaConfig.Assignor {
case sarama.StickyBalanceStrategyName:
config.Consumer.Group.Rebalance.Strategy = sarama.BalanceStrategySticky
config.Consumer.Group.Rebalance.Strategy = sarama.NewBalanceStrategySticky()
case sarama.RoundRobinBalanceStrategyName:
config.Consumer.Group.Rebalance.Strategy = sarama.BalanceStrategyRoundRobin
config.Consumer.Group.Rebalance.Strategy = sarama.NewBalanceStrategyRoundRobin()
case sarama.RangeBalanceStrategyName, "":
config.Consumer.Group.Rebalance.Strategy = sarama.BalanceStrategyRange
config.Consumer.Group.Rebalance.Strategy = sarama.NewBalanceStrategyRange()
default:
return nil, fmt.Errorf("unrecognized consumer group partition assignor: %s", cfg.KafkaConfig.Assignor)
}
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
3 changes: 2 additions & 1 deletion 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.7.0
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 @@ -623,6 +623,7 @@ require (
)

require (
github.com/Shopify/sarama v1.38.1 // indirect
github.com/Workiva/go-datastructures v1.1.0 // indirect
github.com/drone/envsubst v1.0.3 // indirect
github.com/julienschmidt/httprouter v1.3.0 // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,8 @@ github.com/GehirnInc/crypt v0.0.0-20200316065508-bb7000b8a962 h1:KeNholpO2xKjgaa
github.com/GehirnInc/crypt v0.0.0-20200316065508-bb7000b8a962/go.mod h1:kC29dT1vFpj7py2OvG1khBdQpo3kInWP+6QipLbdngo=
github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM=
github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo=
github.com/IBM/sarama v1.40.1 h1:lL01NNg/iBeigUbT+wpPysuTYW6roHo6kc1QrffRf0k=
github.com/IBM/sarama v1.40.1/go.mod h1:+5OFwA5Du9I6QrznhaMHsuwWdWZNMjaBSIxEWEgKOYE=
github.com/Jeffail/gabs v1.1.0/go.mod h1:6xMvQMK4k33lb7GUUpaAPh6nKMmemQeg5d4gn7/bOXc=
github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c h1:RGWPOewvKIROun94nF7v2cua9qP+thov/7M50KEoeSU=
github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c/go.mod h1:X0CRv0ky0k6m906ixxpzmDRLvX58TFUKS2eePweuyxk=
Expand Down
2 changes: 1 addition & 1 deletion pkg/integrations/kafka_exporter/kafka_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

config_util "github.com/prometheus/common/config"

"github.com/Shopify/sarama"
"github.com/IBM/sarama"
kafka_exporter "github.com/davidmparrott/kafka_exporter/v2/exporter"
"github.com/go-kit/log"
"github.com/grafana/agent/pkg/integrations"
Expand Down