Skip to content

Regression: rpk topic consume --regex never works #18602

@brasic

Description

@brasic

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 #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 #13330

How to reproduce the issue?

  1. Create a topic of any name
  2. rpk topic consume --regex '.*'
  3. Observe UNKNOWN_TOPIC_OR_PARTITION error

JIRA Link: CORE-3047

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions