Skip to content

Conversation

@pragatiguptaaa
Copy link
Member

@pragatiguptaaa pragatiguptaaa commented Mar 20, 2025

Description

Context:
Following Kafka's KIP-1043, describing a non-existent consumer group now consistently throws GroupIdNotFoundException.

Treat this expected scenario as a group with zero consumers by returning an empty consumerGroupSummary. This logs the exception, encapsulates the exception handling, simplifying the caller's contract.
Another approach: #10727

Testing done

Describe the testing strategy. Unit and integration tests are expected for any behavior changes.

Reviewer checklist

  • Ensure docs are updated if necessary. (eg. if a user visible feature is being added or changed).
  • Ensure relevant issues are linked (description should include text like "Fixes #")
  • Do these changes have compatibility implications for rollback? If so, ensure that the ksql command version is bumped.

@confluent-cla-assistant
Copy link

🎉 All Contributor License Agreements have been signed. Ready to merge.
Please push an empty commit if you would like to re-run the checks to verify CLA status for all contributors.

@pragatiguptaaa pragatiguptaaa changed the title Uncomment shouldListConsumerGroupsWhenTheyExist. Uncomment shoulddESCRIBEConsumerGroupsWhenTheyExist. Mar 25, 2025
@pragatiguptaaa pragatiguptaaa changed the title Uncomment shoulddESCRIBEConsumerGroupsWhenTheyExist. Uncomment shouldDescribeConsumerGroupsWhenTheyExist. Mar 25, 2025
@pragatiguptaaa pragatiguptaaa marked this pull request as ready for review April 1, 2025 09:57
Copilot AI review requested due to automatic review settings April 1, 2025 09:57
@pragatiguptaaa pragatiguptaaa requested a review from a team as a code owner April 1, 2025 09:57
Copy link

Copilot AI left a 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 pull request ensures that the consumer group description functionality is tested by uncommenting an existing test and introduces explicit handling for non-existent consumer groups based on KIP-1043 in the consumer group client implementation.

  • Uncomment the test case for describing a consumer group in KafkaConsumerGroupClientTest.
  • Add a catch block for GroupIdNotFoundException in KafkaConsumerGroupClientImpl with debug logging and an empty summary return.

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 Uncomment test for describing consumer groups
ksqldb-engine/src/main/java/io/confluent/ksql/services/KafkaConsumerGroupClientImpl.java Add exception handling for GroupIdNotFoundException with appropriate logging

@pragatiguptaaa pragatiguptaaa changed the title Uncomment shouldDescribeConsumerGroupsWhenTheyExist. Ksql 13066 - Catch original GroupIdNotfoundException Apr 1, 2025
Copy link
Member

@VedarthConfluent VedarthConfluent left a comment

Choose a reason for hiding this comment

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

Makes sense as we want to retain existing behaviour. LGTM

@pragatiguptaaa pragatiguptaaa merged commit c6906b4 into master Apr 7, 2025
2 of 5 checks passed
@pragatiguptaaa pragatiguptaaa deleted the KSQL_13066 branch April 7, 2025 09:25
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.

3 participants