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

fix(authorization-ranger):the descr field of ranger table x_group is not null #4975

Merged
merged 2 commits into from
Sep 27, 2024

Conversation

yangyuxia
Copy link
Contributor

What changes were proposed in this pull request?

When calling the ranger CREATE_GROUP api, the desc field cannot be null

Why are the changes needed?

When calling the ranger CREATE_GROUP api, ranger response is error.

Does this PR introduce any user-facing change?

How was this patch tested?

yes, by hand.

@jerqi jerqi requested a review from xunliu September 20, 2024 10:30
@jerryshao jerryshao added the branch-0.6 Automatically cherry-pick commit to branch-0.6 label Sep 20, 2024
@xunliu
Copy link
Member

xunliu commented Sep 20, 2024

hi @yangyuxia Thank you for your report on this issue.

But Gravitino has integration test the here: https://github.com/apache/gravitino/blob/main/authorizations/authorization-ranger/src/test/java/org/apache/gravitino/authorization/ranger/integration/test/RangerHiveIT.java#L715

and I execute this IT, doesn't found any probleam
image

Please tell me, what version Apache Ranger are you using?

@yangyuxia
Copy link
Contributor Author

I test with ranger 2.1.0,found error:
[EL Warning]: 2024-09-19 10:02:23.45--ClientSession(1124729650)--Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.e
clipse.persistence.exceptions.DatabaseException
Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column 'descr' cannot be null
Error Code: 1048
Call: INSERT INTO x_group (ADDED_BY_ID, CREATE_TIME, CRED_STORE_ID, DESCR, GROUP_SRC, GROUP_TYPE, IS_VISIBLE, GROUP_NAME, OTHER_ATTRIBUTES, STATUS, UPDATE_TI
ME, UPD_BY_ID) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
bind => [12 parameters bound]
Query: ValueReadQuery(name="X_GROUP_SEQ" sql="SELECT LAST_INSERT_ID()")

image

@jerryshao
Copy link
Contributor

@xunliu can you please review this?

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.

@yangyuxia Thank you fixed this issue.
LGTM

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.

Please execute ./gradlew :authorizations:authorization-ranger:spotlessApply to fix CI failed.

@jerryshao
Copy link
Contributor

@yangyuxia would you please fix the conflicts here, we will merge it to 0.6.1 release.

@yangyuxia
Copy link
Contributor Author

fixed

@jerryshao jerryshao closed this Sep 27, 2024
@jerryshao jerryshao reopened this Sep 27, 2024
@jerryshao jerryshao requested a review from xunliu September 27, 2024 08:23
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 78b5116 into apache:main Sep 27, 2024
49 checks passed
github-actions bot pushed a commit that referenced this pull request Sep 27, 2024
…not null (#4975)

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

When calling the ranger CREATE_GROUP api, the desc field cannot be null

### Why are the changes needed?

When calling the ranger CREATE_GROUP api,  ranger response is error.

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



### How was this patch tested?

yes, by hand.

---------

Co-authored-by: yangyx <[email protected]>
@yangyuxia yangyuxia deleted the main_authorization_ranger branch October 10, 2024 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch-0.6 Automatically cherry-pick commit to branch-0.6
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants