Radhika Kundam created RANGER-5173:
--------------------------------------

             Summary: 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


{{{}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)

Reply via email to