redpanda-data / redpanda-data/redpanda
Do not require `-p` when using `%p` in `rpk topic produce`
Open
Nobody has claimed this yet.
area/rpk
kind/enhance
- Dominant language
- C++
- Stars
- 12.6k
- Forks
- 792
- PR merge metrics
- No merged PRs in 30d
Description
Who is this for and what problem do they have today?
It is confusing that this flag's value is not used, but changes the format's behavior.
❯ rpk topic produce mytopic -f "%p %v\n"
1 a
Produced to partition 0 at offset 6 with timestamp 1712567714375.
2 b
Produced to partition 0 at offset 7 with timestamp 1712567716705.
3 c
Produced to partition 0 at offset 8 with timestamp 1712567722342.
^C
❯ rpk topic produce mytopic -f "%p %v\n" -p 1
1 a
Produced to partition 1 at offset 17 with timestamp 1712567729382.
2 b
Produced to partition 2 at offset 3 with timestamp 1712567730481.
3 c
Produced to partition 3 at offset 4 with timestamp 1712567731884.
What are the success criteria?
Why is solving this problem impactful?
Additional notes
JIRA Link: CORE-2175
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the two rpk topic produce commands shown in the issue, then inspect the rpk topic produce entry point and how -p interacts with %p. Done means %p works without requiring -p, while explicitly supplying -p retains the demonstrated partition behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100