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

[#6235] fix(authz): fix PathBasedMetadataObject toString method #6252

Merged
merged 10 commits into from
Jan 20, 2025

Conversation

Abyss-lord
Copy link
Contributor

What changes were proposed in this pull request?

fix PathBasedMetadataObject#toString method.

Why are the changes needed?

Fix: #6235

Does this PR introduce any user-facing change?

No.

How was this patch tested?

local ut test.

@Abyss-lord
Copy link
Contributor Author

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

@xunliu xunliu changed the title [#6235] fix(authorizations): fix PathBasedMetadataObject toString method [#6235] fix(authz): fix PathBasedMetadataObject toString method Jan 15, 2025
@tengqm
Copy link
Contributor

tengqm commented Jan 15, 2025

LGTM

hdygxsj and others added 9 commits January 16, 2025 11:29
…on-catalog (apache#6224)

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

Support basic table DDL Operation for paimon-catalog

### Why are the changes needed?

Fix: apache#5194

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

None.

### How was this patch tested?


org.apache.gravitino.flink.connector.integration.test.paimon.FlinkPaimonCatalogIT
### What changes were proposed in this pull request?

Add missing `@override` annotations

### Why are the changes needed?

Fix:  apache#6237

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

### How was this patch tested?
N/A
…ate the plugin (apache#6246)

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

Authorization should use classloader to create the plugin

### Why are the changes needed?

Fix: apache#6245

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

No.

### How was this patch tested?

I tested it manually.
…-connector.md (apache#6259)

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

Replace `=` with `:` to correct the yaml example.

### Why are the changes needed?
The yaml example uses wrong seperator.

Fix: apache#6243

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

### How was this patch tested?
None.
### What changes were proposed in this pull request?

Fix several errors in the document about hadoop-catalog and hive-catalog

### Why are the changes needed?

Improving the user experience. 

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

N/A.

### How was this patch tested?

N/A.
### What changes were proposed in this pull request?

Remove unnecessary toSrting() from CLI

### Why are the changes needed?

Fix: [#(6239)](apache#6239)

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

N/A

### How was this patch tested?

N/A
…oups in the Gravitino CLI. (apache#6240)

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

Add ability to revoke all roles from a user or group in the Gravitino
CLI.
1. Add logic to handle the `--all` flag in
`UserCommandHandler#handleRevokeCommand`;
2. Add logic to handle the `--all `flag in
`GroupCommandHandler#handleRevokeCommand`;
3. Add new `RemoveAllRoles` command to handle user revoke --all and
group revoke `--all`;
4. Add unit tests;

### Why are the changes needed?

Fix: apache#5570 

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

No

### How was this patch tested?

UT + local test.

User test.

```bash
# step1: grant roles to testRole
gcli user grant -m demo_metalake --user testRole --role roleA roleB roleC -I
# roleA added to testRole
# roleB added to testRole
# roleC added to testRole
# Add roles roleA, roleB, roleC to user testRole

# step2: get details of testRole 
gcli user details -m demo_metalake --user testRole -I
# roleA,roleC,roleB

# step3: revoke all roles from testRole
gcli user revoke -m demo_metalake --user testRole -i --all
# Remove all roles from user testRole

# step4: get details of testRole
gcli user details -m demo_metalake --user testRole -I
# The user has no roles.

# step5: list exists roles
gcli role list -m demo_metalake -I
# admin,roleA,roleB,roleC
```

Group test.

```bash
# step1: grant roles to test_group
gcli group grant -m demo_metalake --group test_group --role roleA roleB roleC -I
# roleA added to test_group
# roleB added to test_group
# roleC added to test_group
# Grant roles roleA, roleB, roleC to group test_group

# step2: get details of test_group
gcli group details -m demo_metalake --group test_group -I
# admin,roleA,roleC,roleB

# step3: revoke all roles from test_group
gcli group revoke -m demo_metalake --group test_group -i --all
# Remove all roles from group test_group

# step4: get details of test_group
gcli group details -m demo_metalake --group test_group -I
# The group has no roles.

# step5: list exists roles
gcli role list -m demo_metalake -I
# admin,roleA,roleB,roleC
```

---------

Co-authored-by: Chun-Hao Liu <[email protected]>
Co-authored-by: yangyang zhong <[email protected]>
Co-authored-by: Xiaojian Sun <[email protected]>
Co-authored-by: roryqi <[email protected]>
Co-authored-by: TengYao Chi <[email protected]>
Co-authored-by: Qi Yu <[email protected]>
@justinmclean
Copy link
Member

justinmclean commented Jan 16, 2025

I agree with @xunliu above that pathStr is perhaps not the best name, as we usually don't postfix types on our variable names.

@Abyss-lord
Copy link
Contributor Author

I agree with @xunliu above that pathStr is perhaps not the best name, as we usually don't postfix types on our variable names.

Thank you Justin, I just fix this error.

Copy link
Member

@xunliu xunliu left a comment

Choose a reason for hiding this comment

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

LGTM

@jerryshao jerryshao merged commit 2bd2251 into apache:main Jan 20, 2025
25 checks passed
@Abyss-lord Abyss-lord deleted the fix-string branch January 20, 2025 04:34
Abyss-lord added a commit to Abyss-lord/gravitino that referenced this pull request Jan 20, 2025
…apache#6252)

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

fix `PathBasedMetadataObject#toString` method.

### Why are the changes needed?

Fix: apache#6235 

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

No.

### How was this patch tested?

local ut test.

---------

Co-authored-by: yangyang zhong <[email protected]>
Co-authored-by: Xiaojian Sun <[email protected]>
Co-authored-by: roryqi <[email protected]>
Co-authored-by: TengYao Chi <[email protected]>
Co-authored-by: Qi Yu <[email protected]>
Co-authored-by: Chun-Hao Liu <[email protected]>
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.

[Improvement] Issue with PathBasedMetadataObject.java toString method
10 participants