Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions bugbot/rules/uplift_beta.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@
from bugbot import utils
from bugbot.bzcleaner import BzCleaner

# This phrase is posted in every needinfo comment (injected into the template
# via `get_extra_for_needinfo_template`) AND used as the re-nag guard in
# `get_bz_params`. Both uses reference this single constant so they can never
# drift out of sync.
COMMENT_MARKER = "please make an uplift decision for"

# The marker used by the previous wording. Bugzilla comments are immutable, so
# bugs nagged before the rewording carry only this one: keep filtering on it
# too, otherwise they would all be nagged a second time.
LEGACY_COMMENT_MARKER = ", is this bug important enough to require an uplift?"


class UpliftBeta(BzCleaner):
def __init__(self):
Expand All @@ -27,7 +38,10 @@ def __init__(self):
self.status_esr = utils.get_flag(self.esr, "status", "esr")

# Bugs will be added to `extra_ni` later after being fetched
self.extra_ni = {"status_beta": f"status-firefox{self.beta}"}
self.extra_ni = {
"status_beta": f"status-firefox{self.beta}",
"question": COMMENT_MARKER,
}

def description(self):
return "Bugs fixed in nightly but still affecting beta"
Expand Down Expand Up @@ -134,8 +148,12 @@ def get_bz_params(self, date):
"n5": 1,
"f5": "longdesc",
"o5": "casesubstring",
# this a part of the comment we've in templates/uplift_beta_needinfo.txt
"v5": ", is this bug important enough to require an uplift?",
"v5": COMMENT_MARKER,
# Same, for bugs nagged with the previous wording
"n8": 1,
"f8": "longdesc",
"o8": "casesubstring",
"v8": LEGACY_COMMENT_MARKER,
# Check if have at least one attachment which is a Phabricator request
"f6": "attachments.mimetype",
"o6": "anyexact",
Expand Down
17 changes: 13 additions & 4 deletions templates/uplift_beta_needinfo.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
The patch landed in nightly and beta is affected{% if extra[bugid]["esr_affected"] %}, along with ESR{% endif %}.
:{{ nickname }}, is this bug important enough to require an uplift?
- If yes, please nominate the patch for {% if extra[bugid]["esr_affected"] %}beta and ESR approvals{% else %}beta approval{% endif %}.{% if extra[bugid]["regression"] %} Also, don't forget to request an uplift for the patches in the {{ plural('regression', extra[bugid]["regression"]) }} caused by this fix.{% endif %}
- See https://wiki.mozilla.org/Release_Management/Requesting_an_Uplift for documentation on how to request an uplift.
- If no, please set {% if extra[bugid]["esr_affected"] %}`{{ extra["status_beta"] }}` and the ESR status flag(s){% else %}`{{ extra["status_beta"] }}`{% endif %} to `wontfix`.

:{{ nickname }}, {{ extra["question"] }} {% if extra[bugid]["esr_affected"] %}each affected release{% else %}beta{% endif %}:
{% if extra[bugid]["esr_affected"] -%}
- For **beta**, nominate the patch for beta uplift approval if the fix should be included in this release, or set `{{ extra["status_beta"] }}` to `wontfix` if the fix can wait for the next release.
- For **ESR**, nominate the patch for the appropriate ESR uplift approval if the fix should be included in ESR, or set the ESR status flag(s) to `wontfix` if an uplift isn't needed. Each affected ESR release needs a decision.
{%- else -%}
- Nominate the patch for beta uplift approval if the fix should be included in this release, or
- Set `{{ extra["status_beta"] }}` to `wontfix` if the fix can wait for the next release.
{%- endif %}
{% if extra[bugid]["regression"] %}
Don't forget to request an uplift for the patches in the {{ extra[bugid]["regression"] }} {{ plural('regression', extra[bugid]["regression"]) }} caused by this fix.
{% endif %}
See [Requesting an Uplift](https://wiki.mozilla.org/Release_Management/Requesting_an_Uplift) for documentation on how to request an uplift.

{{ documentation }}