IBM / sarama

Sarama is a Go library for Apache Kafka.
MIT License
11.57k stars 1.76k forks source link

Kafka 2.8.1 error messages are not Nullable strings anymore ? #2095

Closed agriffaut closed 1 year ago

agriffaut commented 2 years ago
Versions
Working Sarama Kafka Go
1.30.1 2.7.0 1.16
Fail Sarama Kafka Go
1.30.1 2.8.1 1.16
Logs
logs: CLICK ME

Error detected while describing quotas

Problem Description

For some reason, Kafka 2.8.1 doesn't return a nullable string anymore for DescribeClientQuotasResponse.ErrorMsg on that API (key: 48). When no error occurs, a pointer to an empty string is returned. In the packetDecoder, the getNullableString function reads a 0 in Kafka 2.8.1 rather than -1 in Kafka 2.7.0.

I'll submit a PR to handle this one, but maybe other APIs are impacted too

github-actions[bot] commented 1 year ago

Thank you for taking the time to raise this issue. However, it has not had any activity on it in the past 90 days and will be closed in 30 days if no updates occur. Please check if the main branch has already resolved the issue since it was raised. If you believe the issue is still valid and you would like input from the maintainers then please comment to ask for it to be reviewed.

dnwe commented 1 year ago

Fixed by https://github.com/IBM/sarama/pull/2096