denshoproject / ddr-local

Web UI used for interacting with DDR collections and entities on a local machine.
Other
3 stars 0 forks source link

Git merge conflicts not detected, app crashes on JSON parsing errors #302

Open gjost opened 2 years ago

gjost commented 2 years ago

We've had a series of git merge conflicts with ddr-densho-1000. I think the DDR app workflow may be interfering with Git merge behavior here.

Best practice is to run git pull and deal with any merge conflicts before you run git push. The DDR runs git annex sync which pushes/pulls both master and annex branches - this may be the culprit.

At the very least we need for ddrlocal/ddrcmdln to look for merge conflicts before trying to parse the JSON, and to report them in the UI as merge conflicts rather than just crashing.

ddrlocal could also recursively scan for merge conflicts starting in the current directory, or maybe only on the collection page. Command-line tool ack-grep takes a couple seconds to scan ddr-densho-1000 so this should happen out-of-band, in an AJAX API call in parallel with sync status.