redpanda-data / redpanda-data/redpanda

Do not require `-p` when using `%p` in `rpk topic produce`

Open
#17,697 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.