Skip to content

Conversation

@benjaminmah
Copy link
Contributor

Resolves #2053.

Adds an additional check to delete bugs where the triage owner has requested to block needinfos.

Checklist

  • Type annotations added to new functions
  • Docs added to functions touched in main classes
  • Dry-run produced the expected results
  • The to-be-announced tag added if this is worth announcing

Comment on lines 204 to 216
def filter_bugs(self, bugs):
users_info = UserActivity(include_fields=["groups", "requests"]).check_users(
set(bug["triage_owner"] for bug in bugs.values()),
keep_active=True,
fetch_employee_info=True,
)

for bug_id, bug in list(bugs.items()):
user_info = users_info[bug["triage_owner"]]
if "requests" in user_info:
if user_info["requests"]["needinfo"]["blocked"]:
del bugs[bug_id]
return bugs
Copy link
Member

@suhaibmujahid suhaibmujahid Dec 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not think we should filter out the bugs; we should only avoid the needinfo. Also, we should decide if we want to try to find someone else to needinfo.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've modified the script to change the bughandler to avoid adding the bugs to the needinfo list here: a00eef2

Please let me know if this looks ok!

user_info = users_info[bug["triage_owner"]]
if "requests" in user_info:
if user_info["requests"]["needinfo"]["blocked"]:
del bugs[bug_id]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would avoid having to delete items in this way. Instead, it would be clearer to limit this method to retrieve a list of triage owners that we want to filter.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this look? 7a1a05a

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handle cases where the triage owner blocked needinfo

2 participants