bugbot misses many announcements (including reviews, approvals and dupes)

RESOLVED FIXED

Status

()

RESOLVED FIXED
10 years ago
10 years ago

People

(Reporter: LpSolit, Assigned: mkanat)

Tracking

Details

(Reporter)

Description

10 years ago
For a few days, I notice that bug(gy)bot misses many reviews/approvals/dupes/new attachments in #mozwebtools despite emails are clearly sent by bmo (I got them). No idea what's wrong.
(Assignee)

Comment 1

10 years ago
Okay. He wasn't expecting \r\n line endings. I've patched him, and I'm watching his logs to see how things go.
Status: NEW → ASSIGNED
(Assignee)

Comment 2

10 years ago
Parsing bugmails is a very hacky and strange sort of thing. :-) He used to look for the literal string "\n\n\n" in multiple places. Now I changed it to a regex [\r\n]{3,6} to handle both old Bugzillas and new Bugzillas. I tested it and it seems to be good now.
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
(Reporter)

Comment 3

10 years ago
It seems to ignore blocking flags set at the same time as I file new bugs. It only reports the new bug, but doesn't report the blocking3.4+ flag set at the same time.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(Reporter)

Comment 4

10 years ago
It seems to miss all bugs marked as duplicates, today.
(Assignee)

Comment 5

10 years ago
I believe that the bug in bugbot is fixed, and that the problem you are experiencing is because this Bugzilla is affected by bug 486206. Once it is patched you should no longer have the problem you are experienced.

However, I see a few of these traces from the 15th regarding duplicates:

ERROR 2009-04-15T16:17:44 supybot Exception while handling mail for bug 189712 on freenode.##bugzilla-world
Traceback (most recent call last):
  File "/home/bugbot/plugins/Bugzilla/plugin.py", line 415, in handleBugmail
    self._handleBugmailForChannel(bug, irc, channel)
  File "/home/bugbot/plugins/Bugzilla/plugin.py", line 465, in _handleBugmailForChannel
    bug_messages = self._diff_messages(channel, bug, diff)
  File "/home/bugbot/plugins/Bugzilla/plugin.py", line 540, in _diff_messages
    line += " marked bug %d as a duplicate of bug %d." % \
TypeError: int argument require


I think that these only happen when there is a change to the bug AND it is marked as a duplicate, simultaneously. I'll investigate.
(Assignee)

Comment 6

10 years ago
Okay, the problem was that python considers \r to be a real character and not to be a match for $ in regexes. So now I just normalize all newlines on incoming mail in bugbot to \n, and we're good. I reproduced the issue, and this fixes it.
Status: REOPENED → RESOLVED
Last Resolved: 10 years ago10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.