-
Notifications
You must be signed in to change notification settings - Fork 189
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
Migrations for legacy and now illegal default link label _return
#3561
Migrations for legacy and now illegal default link label _return
#3561
Conversation
The original default link label that was used when no explicit one was specified by the user was set to `_return`. In a later change, link labels starting or ending with an underscore were banned because it would interfere with use of double underscores to indicate namespaces. As a result the default link was renamed to `result` however a data migration was never put in place.
Only the tests are missing.
For future reference, I refer to: https://github.com/aiidateam/aiida-core/wiki/Checklist-when-updating-the-export-version And I can add the files, sure 👍 |
4742cb2
to
ca96e83
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine to me.
I have updated the aiida-export-migration-tests
to v0.8.0 and updated the dependency here as well.
All tests should have been added, along with updating test archives to v0.8.
Don't wait for me - fine to go ahead |
Would be good if @giovannipizzi could still have a look to see if the migrations are ok. |
I gave - I'm not fully comfortable with changing all link labels being This on the other hand raises a different question - should we migrate link labels of people that used an invalid one before validation is in place? Or it's ok to keep as is, and they just cannot create new ones? (I guess these are typically created by plugins, so plugin developers will anyway have to upgrade their plugins if using invalid names - the main question is if anything 'crashes' or raises if an invalid link is in the DB |
This was my thinking exactly. I don't think there is actual exceptions that can occur when just loading the node or links, but it will certainly prevent from importing archives that contain them, since then the link validation will stop the link from being created.
I don't think we can start to add data migrations for things done by plugins. We could remove leading and trailing underscores from link labels as that is what is now illegal, but not sure that we should. So far we have never considered plugin controlled data in data migrations and not sure if we should start now. |
Fixes #3527
The second commit adds the migration for export archives, however, it does not include the respective tests. @CasperWA would be willing to add those?