-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
base: trunk
Are you sure you want to change the base?
Conversation
Signed-off-by: Tsung-Han Ho (Miles Ho) <mystes3016@gmail.com>
There was a problem hiding this 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?
There was a problem hiding this 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.
4076dbf
to
98cbc0a
Compare
Signed-off-by: Tsung-Han Ho (Miles Ho) <mystes3016@gmail.com>
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); |
There was a problem hiding this comment.
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.
The bug was a duplicate parameter validation in the
DelegationTokenCommand
class. ThecheckInvalidArgs
method for thedescribeOpt
was incorrectly includingrenewTimePeriodOpt
twice inthe set of invalid arguments.
This bug will cause the unexpected command error like the picture below
