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

names: remove internal id from sync #300

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

jrcastro2
Copy link
Contributor

* Always sync CERN name, if orcid is present
  tag CERN name as unlisted
* closes CERNDocumentServer#284

else:
current_app.logger.debug(
f"Names sync | No CERN name found for user {user.id}. Creating new unlisted name."
Copy link
Contributor

Choose a reason for hiding this comment

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

sorry I am a bit confused by the message. What is the use case for creating unlisted CERN name? is it when we have orcid entry but no related CERN user was found? why to create a CERN name at all?
how I understand the case when it is not needed to create unlisted:

  1. I get an ORCID entry (from the dump). Most likely not a CERN researcher
  2. I search for CERN user, I find none, because it is not a CERN person
  3. I create a CERN name anyway, unlisted?

please let if I understood incorrectly

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Based on the discussion we had (we didn't specify this concrete case in the issue but the third point more or less describes it), I remember that we agreed to remove the person id from the internal_id but we keep the name when syncing it with ORCID value to have some sort of "history" and I guess it will be required for the migration, as we will match the unlisted value and not the ORCID value since there is no person id there anymore.

From now on, every time we sync if we find the ORCID value we create the unlisted CERN value as well, before it was simply merging to the ORCID value.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok I think I understand now.
My initial wrong assumption was that ORCID dump is the source of truth, but now I realise you iterate on user profiles. Makes sense now.
Can you add a comment above this log message, explaining why we do this unlisted name creation?

@ntarocco ntarocco merged commit ea7d6b5 into CERNDocumentServer:master Jan 7, 2025
2 checks passed
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.

Names: drop usage of internal_id
3 participants