Skip to content

Conversation

@FrankYang0529
Copy link
Member

@FrankYang0529 FrankYang0529 commented May 16, 2025

  • Add new functions listConfigResources(Set<ConfigResource.Type> configResourceTypes, ListConfigResourcesOptions options) and
    listConfigResources() to Admin interface.
    • New functions can list all kind of config resource types.
    • If input is a set with a type other than CLIENT_METRICS and
      request version is 0, return UnsupportedVersionException.
  • Deprecate functions
    listClientMetricsResources(ListClientMetricsResourcesOptions options)
    and listClientMetricsResources().
  • Deprecate classes ListClientMetricsResourcesResult and
    ClientMetricsResourceListing.
  • Change ClientMetricsCommand to use listConfigResources.
  • Add integration tests to PlaintextAdminIntegrationTest.java.
  • Add unit tests to KafkaAdminClientTest.java.

Reviewers: Andrew Schofield aschofield@confluent.io

Signed-off-by: PoAn Yang <payang@apache.org>
@FrankYang0529 FrankYang0529 changed the title KAFKA-18904: Add Admin#listConfigResources (wip) KAFKA-18904: Add Admin#listConfigResources [2/N] May 17, 2025
@FrankYang0529
Copy link
Member Author

Flaky cases QuorumControllerTest#testBalancePartitionLeaders and RemoteIndexCacheTest#testCacheEntryIsDeletedOnRemoval are not related to this PR. We also have Jira to track them:

Copy link
Member

@AndrewJSchofield AndrewJSchofield left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. A few comments from an initial review.

Copy link
Member

@AndrewJSchofield AndrewJSchofield left a comment

Choose a reason for hiding this comment

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

Thanks for the updates. Just a few additional comments.

* @return The ListClientMetricsResourcesResult.
* @deprecated Since 4.1. Use {@link #listConfigResources()} instead.
*/
@Deprecated(since = "4.1")
Copy link
Member

Choose a reason for hiding this comment

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

, forRemoval = true.

Signed-off-by: PoAn Yang <payang@apache.org>
Signed-off-by: PoAn Yang <payang@apache.org>
@AndrewJSchofield
Copy link
Member

Looks like a failed test:

FAILED ❌ KafkaApisTest > testListConfigResourcesV0()

Signed-off-by: PoAn Yang <payang@apache.org>
@FrankYang0529
Copy link
Member Author

Looks like a failed test:

FAILED ❌ KafkaApisTest > testListConfigResourcesV0()

Sorry for that. The v0 doesn't support resource types field. If the version is 0, we have to build a new empty ListConfigResourcesRequestData to avoid following error.

Attempted to write a non-default resourceTypes at version 0
org.apache.kafka.common.errors.UnsupportedVersionException: Attempted to write a non-default resourceTypes at version 0

@AndrewJSchofield
Copy link
Member

Test failed of kafka.api.PlaintextAdminIntegrationTest.testDeleteConsumerGroupOffsets. Does not appear related.

@FrankYang0529
Copy link
Member Author

The kafka.api.PlaintextAdminIntegrationTest.testDeleteConsumerGroupOffsets seems flaky. In past 7 days, it has 3 failed and 12 flaky out of 437 results.

https://develocity.apache.org/scans/tests?search.rootProjectNames=kafka&search.timeZoneId=Asia%2FTaipei&tests.container=kafka.api.PlaintextAdminIntegrationTest#

@AndrewJSchofield AndrewJSchofield merged commit 30d7c71 into apache:trunk May 22, 2025
23 checks passed
@FrankYang0529 FrankYang0529 deleted the KAFKA-18904-2 branch May 22, 2025 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants