Re: Review Request 74927: RANGER-4727: When tagDef delete fails, error message is not returned

2024-03-05 Thread Madhan Neethiraj

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74927/#review226287
---


Ship it!




Ship It!

- Madhan Neethiraj


On March 5, 2024, 7:32 a.m., Subhrat Chaudhary wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74927/
> ---
> 
> (Updated March 5, 2024, 7:32 a.m.)
> 
> 
> Review request for ranger, Anand Nadar, Asit Vadhavkar, Madhan Neethiraj, 
> Monika Kachhadiya, and Siddhesh Phatak.
> 
> 
> Bugs: RANGER-4727
> https://issues.apache.org/jira/browse/RANGER-4727
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> When tagDef and a linked tag is created, and delete of the tagDef is 
> attempted with DELETE API - /service/tags/tagdef/{tagDefId}, it fails with 
> 400 and no error message is returned.
> This is fixed by adding a check and throw excpetion with proper message - if 
> the linked tag exists.
> 
> 
> Diffs
> -
> 
>   security-admin/src/main/java/org/apache/ranger/biz/TagDBStore.java 
> fb912d4f8 
>   security-admin/src/main/java/org/apache/ranger/common/RESTErrorUtil.java 
> ed3ed5eca 
> 
> 
> Diff: https://reviews.apache.org/r/74927/diff/1/
> 
> 
> Testing
> ---
> 
> Validated the the API with curl for the tagDef - PII_LOCATION (linked tag is 
> exists), the error response contains message:
> {"statusCode":0,"msgDesc":"Cannot delete tag: PII_LOCATION, please delete 
> linked resources first"}
> 
> Validated existing JUnits are passing
> 
> 
> Thanks,
> 
> Subhrat Chaudhary
> 
>



Re: Review Request 74927: RANGER-4727: When tagDef delete fails, error message is not returned

2024-03-05 Thread Kishor Gollapalliwar

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74927/#review226286
---


Ship it!




Ship It!

- Kishor Gollapalliwar


On March 5, 2024, 7:32 a.m., Subhrat Chaudhary wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74927/
> ---
> 
> (Updated March 5, 2024, 7:32 a.m.)
> 
> 
> Review request for ranger, Anand Nadar, Asit Vadhavkar, Madhan Neethiraj, 
> Monika Kachhadiya, and Siddhesh Phatak.
> 
> 
> Bugs: RANGER-4727
> https://issues.apache.org/jira/browse/RANGER-4727
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> When tagDef and a linked tag is created, and delete of the tagDef is 
> attempted with DELETE API - /service/tags/tagdef/{tagDefId}, it fails with 
> 400 and no error message is returned.
> This is fixed by adding a check and throw excpetion with proper message - if 
> the linked tag exists.
> 
> 
> Diffs
> -
> 
>   security-admin/src/main/java/org/apache/ranger/biz/TagDBStore.java 
> fb912d4f8 
>   security-admin/src/main/java/org/apache/ranger/common/RESTErrorUtil.java 
> ed3ed5eca 
> 
> 
> Diff: https://reviews.apache.org/r/74927/diff/1/
> 
> 
> Testing
> ---
> 
> Validated the the API with curl for the tagDef - PII_LOCATION (linked tag is 
> exists), the error response contains message:
> {"statusCode":0,"msgDesc":"Cannot delete tag: PII_LOCATION, please delete 
> linked resources first"}
> 
> Validated existing JUnits are passing
> 
> 
> Thanks,
> 
> Subhrat Chaudhary
> 
>



Re: Review Request 74927: RANGER-4727: When tagDef delete fails, error message is not returned

2024-03-05 Thread Asit Vadhavkar

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74927/#review226284
---


Ship it!




Ship It!

- Asit Vadhavkar


On March 5, 2024, 7:32 a.m., Subhrat Chaudhary wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74927/
> ---
> 
> (Updated March 5, 2024, 7:32 a.m.)
> 
> 
> Review request for ranger, Anand Nadar, Asit Vadhavkar, Madhan Neethiraj, 
> Monika Kachhadiya, and Siddhesh Phatak.
> 
> 
> Bugs: RANGER-4727
> https://issues.apache.org/jira/browse/RANGER-4727
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> When tagDef and a linked tag is created, and delete of the tagDef is 
> attempted with DELETE API - /service/tags/tagdef/{tagDefId}, it fails with 
> 400 and no error message is returned.
> This is fixed by adding a check and throw excpetion with proper message - if 
> the linked tag exists.
> 
> 
> Diffs
> -
> 
>   security-admin/src/main/java/org/apache/ranger/biz/TagDBStore.java 
> fb912d4f8 
>   security-admin/src/main/java/org/apache/ranger/common/RESTErrorUtil.java 
> ed3ed5eca 
> 
> 
> Diff: https://reviews.apache.org/r/74927/diff/1/
> 
> 
> Testing
> ---
> 
> Validated the the API with curl for the tagDef - PII_LOCATION (linked tag is 
> exists), the error response contains message:
> {"statusCode":0,"msgDesc":"Cannot delete tag: PII_LOCATION, please delete 
> linked resources first"}
> 
> Validated existing JUnits are passing
> 
> 
> Thanks,
> 
> Subhrat Chaudhary
> 
>



Review Request 74927: RANGER-4727: When tagDef delete fails, error message is not returned

2024-03-04 Thread Subhrat Chaudhary via Review Board

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74927/
---

Review request for ranger, Anand Nadar, Asit Vadhavkar, Madhan Neethiraj, 
Monika Kachhadiya, and Siddhesh Phatak.


Bugs: RANGER-4727
https://issues.apache.org/jira/browse/RANGER-4727


Repository: ranger


Description
---

When tagDef and a linked tag is created, and delete of the tagDef is attempted 
with DELETE API - /service/tags/tagdef/{tagDefId}, it fails with 400 and no 
error message is returned.
This is fixed by adding a check and throw excpetion with proper message - if 
the linked tag exists.


Diffs
-

  security-admin/src/main/java/org/apache/ranger/biz/TagDBStore.java fb912d4f8 
  security-admin/src/main/java/org/apache/ranger/common/RESTErrorUtil.java 
ed3ed5eca 


Diff: https://reviews.apache.org/r/74927/diff/1/


Testing
---

Validated the the API with curl for the tagDef - PII_LOCATION (linked tag is 
exists), the error response contains message:
{"statusCode":0,"msgDesc":"Cannot delete tag: PII_LOCATION, please delete 
linked resources first"}

Validated existing JUnits are passing


Thanks,

Subhrat Chaudhary