members: only use base attrs in user relationship#1069
members: only use base attrs in user relationship#1069egabancho wants to merge 1 commit intoinveniosoftware:masterfrom
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
| } | ||
| } | ||
| }, | ||
| "dynamic": true |
There was a problem hiding this comment.
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.
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. |
|
Since this one was opened, a different merge request has been integrated, which adds The question now is whether or not we want to integrate this one and revert the changes introduced to prevent the scenario described previously. cc-ing @slint and @max-moser |
|
If I understand correctly, this only relates to how users get indexed as community members? As a bit of context: Since the dynamic mappings are always interpreted as That being said, I don't have a real preference on how custom user fields are handled in the context of communities, as long as extended user properties don't break stuff again. For searching for users directly (invenio-users-resources), I think it can be useful to query the customized extra fields, though. |
process_bulk_queuefails 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: