Closed gmierz closed 3 weeks ago
Thanks for the review @suhaibmujahid! I've resolved all the comments, and pushed the changes. However, I didn't remove the get_autofix_change
override.
Btw, I changed the name of the rule to remove the nag
from it.
Here's the output from the dry run:
$ python -m bugbot.rules.perfalert_inactive_regression
2024-11-01 15:09:47,209 - INFO - Run rule perfalert_inactive_regression.py
2024-11-01 15:09:47,212 - DEBUG - Starting new HTTPS connection (1): bugzilla.mozilla.org:443
2024-11-01 15:09:48,255 - DEBUG - https://bugzilla.mozilla.org:443 "GET /rest/bug?include_fields=id&include_fields=regressed_by&include_fields=summary&include_fields=groups&f3=creation_ts&o3=greaterthan&v3=2024-10-01T00%3A00%3A00Z&f1=regressed_by&o1=isnotempty&f2=keywords&o2=allwords&v2=regression&v2=perf-alert&f9=days_elapsed&o9=greaterthan&v9=7&status=UNCONFIRMED&status=NEW&status=REOPENED&resolution=---&f10=status_whiteboard&o10=notsubstring&v10=%5Bno-nag%5D&product=Developer+Infrastructure&product=External+Software+Affecting+Firefox&product=NSS&product=Release+Engineering&product=Testing&product=DevTools&product=Firefox+Build+System&product=Core&product=Firefox+for+iOS&product=Toolkit&product=Firefox&product=Remote+Protocol&product=JSS&product=WebExtensions&product=GeckoView&product=Fenix&product=NSPR&product=Focus&count_only=1 HTTP/11" 200 None
2024-11-01 15:09:48,259 - DEBUG - Starting new HTTPS connection (1): bugzilla.mozilla.org:443
2024-11-01 15:09:49,267 - DEBUG - https://bugzilla.mozilla.org:443 "GET /rest/bug?include_fields=id&include_fields=regressed_by&include_fields=summary&include_fields=groups&f3=creation_ts&o3=greaterthan&v3=2024-10-01T00%3A00%3A00Z&f1=regressed_by&o1=isnotempty&f2=keywords&o2=allwords&v2=regression&v2=perf-alert&f9=days_elapsed&o9=greaterthan&v9=7&status=UNCONFIRMED&status=NEW&status=REOPENED&resolution=---&f10=status_whiteboard&o10=notsubstring&v10=%5Bno-nag%5D&product=Developer+Infrastructure&product=External+Software+Affecting+Firefox&product=NSS&product=Release+Engineering&product=Testing&product=DevTools&product=Firefox+Build+System&product=Core&product=Firefox+for+iOS&product=Toolkit&product=Firefox&product=Remote+Protocol&product=JSS&product=WebExtensions&product=GeckoView&product=Fenix&product=NSPR&product=Focus&limit=100&order=bug_id&offset=0 HTTP/11" 200 None
2024-11-01 15:09:49,271 - DEBUG - Starting new HTTPS connection (1): bugzilla.mozilla.org:443
2024-11-01 15:09:49,792 - DEBUG - https://bugzilla.mozilla.org:443 "GET /rest/bug?id=1922789&include_fields=id&include_fields=assigned_to&include_fields=groups HTTP/11" 200 None
2024-11-01 15:09:49,814 - DEBUG - Starting new HTTPS connection (1): bugzilla.mozilla.org:443
2024-11-01 15:09:50,094 - DEBUG - https://bugzilla.mozilla.org:443 "GET /rest/user?include_fields=groups&include_fields=requests&include_fields=name&names=rebecatudor273%40gmail.com HTTP/11" 200 None
2024-11-01 15:09:50,102 - INFO - The bugs: 1925081
will be autofixed with:
{'comment': {'body': 'It has been over 7 days with no activity on this performance regression. :rebecatudor273, since you are the author of the regressor, bug 1922789, which triggered this performance alert, could you please provide a progress update?\n\nIf you need additional information/help, please needinfo the performance sheriff who filed this alert (they can be found in comment #0), or reach out in [#perftest](https://matrix.to/#/#perftest:mozilla.org), or [#perfsheriffs](https://matrix.to/#/#perfsheriffs:mozilla.org) on Element.\n\nFor more information, please visit [BugBot documentation](https://wiki.mozilla.org/BugBot#perfalert_inactive_regression.py).\n', 'is_private': False}, 'flags': [{'name': 'needinfo', 'requestee': 'rebecatudor273@gmail.com', 'status': '?', 'new': 'true'}]}
2024-11-01 15:09:50,113 - DEBUG - Starting new HTTPS connection (1): bugzilla.mozilla.org:443
2024-11-01 15:09:50,612 - DEBUG - https://bugzilla.mozilla.org:443 "GET /rest/bitly/shorten?url=https%3A%2F%2Fbugzilla.mozilla.org%2Fbuglist.cgi%3Finclude_fields%3Did%26include_fields%3Dregressed_by%26include_fields%3Dsummary%26include_fields%3Dgroups%26f3%3Dcreation_ts%26o3%3Dgreaterthan%26v3%3D2024-10-01T00%253A00%253A00Z%26f1%3Dregressed_by%26o1%3Disnotempty%26f2%3Dkeywords%26o2%3Dallwords%26v2%3Dregression%26v2%3Dperf-alert%26f9%3Ddays_elapsed%26o9%3Dgreaterthan%26v9%3D7%26status%3DUNCONFIRMED%26status%3DNEW%26status%3DREOPENED%26resolution%3D---%26f10%3Dstatus_whiteboard%26o10%3Dnotsubstring%26v10%3D%255Bno-nag%255D%26product%3DDeveloper%2BInfrastructure%26product%3DExternal%2BSoftware%2BAffecting%2BFirefox%26product%3DNSS%26product%3DRelease%2BEngineering%26product%3DTesting%26product%3DDevTools%26product%3DFirefox%2BBuild%2BSystem%26product%3DCore%26product%3DFirefox%2Bfor%2BiOS%26product%3DToolkit%26product%3DFirefox%26product%3DRemote%2BProtocol%26product%3DJSS%26product%3DWebExtensions%26product%3DGeckoView%26product%3DFenix%26product%3DNSPR%26product%3DFocus HTTP/11" 200 None
2024-11-01 15:09:50,615 - INFO -
****************************
* DRYRUN: not sending mail *
****************************
Receivers: ['calixte@mozilla.com', 'sylvestre@mozilla.com', 'mcastelluccio@mozilla.com', 'smujahid@mozilla.com', 'jwalker@mozilla.com']
Message:
Content-Type: multipart/mixed; boundary="===============2836010993019927187=="
MIME-Version: 1.0
From: xxx@xxxx.xxx
To: calixte@mozilla.com, sylvestre@mozilla.com, mcastelluccio@mozilla.com, smujahid@mozilla.com, jwalker@mozilla.com
Subject: [bugbot][autofix] PerfAlert regressions nag with 1 week of inactivity for the 2024-11-01
Cc:
Bcc:
X-Mailer: bugbot
--===============2836010993019927187==
Content-Type: text/html; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="utf-8">
</head>
<body>
<p>Hi there,</p>
<p>
The following bug is a performance alert which has had no activity in the last 7 days:
</p>
<table style="border:1px solid black;border-collapse:collapse;" border="1">
<thead>
<tr>
<th>Bug</th>
<th>Summary</th>
</tr>
</thead>
<tbody>
<tr bgcolor="#E0E0E0"
>
<td>
<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1925081">1925081</a>
</td>
<td>4.31% pdfpaint issue9534_reduced.pdf (Linux) regression on Mon October 7 2024</td>
</tr>
</tbody>
</table>
<p>
Sincerely,
<br>
BugBot
</p>
<p>
See the search query on <a href="https://mzl.la/3YuC3Eb">Bugzilla</a>.
</p>
<p>
See the source / report issues on the <a href="https://github.com/mozilla/bugbot/">GitHub repo</a>
</p>
</body>
</html>
--===============2836010993019927187==--
2024-11-01 15:09:50,617 - ERROR - Rule perfalert_inactive_regression
Traceback (most recent call last):
File "/home/sparky/mozilla-source/bugbot/bugbot/bzcleaner.py", line 856, in run
self.send_email(date=date)
File "/home/sparky/mozilla-source/bugbot/bugbot/bzcleaner.py", line 794, in send_email
db.Email.add(self.name(), receivers, "global", status)
File "/home/sparky/mozilla-source/bugbot/bugbot/db.py", line 347, in add
check(Email.__tablename__)
File "/home/sparky/mozilla-source/bugbot/bugbot/db.py", line 40, in check
raise Exception(
Exception: No database here: you can create it in using 'alembic upgrade head' and you can fill it with Bugzilla data in calling bugbot.db.init()
I'm guessing the failure at the end is related to sending an email which I don't have setup in the config.json file.
I just noticed that the new rule had not been added to a cron script. Example: https://github.com/mozilla/bugbot/blob/d66b9f0407012ed38938de1d466ce11a37ddcc0f/scripts/cron_run_daily.sh#L15-L16
One last thing is to add the new rule to the wiki page: https://wiki.mozilla.org/BugBot
Ok, I've added it: https://wiki.mozilla.org/BugBot#perfalert_inactive_regression.py
:partying_face: thanks for the reviews, and merging @suhaibmujahid!
Resolves #2526
This patch adds a new rule for needinfo'ing regression patch authors after a period of inactivity.