-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Synced error names and descriptions with the kafka's protocol #1218
Conversation
This one looks really helpful. I also had some hard time with error messages recently. 👍 |
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.
This is useful, Thank you!
@nrvnrvn If you can get the tests passed, we will get it approved and merged. |
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.
Will approve one CI is passing.
@sam-obeid fixed the failing tests. Not sure if I need to do anything about codecov though... |
Yep, thanks so much for @nrvnrvn for contributing and thanks @sam-obeid and @varun06 for reviewing. |
Any major objections to reverting this one to address public API regression? |
I am in favor of reverting and bring it back with proper process. |
I think it has to be cherry picked in a new release. it's a braking change and need to communicated properly. @bai what's your thought? |
For most of this library's existence it has returned ErrMessageSizeTooLarge when the message exceeded the configured size. For a short period in 2019 this error was renamed (IBM#1218) but shortly revered back (IBM#1262). Later in 2023 this error was changed to a ConfigurationError (IBM#2628) to fix IBM#2137, however this has caused issues with clients who rely on the previous error code being distinct from other ConfigurationError conditions (IBM#2655). This commit reverts to previous behaviour, and adds a test to pickup if this changes again in the future. Signed-off-by: Adam Eijdenberg <adam.eijdenberg@defence.gov.au>
Part of #1216
This one is very opinionated since it makes a lot of renamings just for the sake of clear mapping between sarama's error codes and messages and kafka protocol.
Errors from https://kafka.apache.org/protocol#protocol_error_codes were converted to CamelCase style. Descriptions were taken as is.
See also:
https://github.com/apache/kafka/blob/741cb761c5239297029a446518c332f6c4ed08f6/clients/src/main/java/org/apache/kafka/common/protocol/Errors.java#L116
While it would be useful to keep this on par with the upstream kafka's error names and descriptions I understand that there is possibility of breaking backwards compatibility for users who already rely on error names that sarama has provided.
If you think this change is not worth it feel free to decline it.