apache / gravitino

World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.
https://gravitino.apache.org
Apache License 2.0
978 stars 307 forks source link

[Bug report] authorizations:authorization-ranger:test FAILED (Cron Integration Test 20241013) #5126

Open danhuawang opened 23 hours ago

danhuawang commented 23 hours ago

Version

main branch

Describe what's wrong

RangerHiveE2EIT > testAllowUseSchemaPrivilege() FAILED

Error message and/or stacktrace

> Task :authorizations:authorization-ranger:test

RangerHiveE2EIT > testAllowUseSchemaPrivilege() FAILED
    java.lang.RuntimeException: org.apache.ranger.RangerServiceException: Ranger API org.apache.ranger.RangerClient$API@41018b17 failed: statusCode=400, status=Bad Request, response:{"statusCode":1,"msgDesc":"(0) Validation failure: error code[3006], reason[Another policy already exists for this name: policy-id=[15], service=[hiveDev]], field[policy name], subfield[null], type[semantically incorrect] (1) Validation failure: error code[3010], reason[Another policy already exists for matching resource: policy-name=[rangerhivee2eit_catalog_5d6abec7.rangerhivee2eit_schema_1509b955], service=[hiveDev]], field[resources], subfield[null], type[semantically incorrect] "}
        at org.apache.gravitino.authorization.ranger.RangerAuthorizationPlugin.doAddSecurableObject(RangerAuthorizationPlugin.java:455)
        at org.apache.gravitino.authorization.ranger.RangerAuthorizationPlugin.onRoleUpdated(RangerAuthorizationPlugin.java:152)
        at org.apache.gravitino.authorization.ranger.RangerAuthorizationPlugin.onRoleCreated(RangerAuthorizationPlugin.java:116)
        at org.apache.gravitino.authorization.ranger.integration.test.RangerHiveE2EIT.testAllowUseSchemaPrivilege(RangerHiveE2EIT.java:236)

        Caused by:
        org.apache.ranger.RangerServiceException: Ranger API org.apache.ranger.RangerClient$API@41018b17 failed: statusCode=400, status=Bad Request, response:{"statusCode":1,"msgDesc":"(0) Validation failure: error code[3006], reason[Another policy already exists for this name: policy-id=[15], service=[hiveDev]], field[policy name], subfield[null], type[semantically incorrect] (1) Validation failure: error code[3010], reason[Another policy already exists for matching resource: policy-name=[rangerhivee2eit_catalog_5d6abec7.rangerhivee2eit_schema_1509b955], service=[hiveDev]], field[resources], subfield[null], type[semantically incorrect] "}
            at app//org.apache.ranger.RangerClient.responseHandler(RangerClient.java:521)
            at app//org.apache.ranger.RangerClient.callAPI(RangerClient.java:563)
            at app//org.apache.ranger.RangerClient.createPolicy(RangerClient.java:256)
            at app//org.apache.gravitino.authorization.ranger.RangerAuthorizationPlugin.doAddSecurableObject(RangerAuthorizationPlugin.java:450)
            ... 3 more

18 tests completed, 1 failed
:authorizations:authorization-ranger:test failure marker

> Task :authorizations:authorization-ranger:test FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.2/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
37 actionable tasks: 3 executed, 34 up-to-date
Error: Process completed with exit code 1.

How to reproduce

It can be reproduced by Cron Integration Test 20241013

Additional context

No response

jerryshao commented 14 hours ago

@xunliu @jerqi please help to check this.

xunliu commented 14 hours ago

This issue is related to CI environment, not the code bug, we can fix it in the future.