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

Update Sarama to version 1.30.0 #715

Merged
merged 2 commits into from
Sep 30, 2021
Merged

Update Sarama to version 1.30.0 #715

merged 2 commits into from
Sep 30, 2021

Conversation

bai
Copy link
Collaborator

@bai bai commented Sep 29, 2021

Update Sarama and use built-in ParseKafkaVersion, now that it includes all versions.

@dnwe would you mind taking a quick 👀 at this PR?

@bai bai merged commit 3a98882 into master Sep 30, 2021
Copy link
Contributor

@dnwe dnwe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jyates
Copy link
Contributor

jyates commented Oct 4, 2021

This change breaks existing Kafka version parsing. For example, "0.10.2" is no longer an acceptable version string, it has to be 0.10.2.0

version, ok := kafkaVersions[kafkaVersion]
if !ok {
version, err := sarama.ParseKafkaVersion(kafkaVersion)
if err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be helpful to include the error in the message so folks know what is wrong?

@jyates
Copy link
Contributor

jyates commented Oct 5, 2021

Any thoughts on the comments @bai or @dnwe ?

@dnwe
Copy link
Contributor

dnwe commented Oct 5, 2021

It's something we could fix in Sarama if you think it would be worthwhile? Did you catch this because you were currently using one of the version numbers that omitted a trailing zero? I believe Kafka moved to semver since 1.0.0 so it's only the 0.x.y.z series that would need this coverage.

@jyates
Copy link
Contributor

jyates commented Oct 5, 2021

Yeah, I have a number of clusters that are running older versions. Unfortunate, but such is life when you don't control everything. Been running burrow for years now with the old version (missing the trailing .0), so this was just a bit surprising.

I'm fine with the change, if you would prefer not to fix this (sarama approach looks reasonable). Just wanted to raise it as "breaking" change that is probably worth mentioning to users.

Or a hybrid approach could be Ok too - try the sarama version lookup, if that fails, fall back to the old version mapping for pre-1.0.0 versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants