You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by "Kundan Kumar Jha (Jira)" <ji...@apache.org> on 2024/01/29 07:04:00 UTC

[jira] [Created] (RANGER-4678) Delete request on service/audit/metrics api is returning 204 for all type of params

Kundan Kumar Jha created RANGER-4678:
----------------------------------------

             Summary: Delete request on service/audit/metrics api is returning 204 for all type of params
                 Key: RANGER-4678
                 URL: https://issues.apache.org/jira/browse/RANGER-4678
             Project: Ranger
          Issue Type: Bug
          Components: Ranger
            Reporter: Kundan Kumar Jha


*PROBLEM STATEMENT:*
Delete request on service/audit/metrics Api is returning 204 status code for both existing param or non-existing param.

Either make delete request with existing service name and type or non-existing service name and type in both cases its returning 204 as status code.

*STEPS TO REPRODUCE:*
1. Create metrics for serviceName="cm_hive" and serviceType="hive" by making POST call on "/service/audit/metrics" endpoint with following payload:
{code:java}
{  "serviceType": "hive",  "serviceName": "cm_hive",  "appId": "hive",  "clusterName": "Cluster 1",  "throughPutUnit": "PER MINUTE",  "numberOfAudits": 6799,  "clientIP": "172.27.18.78",  "metricsText": {    "metrics": {      "1m": 5000    }  }} {code}
2. Then Try to delete the metrics by making delete request on "/service/audit/metrics?retentionPeriod=1&serviceName={*}cm_hive{*}&serviceType={*}hive{*}" endpoint. The status code will be 204 without any response text. Here serviceName and serviceType are existent.

3. But if a delete request is performed on "/service/audit/metrics?retentionPeriod=1&serviceName={*}cm_hive_unknown{*}&serviceType={*}hive_unknown{*}". Then also it will return 204 as status code without any response text for non-existent service name and type.

*CURRENT BEHAVIOUR:*

Right now getting 204 for both the cases even if the service name and type exist or not.

*EXPECTED BEHAVIOUR:*
The response code should be proper and different for both cases with proper response text.

*OCCURRENCE:*
manual testingĀ 

*IMPACT:*
User not able to identify is the delete operation went though correctly or not. The input param provided by user to delete is correct or not.
h4.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)