Skip to content

Conversation

@lavishpal
Copy link
Contributor

This pr add the Validate and AddFlags() function in the command_get.go
part of #1026
ref comment

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: lavishpal
Once this PR has been reviewed and has the lgtm label, please assign elbehery for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@lavishpal
Copy link
Contributor Author

cc: @ivanvc , @Elbehery

@lavishpal lavishpal changed the title Add the Validate and AddFlags() function chore : add the Validate and AddFlags() function Jan 16, 2026
@ivanvc
Copy link
Member

ivanvc commented Jan 16, 2026

/ok-to-test

@Elbehery
Copy link
Member

The failed test is expected on Windows platform.

The writer is being blocked by the long running reader.

@ahrtr Would relaxing the assertion be fine on Windows env ?

@Elbehery
Copy link
Member

raised #1136 for fix the failing test

Comment on lines +71 to +78
path := args[0]
buckets := args[1 : len(args)-1]
keyStr := args[len(args)-1]

key, err := parseBytes(keyStr, o.parseFormat)
if err != nil {
return err
}
Copy link
Member

@ahrtr ahrtr Jan 17, 2026

Choose a reason for hiding this comment

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

This seems duplicated to the validate.

It is OK to add a separate AddFlags, but I do not see much value to add a separate Validate. Two proposals:

  • [preferred] remove the Validate method, do the validation in Run directly.
  • add the parsed arguments as fields in getOptions, so that Run can use them directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

5 participants