Make LDB sync never clash with LMB data #218
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
We now unfortunately have to deal with 2 sources of truth when it comes to Person data (names in particular). We need to keep ingesting Person instances from the leidinggevenden database, because LMB does not track them, and there are many people which have a Functionaris instance, but no Mandataris instance (they are, after all, different jobs). However, there are some, (I count 31 at the time of the pr), where the same person has held both Functionaris and Mandataris positions throughout their career.
In that case, we have a possible clash of data, if LMB is updated without the corresponding update to LDB.
This pr makes it so that the LDB sync script never enters Person instances we already have from LMB. It only checks the public graph, but I've confirmed there are no instances of private Persons which are not also in the public graph.
As a side, this pr also flat out deletes the MDB sync script, as we really don't want to run that on accident, ever. Should we ever need it again, it's in the git history.
connected issues and PRs:
Setup
How to test/reproduce
Challenges/uncertainties
Checks PR readiness