redpanda
redpanda copied to clipboard
Regression: `rpk topic consume --regex` never works
Version & Environment
Redpanda version: (use rpk version): 23.3.12
What went wrong?
rpk topic consume --regex always fails if any non-literal chars are used. For example, the following command against a broker with at least one topic should return data instead of failing:
$ rpk topic consume --regex '.*'
unable to consume topic ".*": UNKNOWN_TOPIC_OR_PARTITION: This server does not host this topic-partition.
It looks like this regressed in https://github.com/redpanda-data/redpanda/pull/13330, which validates that topics exist before consuming them, but when --regex is passed the topics are to be interpreted as patterns instead of literal values.
What should have happened instead?
--regex flag should disable the topic existence validation added in https://github.com/redpanda-data/redpanda/pull/13330
How to reproduce the issue?
- Create a topic of any name
rpk topic consume --regex '.*'- Observe
UNKNOWN_TOPIC_OR_PARTITIONerror
JIRA Link: CORE-3047