Ksql 13066 - Propogate original exception#10727
Open
pragatiguptaaa wants to merge 16 commits intomasterfrom
Open
Ksql 13066 - Propogate original exception#10727pragatiguptaaa wants to merge 16 commits intomasterfrom
pragatiguptaaa wants to merge 16 commits intomasterfrom
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.
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){
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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