Employees with unlinked Bugzilla accounts
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 68
- Forks
- 92
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 16
Description
When an employee does not use their Mozilla email for Bugzilla and at the same time, their Bugzilla email is not linked in the phonebook (e.g., https://people.mozilla.org/p/masayuki-nakano). This causes some tools to fail:
2022-07-11 12:07:48,210 - ERROR - Tool no_severity
Traceback (most recent call last):
File "/home/rm_bot/relman-auto-nag/auto_nag/bzcleaner.py", line 738, in run
self.send_email(date=date)
File "/home/rm_bot/relman-auto-nag/auto_nag/bzcleaner.py", line 671, in send_email
title, body = self.get_email(date)
File "/home/rm_bot/relman-auto-nag/auto_nag/bzcleaner.py", line 632, in get_email
data = self.get_email_data(date, bug_ids)
File "/home/rm_bot/relman-auto-nag/auto_nag/bzcleaner.py", line 623, in get_email_data
bugs = self.get_bugs(date=date, bug_ids=bug_ids)
File "/home/rm_bot/relman-auto-nag/auto_nag/bzcleaner.py", line 442, in get_bugs
timeout=self.get_config("bz_query_timeout"),
File "/home/rm_bot/relman-auto-nag/venv/lib/python3.7/site-packages/libmozdata/bugzilla.py", line 176, in wait
self.wait_bugs()
File "/home/rm_bot/relman-auto-nag/venv/lib/python3.7/site-packages/libmozdata/bugzilla.py", line 187, in wait_bugs
r.result()
File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 432, in result
return self.__get_result()
File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
raise self._exception
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/rm_bot/relman-auto-nag/venv/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/home/rm_bot/relman-auto-nag/venv/lib/python3.7/site-packages/requests/sessions.py", line 653, in send
r = dispatch_hook('response', hooks, r, **kwargs)
File "/home/rm_bot/relman-auto-nag/venv/lib/python3.7/site-packages/requests/hooks.py", line 31, in dispatch_hook
_hook_data = hook(hook_data, **kwargs)
File "/home/rm_bot/relman-auto-nag/venv/lib/python3.7/site-packages/libmozdata/bugzilla.py", line 552, in __bugs_cb
self.bughandler.handle(bug)
File "/home/rm_bot/relman-auto-nag/venv/lib/python3.7/site-packages/libmozdata/handler.py", line 15, in handle
self.handler(*args)
File "/home/rm_bot/relman-auto-nag/auto_nag/bzcleaner.py", line 324, in bughandler
auto_ni = self.get_mail_to_auto_ni(bug)
File "/home/rm_bot/relman-auto-nag/auto_nag/scripts/workflow/no_severity.py", line 75, in get_mail_to_auto_ni
mail, nick = self.round_robin.get(bug, self.date)
File "/home/rm_bot/relman-auto-nag/auto_nag/round_robin.py", line 174, in get
nick = self.get_nick(bzmail, pc, cal)
File "/home/rm_bot/relman-auto-nag/auto_nag/round_robin.py", line 132, in get_nick
BugzillaUser(user_names=[bzmail], user_handler=handler).wait()
File "/home/rm_bot/relman-auto-nag/venv/lib/python3.7/site-packages/libmozdata/connection.py", line 134, in wait
r.result()
File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 432, in result
return self.__get_result()
File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
raise self._exception
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/rm_bot/relman-auto-nag/venv/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/home/rm_bot/relman-auto-nag/venv/lib/python3.7/site-packages/requests/sessions.py", line 653, in send
r = dispatch_hook('response', hooks, r, **kwargs)
File "/home/rm_bot/relman-auto-nag/venv/lib/python3.7/site-packages/requests/hooks.py", line 31, in dispatch_hook
_hook_data = hook(hook_data, **kwargs)
File "/home/rm_bot/relman-auto-nag/venv/lib/python3.7/site-packages/libmozdata/connection.py", line 123, in cb
res.raise_for_status()
File "/home/rm_bot/relman-auto-nag/venv/lib/python3.7/site-packages/requests/models.py", line 940, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://bugzilla.mozilla.org/rest/user?include_fields=_default&names=mnakano.birchill%40mozilla.com
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in auto_nag/round_robin.py, especially get_nick, and trace how the no_severity workflow reaches it from auto_nag/scripts/workflow/no_severity.py. Reproduce the Bugzilla user lookup for an unlinked account and ensure the tool handles that case without the shown HTTP 400 failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100