-
Notifications
You must be signed in to change notification settings - Fork 1k
Ksql 13066 - Propogate original exception #10727
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
base: master
Are you sure you want to change the base?
Conversation
# Conflicts: # ksqldb-engine/src/test/java/io/confluent/ksql/integration/KafkaConsumerGroupClientTest.java
…e to allow retries.
TODO: Handle the exception in client's code.
🎉 All Contributor License Agreements have been signed. Ready to merge. |
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.
Pull Request Overview
This PR propagates the original GroupIdNotFoundException to clearly signal when a consumer group does not exist, in-line with Kafka's KIP-1043.
- Restores and uncomments the shouldDescribeConsumerGroup test in the integration tests.
- Introduces a try-catch block in the test to handle GroupIdNotFoundException as a signal for a group with 0 consumers.
- Updates the service implementation to explicitly catch and re-throw GroupIdNotFoundException.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
File | Description |
---|---|
ksqldb-engine/src/test/java/io/confluent/ksql/integration/KafkaConsumerGroupClientTest.java | Uncomments a test and adds exception handling for a missing consumer group in the test scenario. |
ksqldb-engine/src/main/java/io/confluent/ksql/services/KafkaConsumerGroupClientImpl.java | Adds a catch block to re-throw GroupIdNotFoundException for clear exception propagation. |
Comments suppressed due to low confidence (1)
ksqldb-engine/src/test/java/io/confluent/ksql/integration/KafkaConsumerGroupClientTest.java:143
- Consider adding a dedicated test case that explicitly verifies the behavior when a consumer group does not exist, ensuring that the logged message and the returned zero counts are as expected.
}catch(final GroupIdNotFoundException exception){
Description
Context:
Following Kafka's KIP-1043, describing a non-existent consumer group now consistently throws GroupIdNotFoundException.
In this approach, we are catching GroupIdNotFoundException and immediately re-throw it, propagating the specific " group id not found" signal to the caller. This preserves information and gives callers flexibility but requires them to implement their own handling logic for this exception.
Another approach: #10711
Testing done
Describe the testing strategy. Unit and integration tests are expected for any behavior changes.
Reviewer checklist