hashmapinc / Drillflow

A dockerized WITSML API Server that is agnostic of the backend.
Apache License 2.0
17 stars 13 forks source link

DEV: Well: Determine Code Impact to client PUT API Change #678

Open niaalex opened 5 years ago

niaalex commented 5 years ago

619 - DEV: Determine Code Impact to client PUT API Change

DEV: Analysis: small (search codebase for usage & determine code change) DEV: Code & Test: TBD

Per client, the current PUT API of some DoT services provides partial update behavior, which is wrong (The correct PUT behavior is to create a new resource or replace whole existing resource). This is DoT technical debt and we’re going to correct them. Below PUT APIs behavior needs correction:

PUT /witsml/wells/{uid} PUT /witsml/wellbores/{uid} PUT /witsml/trajectories/{uid}

Before any code change on DoT side, could you please confirm whether Drillflow relies on above APIs partial update? If yes, please adjust code accordingly. After that, we will update DoT code.

Thanks, Xiaobin

Mike-d-s commented 5 years ago

@TessForGithub2 Theresa, for this card history, can you please confirm whether we use the PUT API for Update in store behavior for well? I believe you looked at this?

Mike-d-s commented 5 years ago

This card can be moved back to the well backlog after adding notes about how we use the PUT API.

Mike-d-s commented 5 years ago

WELL -- Currently use endpoint ...well/v2/witsml/wells/ as PUT Refer to the SLB demo website: democore/Slb.Prism.Core.Service.Well-2 which states: "Create a well object with uid specified or Update a well object in 1.4.1.1 format" (NOTE: this was designed to accommodate both a creation or an update.) Need to use endpoint ...well/v2/witsml/wells/ as PATCH Refer to the SLB demo website: democore/Slb.Prism.Core.Service.Well-2 which states: "Patch well in 1.4.1.1 format"

ESTIMATE OF CODE IMPACT: Based on the following facts, I estimate this as MEDIUM:

The same endpoint is used, just a PATCH vs. PUT. However, the SLB schema for PATCH is significantly less defined & there appears to be fewer elements in the PATCH (therefore, some type of data mapping and/or data validation may need to be performed to successfully use this endpoint).

niaalex commented 5 years ago

@Mike-d-s please advise the plan for this as it appears to impact the client inquiry c/o PUT vs. Patch API

niaalex commented 5 years ago

Confirmed that the level of effort to implement this change has been evaluated but this is not prioritized as a part of the current sprint (Sprint 20 8/27-9/13). The client team can advise if they would like the priority changed on this one and the team will revise the sprint plan accordingly.