Skip to content

fix(load): skip hand-submitted CDS records on migrate - #603

Open
TahaKhan998 wants to merge 1 commit into
CERNDocumentServer:masterfrom
TahaKhan998:fix/skip-native-cds-duplicates
Open

TahaKhan998 wants to merge 1 commit into
CERNDocumentServer:masterfrom
TahaKhan998:fix/skip-native-cds-duplicates

Conversation

@TahaKhan998

Copy link
Copy Markdown

Closes CERNDocumentServer/cds-rdm#347
Right now the migrator only skips if we already minted an lrecid. That misses the manually submitted new CDS papers that later come back through the old CDS dump (new CDS → INSPIRE → old CDS → migrate), so we would create a second copy.
Before create, _should_skip_recid now checks if this is already on the new CDS under another id
it looks for that record from the dump in this order: repository.cern urls, structured CDSRDM ids, CERN DOI suffixes (10.17181/), then DOI pidstore (including arXiv DataCite DOIs), then arXiv related identifiers. If exactly one parent matches we skip, mint lrecid on that parent, and log it. Dry run does the same lookups but does not mint. If two parents match we raise and do not pick one.

EP load uses the same path, so it now passes entry into _should_skip_recid instead of only the recid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

INSPIRE to CDS-RDM harvester: sync document types already in CDS

1 participant