[uplift_beta] TypeError: '>' not supported between instances of 'str' and 'NoneType'
suhaibmujahid opened this issue · comments
2023-11-16 12:01:21,717 - ERROR - Rule uplift_beta
Traceback (most recent call last):
File "/home/rm_bot/bugbot/bugbot/bzcleaner.py", line 844, in run
self.send_email(date=date)
File "/home/rm_bot/bugbot/bugbot/bzcleaner.py", line 763, in send_email
data = self.get_email_data(date)
File "/home/rm_bot/bugbot/bugbot/bzcleaner.py", line 681, in get_email_data
bugs = self.get_bugs(date=date)
File "/home/rm_bot/bugbot/bugbot/rules/uplift_beta.py", line 156, in get_bugs
bugs = super(UpliftBeta, self).get_bugs(date=date, bug_ids=bug_ids)
File "/home/rm_bot/bugbot/bugbot/bzcleaner.py", line 456, in get_bugs
).get_data().wait()
File "/home/rm_bot/bugbot/venv/lib/python3.10/site-packages/libmozdata/bugzilla.py", line 180, in wait
self.wait_bugs()
File "/home/rm_bot/bugbot/venv/lib/python3.10/site-packages/libmozdata/bugzilla.py", line 191, in wait_bugs
r.result()
File "/usr/local/lib/python3.10/concurrent/futures/_base.py", line 458, in result
return self.__get_result()
File "/usr/local/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
raise self._exception
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/rm_bot/bugbot/venv/lib/python3.10/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
File "/home/rm_bot/bugbot/venv/lib/python3.10/site-packages/requests/sessions.py", line 710, in send
r = dispatch_hook("response", hooks, r, **kwargs)
File "/home/rm_bot/bugbot/venv/lib/python3.10/site-packages/requests/hooks.py", line 30, in dispatch_hook
_hook_data = hook(hook_data, **kwargs)
File "/home/rm_bot/bugbot/venv/lib/python3.10/site-packages/libmozdata/bugzilla.py", line 556, in __bugs_cb
self.bughandler.handle(bug)
File "/home/rm_bot/bugbot/venv/lib/python3.10/site-packages/libmozdata/handler.py", line 15, in handle
self.handler(*args)
File "/home/rm_bot/bugbot/bugbot/bzcleaner.py", line 343, in bughandler
if self.handle_bug(bug, data) is None:
File "/home/rm_bot/bugbot/bugbot/rules/uplift_beta.py", line 42, in handle_bug
if self._has_patch_after_closed(bug):
File "/home/rm_bot/bugbot/bugbot/rules/uplift_beta.py", line 153, in _has_patch_after_closed
return latest_patch_at > resolved_at
TypeError: '>' not supported between instances of 'str' and 'NoneType'
The error happens when a close bug returns null
as a value for the cf_last_resolved
field.
Example https://bugzilla.mozilla.org/rest/bug/1880104?include_fields=cf_last_resolved:
{
"faults": [],
"bugs": [
{
"cf_last_resolved": null,
"id": 1880104
}
]
}