-
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
[exporter/kafkaexporter] Add support for configuring SASL handshake version #21075
Conversation
Please add a CHANGELOG entry. |
…SASL handshake version
…nfiguration parameters
@atoulme I'm sorry, I'm a bit lost as to how to proceed here. Is there anything else I need to do or is this PR just waiting for a codeowner review now? |
Please rebase to fix the build. |
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
@atoulme I've been notified that this branch has been marked as stale. As far as I can tell everything is ready for the merge. I've just re-synced with the upstream as well. Would it be possible to give it a final check? Thank you! |
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.
A few comments from me, I think this should also update the kafka receiver as well.
|
||
err := config.Validate() | ||
assert.Error(t, err) | ||
assert.Equal(t, err.Error(), "auth.sasl.version has to be either 0 or 1. configured value 42") |
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.
Same again here, you can collapse these both to assert.EqualError
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.
Good shout, I corrected a couple other instances of this as well
assert.Error(t, err) | ||
assert.Equal(t, err.Error(), "auth.sasl.mechanism should be one of 'PLAIN', 'AWS_MSK_IAM', 'SCRAM-SHA-256' or 'SCRAM-SHA-512'. configured value FAKE") |
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.
use assert.EqualError
instead, removes the need to check if it is an error and if the message is equal.
|
||
err := config.Validate() | ||
assert.Error(t, err) | ||
assert.Equal(t, err.Error(), "auth.sasl.version has to be either 0 or 1. configured value 42") |
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.
Same again here, you can collapse these both to assert.EqualError
to save you need check if an error happened.
@MovieStoreGuy I've addressed your comments, is there anything else that I should do to before we can merge the PR? |
Description:
Adds support for configuring SASL handshake version.
The new parameter defaults to 0 just like Sarama, so the change should be backwards compatible.
Link to tracking Issue: #21074
Testing:
Documentation: