Skip to content

MINOR: Remove duplicate renewTimePeriodOpt in DelegationTokenCommand validation #20177

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from

Conversation

dalaoqi
Copy link
Contributor

@dalaoqi dalaoqi commented Jul 16, 2025

The bug was a duplicate parameter validation in the
DelegationTokenCommand class. The checkInvalidArgs method for the
describeOpt was incorrectly including renewTimePeriodOpt twice in
the set of invalid arguments.

This bug will cause the unexpected command error like the picture below
image

Signed-off-by: Tsung-Han Ho (Miles Ho) <mystes3016@gmail.com>
@github-actions github-actions bot added triage PRs from the community tools small Small PRs labels Jul 16, 2025
Copy link
Collaborator

@Yunyung Yunyung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the patch. Could you add a test for this?

@github-actions github-actions bot removed the triage PRs from the community label Jul 17, 2025
Copy link
Contributor

@frankvicky frankvicky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please elaborate on why we need this patch and what consequences this bug will cause.

@github-actions github-actions bot added streams core Kafka Broker consumer kraft storage Pull requests that target the storage module tiered-storage Related to the Tiered Storage feature clients group-coordinator and removed small Small PRs labels Jul 22, 2025
@dalaoqi dalaoqi force-pushed the remove-duplicate-renewTimePeriodOpt branch from 4076dbf to 98cbc0a Compare July 22, 2025 17:11
@github-actions github-actions bot added the small Small PRs label Jul 22, 2025
Signed-off-by: Tsung-Han Ho (Miles Ho) <mystes3016@gmail.com>
@github-actions github-actions bot removed the small Small PRs label Jul 22, 2025
Comment on lines +148 to +149
String[] args = {"--bootstrap-server", "localhost:9092", "--command-config", "testfile", "--create", "--max-life-time-period", "604800000", "--hmac", "test-hmac"};
DelegationTokenCommand.DelegationTokenCommandOptions opts = new DelegationTokenCommand.DelegationTokenCommandOptions(args);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For --create command, --renew-time-period and --expiry-time-period are invalid arguments as well. Could you also add them to the case? We also need similar update for different commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-approved clients consumer core Kafka Broker group-coordinator kraft storage Pull requests that target the storage module streams tiered-storage Related to the Tiered Storage feature tools
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants