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

[#6422] improve(CLI): Add roles and owner command context CLI #6438

Merged
merged 1 commit into from
Feb 11, 2025

Conversation

Abyss-lord
Copy link
Contributor

What changes were proposed in this pull request?

Add roles and owner command context CLI

Why are the changes needed?

Fix: #6422

Does this PR introduce any user-facing change?

No.

How was this patch tested?

local test.

@Abyss-lord
Copy link
Contributor Author

Hi @justinmclean , could you please review this PR when you have time? I’d really appreciate your feedback.

Copy link
Member

@justinmclean justinmclean left a comment

Choose a reason for hiding this comment

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

LGTM

@justinmclean justinmclean merged commit 423d311 into apache:main Feb 11, 2025
27 checks passed
@Abyss-lord Abyss-lord deleted the improvement-roles-owner branch February 12, 2025 01:31
youngyjd pushed a commit to youngyjd/gravitino that referenced this pull request Feb 14, 2025
…pache#6438)

### What changes were proposed in this pull request?

Add roles and owner command context CLI

### Why are the changes needed?

Fix: apache#6422 

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

local test.
youngyjd added a commit to youngyjd/gravitino that referenced this pull request Feb 14, 2025
* [apache#6384] fix: Gravitino default JVM config mismatches with comments from gravitino-env.sh (apache#6385)

<!--
1. Title: [#<issue>] <type>(<scope>): <subject>
   Examples:
     - "[apache#123] feat(operator): support xxx"
     - "[apache#233] fix: check null before access result in xxx"
     - "[MINOR] refactor: fix typo in variable name"
     - "[MINOR] docs: fix typo in README"
     - "[apache#255] test: fix flaky test NameOfTheTest"
   Reference: https://www.conventionalcommits.org/en/v1.0.0/
2. If the PR is unfinished, please mark this PR as draft.
-->

### What changes were proposed in this pull request?

Update Gravitino JVM memory default.

### Why are the changes needed?

Fix: apache#6384

### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

No test

* [apache#6279] feat (gvfs-fuse): Add gvfs-fuse integration tests for big files and open-file flag test cases (apache#6280)

### What changes were proposed in this pull request?

Add gvfs-fuse integration tests for big files and open-file flag test
cases

### Why are the changes needed?

Fix: apache#6279

### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

IT

* [apache#6380] fix(postgres-sql): Fix errors for PG backend about `delete...limit..` clause. (apache#6393)

### What changes were proposed in this pull request?

PostgreSQL does not support SQL sentences like `DELETE FROM xxxx_table
where xxxx limit 10` , Cluase `limit xxx` is not allowed in the `Delete
syntax`

### Why are the changes needed?

it's a bug.

Fix: apache#6380 

### Does this PR introduce _any_ user-facing change?

N/A

### How was this patch tested?

UT

* [apache#6356] improve(CLI): Add tag support for model in CLI (apache#6360)

### What changes were proposed in this pull request?

 Add tag support for model in CLI.

1. `UntagEntity`
2. `TagEntity`
3. `ListEntityTags`

The logic for handling models in these three methods has been added.
need to add the processing logic to the `RemoveAllTags` method.

### Why are the changes needed?

Fix: apache#6356 

### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

local test.

* [MINOR] fix(gvfs): expose the nested exception for better understanding (apache#6398)

### What changes were proposed in this pull request?

Improve the gvfs to expose the nested exception for better
understanding.

### Why are the changes needed?

The exception message may not be enough to understand the problem why
the fs initialization is failed. So we should expose the whole stack for
better understanding.

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Existing tests.

* [apache#6375] improvment(catalog-hadoop): Remove `protobuf-java` to avoid conflict with authorization module (apache#6376)

### What changes were proposed in this pull request?

Remove jar `protobuf-java.jar` from the distribution package to avoid
conflicts

### Why are the changes needed?

To make authorization works for GCS fileset.

Fix: apache#6375 

### Does this PR introduce _any_ user-facing change?

N/A.

### How was this patch tested?

N/A

* [apache#6394] feat(iceberg): upgrade Iceberg version from 1.5.2 to 1.6.1 (apache#6374)

### What changes were proposed in this pull request?

Upgrade Iceberg version from 1.5.2 to 1.6.1

In 1.6, the `token` endpoint is deprecated and there're no new endpoint
is added.


### Why are the changes needed?

Fix: apache#6394 

### Does this PR introduce _any_ user-facing change?
no

### How was this patch tested?
run pass existing ITs

* [apache#6320] feat (gvfs-fuse): Support mount and umount command for gvfs-fuse command line tools (apache#6321)

### What changes were proposed in this pull request?

1. Support mount and umount command
2. Make mount create a daemon process to run background


### Why are the changes needed?

Fix: apache#6320 

### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

IT

---------

Co-authored-by: Qiming Teng <[email protected]>

* [apache#6357] feat (gvfs-fuse): Passing file type argument in the Filesystem::stat() to improve the performance of open_dal_filesystem (apache#6358)

### What changes were proposed in this pull request?

Passing file type argument in the Filesystem::stat() to improve the
performance of open_dal_filesystem

### Why are the changes needed?

Fix: apache#6357 

### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

UI

---------

Co-authored-by: Qiming Teng <[email protected]>

* [apache#6326] Refactor to add a command context to CLI (apache#6343)

### What changes were proposed in this pull request?

Refactor to add a command context and simple wrappers on output to make
it easy for "global" command like a "--quiet" option to be added.

Note this in progress as this only has changed Metlake. Some duplicate
code can be removed once everything is done.

### Why are the changes needed?

For maintainability.

Fix: apache#6326

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Tested locally.

---------

Co-authored-by: Shaofeng Shi <[email protected]>

* [apache#6407] improve(client-python): Reorganize the python package (apache#6408)

### What changes were proposed in this pull request?

Move the `Fileset` and `Model` related classes to the sub-package for
better organized.

### Why are the changes needed?

For better organized.

Fix: apache#6407 

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Existing tests.

* [apache#5900] feat(tag): support tag pre-event to Gravitino server (apache#5980)

### What changes were proposed in this pull request?

Implemented pre-event handling for all tag-related operations,
including:

- listTags
- listTagsInfo
- getTag
- createTag
- alterTag
- deleteTag
- listMetadataObjectsForTag
- listTagsForMetadataObject
- listTagsInfoForMetadataObject
- associateTagsForMetadataObject
- getTagForMetadataObject

### Why are the changes needed?
Fix: apache#5900

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
add UT

* [apache#6409] fix(client-python): Change to use `GenericFileset`  for the return value of fileset catalog (apache#6410)

### What changes were proposed in this pull request?

This PR changes the return value to `GenericFileset` for fileset
operation.

### Why are the changes needed?

Previously, it returns the plain fileset dto, so that it cannot support
some operations like get credentials.

Fix: apache#6409 

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Existing tests.

* [apache#5932] improve(CLI): Fix the CLI  delete the anonymous user (apache#6359)

### What changes were proposed in this pull request?

Fix the CLI  delete the anonymous user
### Why are the changes needed?

Fix: apache#5932 

### Does this PR introduce _any_ user-facing change?

(Please list the user-facing changes introduced by your change,
including
  1. Change in user-facing APIs.
  2. Addition or removal of property keys.)

### How was this patch tested?

local test

```bash
gcli user delete -m demo_metalake --user anonymous
# Can't delete anonymous user. This will cause unexpected behavior.
```

<img width="536" alt="image"
src="https://github.com/user-attachments/assets/479ec7eb-2ad3-42bd-b70a-a6f2ce05f794"
/>

* [apache#6419] improve(CLI): Add table command context CLI (apache#6428)

### What changes were proposed in this pull request?

Add table command context CLI.

### Why are the changes needed?

Fix: apache#6419 

### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

local test.

* [apache#6415] improve(CLI): Add Fileset command context CLI (apache#6431)

### What changes were proposed in this pull request?

Add Fileset command context CLI

### Why are the changes needed?

Fix: apache#6415 

### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

local test

* [apache#6417] improve(CLI): Add model command context CLI (apache#6430)

### What changes were proposed in this pull request?

Add model command context CLI

### Why are the changes needed?

Fix: apache#6417 

### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

local test

* [apache#6416] improve(CLI): Add schema command context CLI (apache#6427)

### What changes were proposed in this pull request?

Add schema command context CLI

### Why are the changes needed?

Fix: apache#6416 

### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

local test.

* [apache#6414] improve(CLI): Add catalog command context CLI (apache#6425)

### What changes were proposed in this pull request?

Add catalog command context CLI

### Why are the changes needed?

Fix: apache#6414 

### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

local test.

* [apache#6418] improve(CLI): Add stream command context CLI (apache#6434)

### What changes were proposed in this pull request?

Add stream command context CLI

### Why are the changes needed?

Fix: apache#6418 

### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

local test.

* [apache#6420] improve(CLI): Add column command context CLI (apache#6436)

### What changes were proposed in this pull request?

Add column command context CLI

### Why are the changes needed?

Fix: apache#6420 

### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

local test.

* [MINOR] docs: Fix the description of `Multi-engine support` in `overview.md` (apache#6439)

### What changes were proposed in this pull request?
This PR fixes the description of the `Multi-engine support` section in
`overview.md`, as Gravitino now supports connectors for Apache Spark and
Apache Flink.

### Why are the changes needed?
Gravitino now supports connectors for Apache Spark and Apache Flink.


### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
manual review

* [apache#6423] improve(CLI): Add tags command context CLI (apache#6435)

### What changes were proposed in this pull request?

Add tags command context CLI

### Why are the changes needed?

Fix: apache#6423 

### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

local test

* [apache#6421] improve(CLI): Add user and group command context CLI (apache#6437)

### What changes were proposed in this pull request?

 Add user and group command context CLI

### Why are the changes needed?

Fix: apache#6421

### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

local test.

* [apache#6422] improve(CLI): Add roles and owner command context CLI (apache#6438)

### What changes were proposed in this pull request?

Add roles and owner command context CLI

### Why are the changes needed?

Fix: apache#6422 

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

local test.

* [apache#6424] improve(CLI): Refactor getURL in CLI and add context to simple commands. (apache#6440)

### What changes were proposed in this pull request?

Refactor getURL in CLI and add context to simple commands.

### Why are the changes needed?

Fix: apache#6424 

### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

local test.

* [apache#6429] Fixed Wrong log format codes (apache#6433)

### What changes were proposed in this pull request?

The PR updates incorrect log format codes from `%s` to `{}` in the
following lines:

- Line 420
- Line 483
- Line 504
- Line 525

The original code in these lines used the `%s` placeholder, which is
invalid for the logging framework used. It has been corrected to use
`{}` to match the proper syntax for log messages.

### Why are the changes needed?

This change is necessary to fix the incorrect log format codes in the
codebase. The `%s` placeholder is not valid and can lead to incorrect
log formatting or errors when the logs are generated. The correct
placeholder syntax for this logging framework is `{}`.

Fix: apache#6429

### Does this PR introduce _any_ user-facing change?

No user-facing changes are introduced. This is an internal fix for the
logging format.

### How was this patch tested?

The changes were verified manually by reviewing the code and ensuring
that all instances of `%s` were replaced with `{}` in the affected
lines. No new functionality was added, so no additional tests were
required.

* [apache#6361] feat(paimon):Support specifying primary keys during create paimon table by flink (apache#6362)

### What changes were proposed in this pull request?

Support specifying primary keys during create paimon table by flink

### Why are the changes needed?


Fix: apache#6361 

### Does this PR introduce _any_ user-facing change?

None

### How was this patch tested?

Add testCreateTableWithPrimaryKey case in
org.apache.gravitino.flink.connector.integration.test.FlinkCommonIT

* [MINOR] docs: polish Iceberg REST server document (apache#6444)

### What changes were proposed in this pull request?

multi catalog and view operation should shown in document side bars.

### Why are the changes needed?
User could find multi catalog configuration easily

### Does this PR introduce _any_ user-facing change?
no

### How was this patch tested?
just document

* [MINOR] improve(CLI): Remove redundant code in CLI (apache#6443)

### What changes were proposed in this pull request?

Remove redundant code in CLI, and make context argument final in Command
class.

### Why are the changes needed?

The constructor should take only one argument, CommandContext.

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

local test.

* [apache#6097] improve(CLI): Add --quiet option to the Gravitino CLI (apache#6447)

### What changes were proposed in this pull request?

Add --quiet option to the Gravitino CLI

### Why are the changes needed?

Fix: apache#6097 

### Does this PR introduce _any_ user-facing change?

user can use --quiet option suppress the output.

### How was this patch tested?

local test

```bash
gcli tag create -m cli_demo --tag tagA tagB -i
# Tags tagA,tagB created

gcli tag create -m cli_demo --tag tagC tagD -i --quiet
# no output
```

* [apache#6449] improve(CLI): Refactor getAuth method in CLI (apache#6451)

### What changes were proposed in this pull request?

Refactor getAuth method in CLI.

### Why are the changes needed?

Fix: apache#6449

### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

local test.

* [apache#6450] fix(web): fix authentication.type issue (apache#6452)

### What changes were proposed in this pull request?
authentication.type of catalog property should send correct request to
server

### Why are the changes needed?
N/A

Fix: apache#6450

### Does this PR introduce _any_ user-facing change?
N/A

### How was this patch tested?
manually

---------

Co-authored-by: Pucheng Yang <[email protected]>
Co-authored-by: Yuhui <[email protected]>
Co-authored-by: Qi Yu <[email protected]>
Co-authored-by: Lord of Abyss <[email protected]>
Co-authored-by: Jerry Shao <[email protected]>
Co-authored-by: FANNG <[email protected]>
Co-authored-by: Qiming Teng <[email protected]>
Co-authored-by: Justin Mclean <[email protected]>
Co-authored-by: Shaofeng Shi <[email protected]>
Co-authored-by: Lychee <[email protected]>
Co-authored-by: YangJie <[email protected]>
Co-authored-by: Aryan Mahawar <[email protected]>
Co-authored-by: yangyang zhong <[email protected]>
Co-authored-by: Qian Xia <[email protected]>
youngyjd pushed a commit to youngyjd/gravitino that referenced this pull request Feb 14, 2025
…pache#6438)

### What changes were proposed in this pull request?

Add roles and owner command context CLI

### Why are the changes needed?

Fix: apache#6422 

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

local test.
youngyjd pushed a commit to youngyjd/gravitino that referenced this pull request Feb 14, 2025
…pache#6438)

### What changes were proposed in this pull request?

Add roles and owner command context CLI

### Why are the changes needed?

Fix: apache#6422 

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

local test.
youngyjd pushed a commit to youngyjd/gravitino that referenced this pull request Feb 14, 2025
…pache#6438)

### What changes were proposed in this pull request?

Add roles and owner command context CLI

### Why are the changes needed?

Fix: apache#6422 

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

local test.
youngyjd pushed a commit to youngyjd/gravitino that referenced this pull request Feb 14, 2025
…pache#6438)

### What changes were proposed in this pull request?

Add roles and owner command context CLI

### Why are the changes needed?

Fix: apache#6422 

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

local test.
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.

Add roles and owner command context CLI
2 participants