mozilla / mozilla/bugbot

Handle failures in needinfo requests

Open
#1,370 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
68
Forks
92
Avg merge
2d 2h
Merged PRs (30d)
16

Description

Example of requesting needinfo from a disabled account:

2022-03-28 12:10:40,416 - ERROR - not_landed: Cannot put data for bug 1651425 (change => {'comment': {'body': 'There\'s a r+ patch which didn\'t land and no activity in this bug for 2 weeks.\n:bpeers, could you have a look please?\nIf you still have some work to do, you can add an action "Plan Changes" in Phabricator.\nFor more information, please visit [auto_nag documentation](https://wiki.mozilla.org/Release_Management/autonag#not_landed.py).\n'}, 'flags': [{'name': 'needinfo', 'requestee': '[bpeers@mozilla.com](mailto:bpeers@mozilla.com)', 'status': '?', 'new': 'true'}, {'name': 'needinfo', 'requestee': '[snorp@snorp.net](mailto:snorp@snorp.net)', 'status': '?', 'new': 'true'}]}).

From Discussion in the Matrix Room

@marco-c

we have the same problem in all tools that are needinfoing
maybe we should implement something generic
try to needinfo and, if it fails, needinfo their manager instead (with an option so individual tools can disable it)

@calixteman

the triage owner could make more sense
but yes we must have something here

@marco-c

triage owner wfm

@calixteman

I think we don't have to do it for workflow tools (they are only for mozilla employees and we already have a fallback strategy iirc)
for the others we can just add a method fallbackInCaseOfError or smthg like that we could call in the tool to "fix" the error
it will update the data to use and then the loop in bzcleaner will continue to PUT after the update

@suhaibmujahid

we could do something generic in bzcleaner with an option in the tools themselves to select the strategy, e.g., fallback to the triage owner or the manager or try both in some order
getting the manager if an employee left is a separate issue (see #1354) and resolving it can help here also

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in bzcleaner, where needinfo requests are PUT and the failure is reported, and read how workflow tools currently handle fallback strategies. Clarify whether the generic behavior should target a triage owner, a manager, or both, and how tools opt out or select a strategy. Done should include handling failed needinfo requests without stopping the update loop.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.