-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
InvenioRDM migration from v11 to v12 fails when registering parent DOIs #1851
Comments
Thanks for this report! There are currently two main DOI configurations in InvenioRDM DATACITE_ENABLED = True - All records have a DOI So then in the migration script https://github.com/inveniosoftware/invenio-app-rdm/blob/810befded43dc5ea49198bf992d6e2393c75ff1e/invenio_app_rdm/upgrade_scripts/migrate_11_0_to_12_0.py#L85 the parent DOI block will skip registering DOIs when DATACITE is not enabled. In v12 we also added an additional "is_enabled" setting, which provides some ability to determine whether DOIs are minted based on set criteria. This is also checked in the migration script. It sounds like you have records that don't have DOIs but you have DATACITE enabled. Do you really want parent DOIs minted for these records? That seems like a unusual choice. I suspect you'll either want to disable parent DOIs with RDM_PARENT_PERSISTENT_IDENTIFIERS={}, or develop a is_enabled setting to exclude those records without DOIs. But please respond back with your use case if neither of those options sound appropriate. |
I think the underlying issue here is that at time of calling The migrate script should be split in 2 and interleaved with an enjoinment to the reader to run |
@fenekku I don't think that's the issue. The child records should already have DOIs before the migration script runs. The migration script is only adding the parent DOI, not the child DOI. |
Hmm 🤔 ... Here is the situation, I had a similar issue with the migration script and minting the parent and splitting the script in 2 passes is what solved it for me, because I think that despite the "child" records already having Nevertheless, it may not be quite what the original problem was. @danielbreves How did you create a record with a DOI and a record without a DOI in the same instance? Did you change the datacite settings @tmorrell mentioned above (in-between or otherwise)? Understanding that would help us identify the underlying issue. |
@tmorrell @fenekku thanks for the fast reply! Our InvenioRDM instance started with
We would like parent DOIs minted, since all future records should have DOIs. |
As a side note, I had to add the line below to the migration script to make it print out the stacktrace, since
|
Ah got it. Then yes, I think it'd be reasonable if you could make a PR with that change from Thanks! |
Package version (if known): 10.8.6
Describe the bug
I got the following exception when running https://github.com/inveniosoftware/invenio-app-rdm/blob/master/invenio_app_rdm/upgrade_scripts/migrate_11_0_to_12_0.py:
This happened because a child record didn't have a DOI. Could that line be
version["pids"].get("doi")
?Steps to Reproduce
Expected behavior
The migration should succeed since DOIs can be optional
The text was updated successfully, but these errors were encountered: