OpenConceptLab / ocl_issues

Issues for all OCL repos. NOTE: Install ZenHub Browser Extension and request access to the OCL Roadmap board to view all issues and to contribute
4 stars 2 forks source link

Only create new concept/mapping version if the resource has changed #1746

Open paynejd opened 8 months ago

paynejd commented 8 months ago

Whether updating a single resource in the UI or the API, or performing a bulk import that is updating an existing repo (e.g. like CIEL), a concept or mapping's standard checksum should indicate whether or not the resource in the request represents a change. If there is a change, then the API should proceed as usual and attempt to update the resource (with no change to the response codes that are currently used). However if there is no change (i.e. the standard checksums are equal), then the API should not update the resource and it should return a different response code.

Which response code?

Neither of these seem quite right though because it's not an error or a redirect. I would think that it should be a 2** code, possibly with a response header to give more info?

snyaggarwal commented 8 months ago
  1. This is behind toggle PREVENT_DUPLICATE_VERSION_TOGGLE which is true on QA/Dev only.
  2. This relies on standard checksum of Concept and Mapping
  3. This applies on import and UI both.
  4. Currently PUT request returns 400 bad request and error body
paynejd commented 7 months ago

@snyaggarwal to update response code and then @paynejd to do final review

snyaggarwal commented 7 months ago

@paynejd This will return 208 status code. Will also have separate section in import summary/response in field unchanged.

snyaggarwal commented 7 months ago

@paynejd Whats next on this one? We cannot close this yet, as this is not enabled on all env. how do we test this and inform users? Also this needs to be added in docs

paynejd commented 7 months ago

Sunny- where is it documented which fields are included in the standard and smart checksums for both concepts and mappings? We need to be very confident in at least the standard checksum list before this feature moves out of testing. Feel free to drop it in this ticket, and we can review on the architecture call and then move it over to OCL Docs.

On Wed, Mar 13, 2024 at 12:55 AM Sunny Aggarwal @.***> wrote:

@paynejd https://github.com/paynejd Whats next on this one? We cannot close this yet, as this is not enabled on all env. how do we test this and inform users?

— Reply to this email directly, view it on GitHub https://github.com/OpenConceptLab/ocl_issues/issues/1746#issuecomment-1993525842, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJCOOO62GXOQV4MY35HJE3YX7L4PAVCNFSM6AAAAABCPP5YK6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJTGUZDKOBUGI . You are receiving this because you were mentioned.Message ID: @.***>

snyaggarwal commented 7 months ago

documentation https://github.com/OpenConceptLab/ocl_issues/issues/1811

paynejd commented 6 months ago

This one is getting really close. Next steps that I can think of -- more to add?