-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Labels
status: gathering feedbackFurther discussion is needed to determine this issue's scope and/or implementationFurther discussion is needed to determine this issue's scope and/or implementation
Description
Environment
- DiffSync version: 2.0.0
Proposed Functionality
The way flags are managed in
Lines 185 to 208 in 315b5e9
if self.flags & DiffSyncFlags.SKIP_UNMATCHED_SRC and not dst_obj: | |
log.debug("Skipping due to SKIP_UNMATCHED_SRC flag on source adapter") | |
self.incr_models_processed() | |
return None | |
if self.flags & DiffSyncFlags.SKIP_UNMATCHED_DST and not src_obj: | |
log.debug("Skipping due to SKIP_UNMATCHED_DST flag on source adapter") | |
self.incr_models_processed() | |
return None | |
if src_obj and not dst_obj and src_obj.model_flags & DiffSyncModelFlags.SKIP_UNMATCHED_SRC: | |
log.debug("Skipping due to SKIP_UNMATCHED_SRC flag on model") | |
self.incr_models_processed() | |
return None | |
if dst_obj and not src_obj and dst_obj.model_flags & DiffSyncModelFlags.SKIP_UNMATCHED_DST: | |
log.debug("Skipping due to SKIP_UNMATCHED_DST flag on model") | |
self.incr_models_processed() | |
return None | |
if src_obj and src_obj.model_flags & DiffSyncModelFlags.IGNORE: | |
log.debug("Skipping due to IGNORE flag on source object") | |
self.incr_models_processed() | |
return None | |
if dst_obj and dst_obj.model_flags & DiffSyncModelFlags.IGNORE: | |
log.debug("Skipping due to IGNORE flag on dest object") | |
self.incr_models_processed() | |
return None |
I would propose changing the order (more specific first) and adding some flags that could negate the global behavior. For example:
- global:
SKIP_UNMATCHED_DST
- model:
NO_SKIP_UNMATCHED_DST
(new one)
This should allow not skipping for only a specific model.
Use Case
tyler-8, minitriga and theomega
Metadata
Metadata
Assignees
Labels
status: gathering feedbackFurther discussion is needed to determine this issue's scope and/or implementationFurther discussion is needed to determine this issue's scope and/or implementation