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
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions osidb/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,10 @@ def auto_create_profile(sender, instance, created, **kwargs):
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),
Comment on lines 79 to +85
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.

).save()


Expand Down
360 changes: 0 additions & 360 deletions osidb/tests/cassettes/test_users/TestUsers.test_profile_creation.yaml

This file was deleted.

Loading
Loading