Repository navigation
fix(consumer): normalize the group name in consumerGroupConfigurations - #7343
Open
123123213weqw wants to merge 1 commit into
Open
123123213weqw wants to merge 1 commit into
123123213weqw wants to merge 1 commit into
Conversation
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.
Fixes #7283.
MetadataService.consumerGroupConfigurationsfiltered the provider results with the raw caller-supplied name while the provider search internally trims vianormalizeFilter— so a padded name (" my-group ", which thermq.group.detailschema accepts with onlyminLength: 1) found the group in the search but failed the exact-match filter, raising 404 for an existing group. A blank name likewise produced 404 instead of the 400 every sibling read path throws. It was the only name-based path not normalizing throughrequireNamefirst.The method now normalizes with
requireName(name, "consumer group name")before searching and matching — the exact fix the issue proposes — so a padded name resolves the same group as the trimmed one, and a blank name is rejected with 400 before any provider resolution.Three regression tests: a padded name exact-matches within provider search results (including a similarly-named sibling that must not leak in, and asserting the provider receives the trimmed search), a blank name rejects with 400 with no provider interaction, and the 404 message reports the normalized name. Suite 64/64.