Skip to content
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

wip: index new groups in OpenSearch #73

Merged

Conversation

TLGINO
Copy link
Contributor

@TLGINO TLGINO commented May 6, 2023

@TLGINO TLGINO force-pushed the feat/groups-membership-support branch 2 times, most recently from 0ce285d to 183ca82 Compare May 9, 2023 12:34
invenio_users_resources/records/hooks.py Outdated Show resolved Hide resolved
invenio_users_resources/services/groups/tasks.py Outdated Show resolved Hide resolved
invenio_users_resources/services/groups/tasks.py Outdated Show resolved Hide resolved
@TLGINO TLGINO force-pushed the feat/groups-membership-support branch 2 times, most recently from 3659141 to fe68939 Compare May 28, 2023 11:49
@TLGINO TLGINO force-pushed the feat/groups-membership-support branch 3 times, most recently from 15c864e to 079df6f Compare June 17, 2023 08:19
@TLGINO TLGINO force-pushed the feat/groups-membership-support branch 4 times, most recently from 01c46d5 to a525154 Compare June 26, 2023 10:11
@TLGINO TLGINO marked this pull request as ready for review June 26, 2023 10:14
Copy link
Member

@jennur jennur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to us! Just some very minor comments.

tests/conftest.py Outdated Show resolved Hide resolved
tests/conftest.py Outdated Show resolved Hide resolved
invenio_users_resources/services/groups/tasks.py Outdated Show resolved Hide resolved
invenio_users_resources/records/hooks.py Outdated Show resolved Hide resolved
invenio_users_resources/records/hooks.py Outdated Show resolved Hide resolved
invenio_users_resources/records/hooks.py Outdated Show resolved Hide resolved
Comment on lines +35 to +42
[
(
user_agg[user_id].id,
str(user_agg[user_id].id),
user_agg[user_id].revision_id,
)
for user_id in user_ids
],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor: this might end up sending very large lists/messages to a Celery task (which might be problematic depending on some message size limits on RabbitMQ). Do we have an estimate of how many user_ids we might be getting?

In any case, maybe the solution is to loop over user_ids and send things one-by-one.

@TLGINO TLGINO force-pushed the feat/groups-membership-support branch from a525154 to 0a8a9cc Compare June 27, 2023 09:53
tests/conftest.py Outdated Show resolved Hide resolved
tests/conftest.py Outdated Show resolved Hide resolved
@TLGINO TLGINO force-pushed the feat/groups-membership-support branch from 0a8a9cc to 3abfd2b Compare June 30, 2023 09:05
invenio_users_resources/services/groups/tasks.py Outdated Show resolved Hide resolved
invenio_users_resources/services/groups/tasks.py Outdated Show resolved Hide resolved
 * fixed tests
 * use bulk indexing instead of iterative single indexing
 * closes inveniosoftware#76

Co-authored-by: Zacharias Zacharodimos <[email protected]>
@TLGINO TLGINO force-pushed the feat/groups-membership-support branch from f5ed189 to 5e012bd Compare June 30, 2023 09:22
@zzacharo zzacharo merged commit 0c40ab2 into inveniosoftware:master Jun 30, 2023
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.

Improve index and group indexing
5 participants