-
Notifications
You must be signed in to change notification settings - Fork 11
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
sync ldap into names #195
base: master
Are you sure you want to change the base?
sync ldap into names #195
Conversation
212d6dc
to
6673d1a
Compare
6673d1a
to
81a947e
Compare
1087edc
to
9d5c950
Compare
site/cds_rdm/tasks.py
Outdated
@shared_task() | ||
def merge_duplicate_names_vocabulary(since=None): | ||
"""Merges duplicate names in the names vocabulary.""" | ||
service = current_service_registry.get("names") |
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.
just for readability
service = current_service_registry.get("names") | |
names_service = current_service_registry.get("names") |
site/cds_rdm/tasks.py
Outdated
filters.append(dsl.Q("range", updated={"gte": since})) | ||
combined_filter = dsl.Q("bool", filter=filters) | ||
|
||
names = service.scan(system_identity, extra_filter=combined_filter) |
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.
shouldn't we rely on the db table instead?
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.
Given that we are applying a lot of filters, plus there depending on the time range and/or when we just imported ORCID and the CERN authors, there might be a lot of results to process and there are millions of values in this table, I would expect this to be quite slow.
I am aware that the DB is the source of truth but mainly for performance optimization I would go with OS, however, if there are strong reasons to prioritize the DB, I can change it and test it with a bigger sample to asses the performance
assets/js/components/deposit/overrides/CreatibutorsRemoteSelectItem.js
Outdated
Show resolved
Hide resolved
For the |
e69f358
to
9bbad13
Compare
* updates display for CERN creatibutors
* Improve name syncing
acd472a
to
60c5ba5
Compare
60c5ba5
to
9e96380
Compare
29c7650
to
186bc0f
Compare
* add person_id to names vocab
186bc0f
to
45d785e
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.
Added comments, but mainly cosmetic.
site/cds_rdm/schemes.py
Outdated
return bool(re.match(pattern, val)) | ||
|
||
|
||
def cds(): |
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.
Is it needed even if it does not validate anything?
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.
Yes, we have to pass it to idutils.custom_schemes
entrypoint so that it can detect the scheme when submitting the record.
As a non admin user, see the synced value
As an admin, both values, the deprecated one appears greyed