Skip to content
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

[#5061] Basic user and group CLI #5133

Merged
merged 108 commits into from
Nov 8, 2024
Merged

Conversation

justinmclean
Copy link
Member

What changes were proposed in this pull request?

Added basic user and group commands.

Why are the changes needed?

For the CLI to support users and groups.

Fix: #5061

Does this PR introduce any user-facing change?

No, but extends CLI support.

How was this patch tested?

Tested locally.

@justinmclean
Copy link
Member Author

I am waiting on #5057 and #5059 to be merged, so those PRs changes are included.

@justinmclean justinmclean self-assigned this Oct 15, 2024
justinmclean and others added 14 commits November 5, 2024 10:03
# Conflicts:
#	clients/cli/src/main/java/org/apache/gravitino/cli/GravitinoCommandLine.java
#	clients/cli/src/main/java/org/apache/gravitino/cli/GravitinoOptions.java
# Conflicts:
#	clients/cli/src/main/java/org/apache/gravitino/cli/ErrorMessages.java
#	clients/cli/src/main/java/org/apache/gravitino/cli/GravitinoCommandLine.java
#	clients/cli/src/main/java/org/apache/gravitino/cli/GravitinoOptions.java
#	clients/cli/src/main/java/org/apache/gravitino/cli/Properties.java
#	clients/cli/src/test/java/org/apache/gravitino/cli/PropertiesTest.java
#	docs/cli.md
@justinmclean
Copy link
Member Author

@shaofengshi @jerryshao I've updated the PR with the main branch now that the second CLI PR has been merged - can you please review.


// Properties option can have multiple values
Option properties =
createArgOption("p", PROPERTIES, "comma separated property name/value pairs");
properties.hasArgs();
Option.builder("p").longOpt(PROPERTIES).desc("property name/value pairs").hasArgs().build();
Copy link
Contributor

Choose a reason for hiding this comment

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

"comma separated" is a necessary description for the properties I think, why not keep it?

Copy link
Member Author

Choose a reason for hiding this comment

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

The option has been updated, and they no longer have to be comma separated - see the description in cli.md.

Copy link
Contributor

Choose a reason for hiding this comment

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

I see; This change is irrelavant with current PR, now mixed with other changes; Next time please use a seperate PR, that will be helpful for review as well as code management (revert, cherry-pick, etc).

docs/cli.md Outdated Show resolved Hide resolved
docs/cli.md Outdated Show resolved Hide resolved
docs/cli.md Outdated Show resolved Hide resolved
* @return A map of entries, where each entry represents a key-value pair from the input string.
*/
public Map<String, String> parse(String input) {
public Map<String, String> parse(String[] inputs) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this change related with the "user and group" CLI? seems it has already been handled in previous PR, please double check whether this is a code merge issue.

Copy link
Member Author

Choose a reason for hiding this comment

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

It not a code merge issue - the way properties have been handled have been improved

@justinmclean
Copy link
Member Author

@shaofengshi all comments addressed this is ready for review again.

Copy link
Contributor

@shaofengshi shaofengshi left a comment

Choose a reason for hiding this comment

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

LGTM

@shaofengshi shaofengshi merged commit 3a21ce4 into apache:main Nov 8, 2024
21 checks passed
@justinmclean justinmclean deleted the CLI_III branch December 9, 2024 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Users and Groups
2 participants