dataops-observability icon indicating copy to clipboard operation
dataops-observability copied to clipboard

API: Journey Dag endpoints accepts duplicate edges

Open aarthy-dk opened this issue 1 year ago • 0 comments

Steps to reproduce

  • Send a request to PUT /observability/v1/journeys/:journey_id/dag like this: {"right": "<some_component_id>"}. 201 response is returned as expected.
  • Send the request again. Another 201 is returned, and a duplicate single-node edge is created in the database.

Expected behavior

The second call should have returned 409.

Note: The behavior works correctly in the case of 2-node edges, e.g., {"right": "<some_component_id>", "left": "<other_component_id>"}.

Impact

Users creating journeys through the API may inadvertently create duplicated data on the system. The DAG display in the UI does not seem to be affected.

aarthy-dk avatar Apr 20 '24 02:04 aarthy-dk