Skip to content

Th dep it2 - #697

Open
kpsherva wants to merge 29 commits into
CERNDocumentServer:masterfrom
kpsherva:th_dep_it2
Open

kpsherva wants to merge 29 commits into
CERNDocumentServer:masterfrom
kpsherva:th_dep_it2

Conversation

@kpsherva

@kpsherva kpsherva commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Migration log errors are now readable by curators

  • Errors say what is wrong with the legacy record and what to do, not a Python exception. Examples are 'tuple' object has no attribute 'strip', Invalid value 00k4n6c32::2021240051 and 'NoneType' object has no attribute 'id'.
  • The same wording is used wherever an error is wrapped in the load stage. This is in the new load/messages.py.
  • Validation errors show only the relevant field, with its value.

Mapping changes

  • Licenses: a license that isn't in the vocabulary is flagged at transform time, for example a missing version such as CC-BY-4.0. The message asks the curator to correct 540__a.
  • Subjects: 65027a/b terms that are in the CDS controlled vocabulary migrate as 65017a. Unknown terms are flagged.
  • Funding (536__a):
    • An EC funder (ROR 00k4n6c32 or the funder DOI) is matched against the awards vocabulary. An unknown award is flagged, and the message asks the curator to add it to the vocabulary or use a custom (one-off) value.
    • Any other funder with a ROR or funder DOI is stored as a custom funding entry, with its values taken directly from the MARC field.
  • Relations (7870_i):
    • Dataset becomes documents / dataset.
    • Companion paper becomes references / publication-article.
    • Book chapter becomes references / publication-section. publication-bookchapter doesn't exist in RDM.
  • 773 journal: repeated journal subfields with the same values are merged. Different values give a plain-language error.
  • dep_th now includes plots.

Dump queries

  • 980:INTNOTEATLASPUBL is excluded from the dep_th queries. Existing dumps still contain those records until dump records is re-run.
  • SPSARCHIVE and LEPARCHIVE are still excluded temporarily, via TEMPORARY_DUMP_EXCLUSIONS in collection_migration.py. Remove that constant in January 2027.
  • The conf_query tests were updated for the case-insensitive /(?i).../ regexes, with a new test for that.

Migration logs location

  • Logs now go to migration_cli/tmp/logs/ instead of cds_migrator_kit/tmp/logs/. INVENIO_CDS_MIGRATOR_KIT_LOGS_PATH still overrides it.
  • The reports page's download route had a hardcoded path to the it collection's CSV. It now uses the configured path and the requested collection.
  • Check that the deployed pod sets INVENIO_CDS_MIGRATOR_KIT_LOGS_PATH. If it doesn't, logs will land in the checkout's migration_cli/tmp/logs.
  • The videos config and the tests' own log folders keep their old locations.

Docs

  • Every reference to the non-existent migrating-a-collection.md now points to openshift_migration-recipe.md.

@coderabbitai

coderabbitai Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f943b1f5-bc77-4b77-8145-7bc8c4f8c056
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

kpsherva and others added 28 commits December 3, 2026 15:33
The dump groups the edit roles as {"any_collection": [...], "collections":
{<collection>: [...]}}. Only the roles of the record's own collections are
checked against the community members, the any_collection roles are the
instance-wide curators. A flat {<collection>: [...]} dump is still accepted.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The submitters migration creates the accounts with a lowercased email, but
the owner was looked up as it appears in the dump, so owners with capitals
(e.g. "x@y.cern.ch (Gabriel Cardoso)") were reported as not migrated.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…j/700__j

Following the curators' mapping, an ORCID in subfield k is handled as one in
subfield j: JACoW values are ignored and any other non-ORCID value is flagged.
Both subfields are now read whichever one a model is configured for; the same
ORCID in both is stored once, different ones are flagged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…tures

The local default pointed to a community id that the cds-rdm fixtures no
longer create, so the load step failed with "No row was found" for every
record that gets the CERN Scientific community.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…cords

The curators are still working on the records tagged 595__a:SPSARCHIVE
(also together with PSARCHIVE) and 595__a:LEPARCHIVE, so they are neither
dumped nor tagged as MIGRATED until January 2027. Records tagged only
595__a:PSARCHIVE are migrated. Remove TEMPORARY_DUMP_EXCLUSIONS after that,
the next dump picks the excluded records up.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The curators confirmed that a marker like "bibclassify" in 695__9, saying the
keyword was assigned automatically from the fulltext, can be dropped. The
keyword is migrated without a scheme; other unknown schemes are still flagged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Following the curators' mapping, a 65027b term found in the CDS controlled
vocabulary (the subjects_cds vocabulary of cds-rdm) is migrated like a 65017a
controlled subject. Any other term is flagged for review. A term coming from
both 65017a and 65027b is added once.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The fields were checked with the library and can be ignored. They are now
skipped by the missing rules check of every model, instead of being listed in
the ignore keys of each one.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
962__b is used as the CDS record id of the related publication. Records with
free text there (e.g. "Comments: 24 pages, ...", record 1643591) only failed
at load time with a generic "Invalid CDS identifier" on the related
identifiers. They are now reported at transform time, naming the field, the
subfield and the value, and saying that the text must be removed or moved.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Terms in 65027a or 65027b that are in the CDS controlled vocabulary are
migrated as controlled subjects, any other term is flagged for review.
The scheme subfield is now read, so it is not reported as a missing rule.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The message listed the whole record body. It now has the failing field,
the validation messages and the offending value.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…m time

An unversioned license (e.g. 'CC BY') produced an id that does not exist
and failed at load with "'NoneType' object has no attribute 'id'". It is
now reported in the migration log with a clear message for the curators.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A repeated 773 p/v/n/y crashed with "'tuple' object has no attribute
'strip'". Identical copies are now reduced to one value, different values
are flagged for the curators in plain words.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
An unknown award or vocabulary value was logged as "Invalid value X::Y.".
The message now names the value and asks the curators whether it should
be added to the vocabulary or kept as a custom one-off value.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Only the European Commission is a vocabulary funder. A funder named by
another ROR (e.g. PRACE, record 2965217) is stored as a custom funding
entry, with the values taken directly from 536__a/f/c.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… step

The record creation step re-wrapped the unknown vocabulary errors with the
raw text, so the explanation added before never reached the log.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A funder given by a 10.13039 funder DOI, other than the European
Commission, is stored as a custom entry like the ones given by a ROR.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
An unknown European Commission award failed at load with "'NoneType'
object has no attribute 'id'". It is now reported in the migration log
with the original funder text and a question for the curators.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The default CDS_MIGRATOR_KIT_LOGS_PATH moves out of the cds_migrator_kit
package to migration_cli/tmp/logs. The reports download view read a
hardcoded relative path to the "it" collection; it now reads the CSV from
the configured logs path of the requested collection.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The docs and docstrings referred to migrating-a-collection.md, which does
not exist; the guide is openshift_migration-recipe.md.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… configured

Reading both ORCID subfields flagged identifiers such as CCID-721143 stored in
subfield j of the models that read k, so a thesis record failed to migrate.
Subfield k is still checked strictly; subfield j only contributes real ORCIDs
when it is not the configured one.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.

1 participant