-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Kafka: Add new Consumer and Producer flags #1360
Kafka: Add new Consumer and Producer flags #1360
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add a "breaking changes" section to the changelog
cmd/ingester/app/flags.go
Outdated
o.Brokers = strings.Split(v.GetString(KafkaConsumerConfigPrefix+SuffixBrokers), ",") | ||
o.Topic = v.GetString(KafkaConsumerConfigPrefix + SuffixTopic) | ||
o.GroupID = v.GetString(KafkaConsumerConfigPrefix + SuffixGroupID) | ||
o.Encoding = v.GetString(KafkaConsumerConfigPrefix + SuffixEncoding) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if the new flags are not specified, wouldn't all these values become empty?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've reworked the PR and added a test for that.
I wasn't sure which flags we should prefer if both are specified, currently the old flags will win over the new flags if both are specified (as per the test)
cae5b63
to
f7f0ac3
Compare
f7f0ac3
to
e0c9be4
Compare
…lags Signed-off-by: Louis-Etienne Dorval <louis-etienne.dorval@ticketmaster.com>
e0c9be4
to
468ef51
Compare
I wonder if retrying the CI jobs would fix it |
Codecov Report
@@ Coverage Diff @@
## master #1360 +/- ##
======================================
Coverage 100% 100%
======================================
Files 164 164
Lines 7376 7447 +71
======================================
+ Hits 7376 7447 +71
Continue to review full report at Codecov.
|
Signed-off-by: Louis-Etienne Dorval <louis-etienne.dorval@ticketmaster.com>
82f14b7
to
5b47d1b
Compare
o.Topic = v.GetString(KafkaConfigPrefix + SuffixTopic) | ||
o.GroupID = v.GetString(KafkaConfigPrefix + SuffixGroupID) | ||
o.Encoding = v.GetString(KafkaConfigPrefix + SuffixEncoding) | ||
o.Brokers = strings.Split(v.GetString(KafkaConsumerConfigPrefix+SuffixBrokers), ",") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we recently fixed a bug where the list of hosts for Cassandra or ES would not parse correctly if they contained spaces. Perhaps worth reusing the same util method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’ll bundle that suggestion into the PR tha delete the deprecated flags (to be merged post 1.11)
* Add new kafka.consumer + kafka.producer flags instead of deprecated flags Signed-off-by: Louis-Etienne Dorval <louis-etienne.dorval@ticketmaster.com> * fmt the new Kafka consumer/producer code Signed-off-by: Louis-Etienne Dorval <louis-etienne.dorval@ticketmaster.com>
* Add new kafka.consumer + kafka.producer flags instead of deprecated flags Signed-off-by: Louis-Etienne Dorval <louis-etienne.dorval@ticketmaster.com> * fmt the new Kafka consumer/producer code Signed-off-by: Louis-Etienne Dorval <louis-etienne.dorval@ticketmaster.com>
Which problem is this PR solving?
Short description of the changes
Replace #1231 and implement this: #1231 (comment)
kafka.producer
flags in plugins/storage/kafkakafka.consumer
flags in Ingesterkafka
flags