Description
Environment
- DiffSync version: 1.0.0
Proposed Functionality
We could have an option for DiffSync to refresh data model contents from the underlying backend system or dataset, after doing a create
,update
,delete
operation (e.g. in _sync_from_diff_element()
), so as to verify that the operation was actually reflected in the backend.
With this option enabled, DiffSync could report a create()
as failed
if no underlying record was actually created, a create()
or update()
as incomplete
if some attributes were not set correctly, a delete()
as failed
if the underlying record still exists, etc.
This option should probably be off by default for performance reasons; also this would be mostly used as a debugging tool during development.
Use Case
When developing a new adapter and associated DiffSyncModel
classes, the default model implementations of create
, update
, delete
report success and update their local status without actually interacting with the backend in any way. If these methods are left unimplemented, or only partially implemented (creating/updating the uid keys
of a model without setting its optional attributes
for example) then this can give a false impression of success/completeness that will only be corrected by inspecting the backend and/or running another sync attempt. Being able to automatically identify and flag incomplete synchronization actions would make gap analysis during development much easier.