Skip to content

fix(harvester): handle legacy CDS recid checks before create - #931

Open
TahaKhan998 wants to merge 1 commit into
CERNDocumentServer:masterfrom
TahaKhan998:fix/issue-907-harvester-legacy-duplicates
Open

fix(harvester): handle legacy CDS recid checks before create#931
TahaKhan998 wants to merge 1 commit into
CERNDocumentServer:masterfrom
TahaKhan998:fix/issue-907-harvester-legacy-duplicates

Conversation

@TahaKhan998

@TahaKhan998 TahaKhan998 commented Aug 18, 2026

Copy link
Copy Markdown

Closes #907
This PR changes how the INSPIRE harvester handles records with a legacy CDS recid and avoids duplicates between old CDS and CDS-RDM. If the incoming record has an integer legacy recid, we first check pidstore and update when it is found. If it is not found, we check old CDS directly. We raise an error when it redirects to repository.cern or returns 404. We skip with a warning when the record is still only in legacy. If there is no legacy recid in the incoming record, the existing matching flow stays the same. If INSPIRE sends more than one CDS recid (merged records keep both), we check each in pidstore and on old CDS. Two different pidstore hits are treated as multiple records match.

@TahaKhan998
TahaKhan998 force-pushed the fix/issue-907-harvester-legacy-duplicates branch 16 times, most recently from f21a51c to 7b3fef1 Compare August 19, 2026 11:23
Comment thread site/cds_rdm/inspire_harvester/writer.py Outdated
Comment thread site/cds_rdm/inspire_harvester/writer.py Outdated
Comment thread site/cds_rdm/inspire_harvester/load/matcher.py Outdated
Comment thread site/cds_rdm/inspire_harvester/load/matcher.py Outdated
Comment thread site/cds_rdm/inspire_harvester/writer.py
Comment thread site/cds_rdm/inspire_harvester/writer.py Outdated
Comment thread site/cds_rdm/inspire_harvester/writer.py Outdated
Comment thread site/cds_rdm/inspire_harvester/load/matcher.py Outdated
Comment thread site/cds_rdm/inspire_harvester/load/matcher.py
@TahaKhan998
TahaKhan998 force-pushed the fix/issue-907-harvester-legacy-duplicates branch 4 times, most recently from 00012a8 to c657a94 Compare August 21, 2026 08:30
Comment thread site/cds_rdm/inspire_harvester/load/validator.py Outdated
Comment thread site/cds_rdm/inspire_harvester/load/matcher.py Outdated
Comment thread site/cds_rdm/inspire_harvester/load/matcher.py Outdated
@TahaKhan998
TahaKhan998 force-pushed the fix/issue-907-harvester-legacy-duplicates branch from c657a94 to 7a31dab Compare August 21, 2026 14:24
Comment thread site/cds_rdm/inspire_harvester/load/matcher.py Outdated
@TahaKhan998
TahaKhan998 force-pushed the fix/issue-907-harvester-legacy-duplicates branch from 7a31dab to 6eea851 Compare August 21, 2026 14:42
Comment thread site/cds_rdm/inspire_harvester/load/matcher.py Outdated
@TahaKhan998
TahaKhan998 force-pushed the fix/issue-907-harvester-legacy-duplicates branch 3 times, most recently from 490ad97 to a3d82f6 Compare August 21, 2026 15:47
Comment thread site/cds_rdm/inspire_harvester/load/matcher.py Outdated
@TahaKhan998
TahaKhan998 force-pushed the fix/issue-907-harvester-legacy-duplicates branch from a3d82f6 to 58f8a06 Compare August 21, 2026 15:52
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.

Harvester: avoiding duplicates between systems

2 participants