db-sync icon indicating copy to clipboard operation
db-sync copied to clipboard

Handle push errors to avoid broken sync

Open wonder-sk opened this issue 3 years ago • 2 comments

Sometimes it may happen that pushing a new version of a project fails for some reason (e.g. a network issue or a temporary server problem). Currently if that happens, the local directory is left with modifications - so the next time the daemon wakes up to do pull+push, the pull stage does not like the fact there are some pending changes, and the whole sync breaks.

If push fails, we should clean up the local directory - there's already a to-do left in the code: https://github.com/lutraconsulting/mergin-db-sync/blob/master/dbsync.py#L486

wonder-sk avatar Jan 04 '22 15:01 wonder-sk

We've faced this issue as well. Would be great to have more tools to tackle this!

Koivusto avatar Jan 10 '22 08:01 Koivusto

We also face this issue

HugoP27 avatar Aug 31 '22 20:08 HugoP27

Fixed in #83 - if there are any leftovers in the working directory, they will be cleaned up.

wonder-sk avatar Mar 14 '23 13:03 wonder-sk