-
Notifications
You must be signed in to change notification settings - Fork 72
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
members: only use base attrs in user relationship #1069
base: master
Are you sure you want to change the base?
Conversation
Sorry @max-moser, you seemed to be the one who made that change on the user schema, inveniosoftware/invenio-users-resources@492f14b |
I'm not sure how to write a test to verify it, I can duplicate the one on https://github.com/inveniosoftware/invenio-accounts/blob/master/tests/test_models.py#L120, but I'm not sure how useful it will be. |
1c953b2
to
af2469e
Compare
@@ -62,7 +62,8 @@ | |||
"affiliations": { | |||
"type": "text" | |||
} | |||
} | |||
}, | |||
"dynamic": true |
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.
I would not go with dynamic here. I just had a large mishap with a custom field that wasn't created in the mapping, then a user filling some data into and voila, had to reindex 70GB of data because you cannot change the type once added to the mapping :-(
These models are also supposed to only contain basic info, not everything, so perhaps it's just a matter to make sure we don't get the full profile when we index in members? In principle it should only index the stuff in https://github.com/inveniosoftware/invenio-communities/blob/master/invenio_communities/members/records/api.py#L70-L76
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.
What you say makes a lot of sense. Now I just need to figure out how to do actually do it 😂
Thanks for the feedback!
af2469e
to
1f8e6ee
Compare
* Limits the user fields send for indexing to avoid issues when extending the user profile or preferences. (closes invenio-app-rdm#2198)
1f8e6ee
to
3e26f5a
Compare
Hey @lnielsen, I changed the approach as you suggested. I explicitly list the fields we want from the two customizable parts: profile and preferences. |
process_bulk_queue
fails with extended user profile invenio-app-rdm#2198)❤️ Thank you for your contribution!
Description
Please describe briefly your pull request.
Checklist
Ticks in all boxes and 🟢 on all GitHub actions status checks are required to merge:
Third-party code
If you've added third-party code (copy/pasted or new dependencies), please reach out to an architect.
Reminder
By using GitHub, you have already agreed to the GitHub’s Terms of Service including that: