Fang-Yu Rao created IMPALA-10694:
------------------------------------

             Summary: Improve the error handling in setup-ranger
                 Key: IMPALA-10694
                 URL: https://issues.apache.org/jira/browse/IMPALA-10694
             Project: IMPALA
          Issue Type: Improvement
            Reporter: Fang-Yu Rao
            Assignee: Fang-Yu Rao


Currently 
[setup-ranger()|https://github.com/apache/impala/blob/master/testdata/bin/create-load-data.sh#L329-L388]
 is used to create the Ranger policy repository to perform 
authorization-related tests. We found that the error handling in 
{{setup-ranger()}} could be improved.

For instance, at 
https://github.com/apache/impala/blob/master/testdata/bin/create-load-data.sh#L385-L387,
 we update the policy of id equal to 4, which corresponds to the policy of 
"{{all - database}}". However, it is possible that new default policies are 
added to the policy repository in newer versions of Ranger. When this occurs, 
the policy of id equal to 4 may no longer correspond to the policy of "{{all - 
database}}", resulting in an error returned from the Ranger server. The current 
implementation of {{setup-ranger()}} would not stop in this case. That is, the 
pre-commit tests would continue even if the policy repository was not updated 
correctly, which causes the authorization-related tests to fail later in the 
pre-commit tests. It would thus be good if we could detect such an error in 
{{create-load-data.sh}} before any test is run.




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to