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

disable external user ID queries #855

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

osoukup
Copy link
Contributor

@osoukup osoukup commented Dec 9, 2024

Closes OSIDB-2925

@osoukup osoukup requested a review from a team December 9, 2024 14:47
@osoukup osoukup self-assigned this Dec 9, 2024
@osoukup osoukup added the technical For PRs that introduce changes not worthy of a CHANGELOG entry label Dec 10, 2024
Copy link
Contributor

@JakubFrejlach JakubFrejlach left a comment

Choose a reason for hiding this comment

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

Before approval I would probably like to discuss briefly what is our aim for profiles. Changes don't seem to be saving much of a traffic, at least from my understanding of the logic.

Comment on lines 79 to +85
if created:
Profile.objects.create(
user=instance,
bz_user_id=get_bz_user_id(instance.email),
jira_user_id=get_jira_user_id(instance.email),
# TODO I am disabling the external system queries for now to safe the extra API calls
# and dependencies but the full removal requires User-Profile rework and major release
# bz_user_id=get_bz_user_id(instance.email),
# jira_user_id=get_jira_user_id(instance.email),
Copy link
Contributor

Choose a reason for hiding this comment

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

I am thinking about the if created condition, doesn't that mean that this query should happen only when the User was created? And thus only once per user? I am actually not sure, what is our aim regarding the User profiles, what exact info we would like to store in.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That is the correct understanding as far as I was able to understand the Django User - it does not seem that there would be some lifetime etc. I will be glad to discuss as I am personally also not fully sure what is the right approach here. This all is not used at all and I can remember only that we wanted to use it for the history event authors mapping which should probably by rather a one-time action when we migrate Bugzilla history (and will be only partially successful as not all users have any/clear Kerberos counterpart). Otherwise the Profile seems quite useless at this point. Maybe it could be useful in the future, I am not sure. The full removal (at least from the API) is no possible at this point. I wanted to address the task for now leaving the options open for the future 😄 but maybe this is not the best approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
technical For PRs that introduce changes not worthy of a CHANGELOG entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants