Closed jgaehring closed 3 years ago
I should probably note, too, that we should hold off on this until #26 is completed.
Closing.
I'm far more confident in the conflict handling in farmOS.js itself than I was when I opened this, especially after my last few commits, 9019f6f and 5bfb5df, which fine-tuned how the merge
and resolve
methods work. Issues may arise in the course of farmOS/farmOS-client#190, but they can be dealt with separately when the time comes.
And with regards to this particular concern:
One question that occurs to me now is, what do we do if a particular conflicting change has already been stored in the conflicts array of a field's metadata?
This is moot now, because I added a check that will throw if you try to merge an entity with pre-existing conflicts:
So duplicates shouldn't be possible.
Opening this as a place to investigate the general effectiveness of how we handle conflicts in
mergeEntities
. As I mentioned in https://github.com/farmOS/farmOS-client/issues/418#issuecomment-813618913, I believe the logic is relatively sound, but I think it might be helpful to kick the tires on this a little more, once we actually add a UI for conflict resolution to Field Kit.One question that occurs to me now is, what do we do if a particular conflicting change has already been stored in the
conflicts
array of a field's metadata? We're not matching against those currently, but perhaps we should, so we don't get uncessary duplication.