msupply-foundation / open-msupply

Open mSupply represents our most recent advancement in the Logistics Management Information System (LMIS), expanding on more than two decades of development inherited from the well-established legacy of the original mSupply.
https://msupply.foundation/open-msupply/
Other
20 stars 12 forks source link

Circular sync of currencies #3631

Open andreievg opened 4 months ago

andreievg commented 4 months ago

What went wrong? 😲

While on demo server i noticed that sync is circular:

https://github.com/msupply-foundation/open-msupply/assets/26194949/38bbf0fe-18be-469b-9772-c6b28933575e

I ran this in postgres on demo server:

select * from changelog_deduped order by cursor DESC limit 3

And got this (after each re-sync)

Screenshot 2024-04-17 at 11 21 39 AM Screenshot 2024-04-17 at 11 21 24 AM Screenshot 2024-04-17 at 11 20 52 AM

Expected behaviour 🤔

Should not have circular sync

How to Reproduce 🔨

I haven't tried to re-produce sorry, but would suggest trying to add currencies locally (sorry not familiar with this area)

Steps to reproduce the behaviour:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Your environment 🌱

Demo server 1.7.00

andreievg commented 4 months ago

Would be great to have circular sync checks be added to some overall test case, not currency specific, but now and again for testers to do manual sync, and if looks circular to share database

Chris-Petty commented 4 months ago

Hmm I think @nisha-dangol did notice that there are some odd sync records that seem to always be present. Is weird that it's currencies as they don't even have a push translator, how can it be ?

nishaDangol-Sussol commented 4 months ago

Hmm I think @nisha-dangol did notice that there are some odd sync records that seem to always be present.

I submitted issue regarding that wrong sync numbers last time: #3447

andreievg commented 4 months ago

@Chris-Petty since there is no push translator, it might not be circular sync, but looks like we are pulling those 3 records all the time ? Since changelog is updated ?

Chris-Petty commented 4 months ago

Note for future assignee - need to reproduce, determine what's happening and propose a fix. Might be a mSupply Legacy problem rather than OMS!