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

[uplift_beta] TypeError: '>' not supported between instances of 'str' and 'NoneType' #2275

Open
suhaibmujahid opened this issue Nov 17, 2023 · 1 comment
Assignees
Labels

Comments

@suhaibmujahid
Copy link
Member

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'
@suhaibmujahid
Copy link
Member Author

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
    }
  ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant