[
https://issues.apache.org/jira/browse/RANGER-5173?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Radhika Kundam resolved RANGER-5173.
------------------------------------
Fix Version/s: 3.0.0
Resolution: Not A Problem
> Fix issue with updating resources for existing DataShare
> --------------------------------------------------------
>
> Key: RANGER-5173
> URL: https://issues.apache.org/jira/browse/RANGER-5173
> Project: Ranger
> Issue Type: Task
> Components: Ranger
> Reporter: Radhika Kundam
> Assignee: Radhika Kundam
> Priority: Major
> Fix For: 3.0.0
>
>
> {{{}POST /dataset/\{id}/resources/{serviceName{}}}} ignores provided
> DataShare ID and always creates a new DataShare.
> *Description:*
> The API {{{}POST /dataset/\{id}/resources/{serviceName{}}}} is designed to
> either:
> # Create a new DataShare with the provided resources, OR
> # Add resources to an existing DataShare when a valid {{dataShareId}} is
> provided in the payload.
> **
> Currently, even if the request payload includes a {{{}dataShareId{}}}, the
> API *ignores it* and always creates a {*}new DataShare{*}, instead of adding
> resources to the existing one. This leads to unintended duplication of
> DataShares.
> *Expected Behavior:*
> * If {{dataShareId}} is present in the payload, the API should add resources
> to the specified DataShare.
> * If {{dataShareId}} is not provided, only then should a new DataShare be
> created.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)