mozilla / bugbot

A Mozilla release management tool to send reminders to Firefox developers and improve Bugzilla metadata
BSD 3-Clause "New" or "Revised" License
41 stars 68 forks source link

Nag a manager when a component has no triage owner (if they are missing or set to inactive/disabled accounts) #1231

Closed marco-c closed 2 years ago

marco-c commented 3 years ago

We could use the Bugzilla team mapping to find the right manager to nag.

marco-c commented 3 years ago

The API is simple to use, https://bugzilla.mozilla.org/rest/config/component_teams to have the full list of teams, https://bugzilla.mozilla.org/rest/config/component_teams/TEAM_NAME to have the list of components belonging to a given team. There's also the possibility of components.team_name as include_fields, like we do here: https://github.com/mozilla/bugbug/blob/5e8b43d345b320d1e5344376c3cb26b6e11a9255/bugbug/bugzilla.py#L327.

The problem is then the association from a team to a manager.

marco-c commented 2 years ago

The problem is then the association from a team to a manager.

Perhaps we can use the *_round_robin.json files to map team to managers (using the "fallback" as the manager).

suhaibmujahid commented 2 years ago

The problem is then the association from a team to a manager.

Perhaps we can use the *_round_robin.json files to map team to managers (using the "fallback" as the manager).

The team names in the Bugzilla API (https://bugzilla.mozilla.org/rest/config/component_teams) don't correspond to the teams in the round-robin files. However, the component names as better matching (need some processing); thus, I think mapping the components is more straightforward.

[
  "Accessibility",
  "Bugzilla",
  "Build & Code Quality",
  "Compiler and Development Tools",
  "Crypto",
  "DevTools",
  "DOM Core",
  "DOM LWS",
  "Frontend",
  "GFX",
  "Internationalization",
  "Javascript",
  "Layout",
  "Low Level",
  "Media",
  "Mobile",
  "Mozilla",
  "Networking",
  "OS Integration",
  "Other",
  "Performance",
  "Pocket and User Journey",
  "Privacy and Security",
  "RelEng",
  "Relops",
  "Search and New Tab",
  "Security Engineering",
  "Security Infrastructure",
  "Services",
  "Telemetry",
  "Web Extensions"
]

https://github.com/mozilla/relman-auto-nag/blob/63a9db6109b84c44a20f3f5baebe609548b9d6ba/auto_nag/scripts/configs/tools.json#L2-L15

Another point, not all components are listed in the round-robin files. A solution to handle the missed components can be by looking for the manager of sibling components since they always have the same manager.

{
  "GFX": {
    "Core": [
      "Image Blocking",
      "ImageLib",
      "Canvas: 2D",
      "Graphics",
      "GFX: Color Management",
      "Canvas: WebGL",
      "Graphics: Layers",
      "Graphics: Text",
      "Graphics: WebRender",
      "Web Painting",
      "WebVR",
      "Graphics: WebGPU"
    ]
  }
}

https://github.com/mozilla/relman-auto-nag/blob/110b191ec3ef4d54df6a9b0227f0ad46e15a2735/auto_nag/scripts/configs/gfx_round_robin.json#L3-L13

We can cache the component managers (e.g., component_managers.json) and then reuse the mapping in all tools that need it?

@marco-c WDYT?

marco-c commented 2 years ago

We could do something easier: define a team_managers.json file, where we have a mapping from teams to managers. When we find a component with inactive/disabled owner (or no owner), we find the team corresponding to the component, and then the manager corresponding to the team.

Then, in the future in a follow-up, we make round-robin files not use components but teams (#1174), and use the team_managers.json file to find the "fallback".

suhaibmujahid commented 2 years ago

We could do something easier: define a team_managers.json file, where we have a mapping from teams to managers. When we find a component with inactive/disabled owner (or no owner), we find the team corresponding to the component, and then the manager corresponding to the team.

Then, in the future in a follow-up, we make round-robin files not use components but teams (#1174), and use the team_managers.json file to find the "fallback".

Yes, it will be cleaner. We can proceed to find the "fallback" in one of two ways :

  1. Add team names in "round-robin" files (matching the team names in the Bugzilla API).
  2. Use the component names to match the teams between Bugzilla API and round-robin files.

I think 1 will be more consistent with the future plan about #1174.

@marco-c WDYT?

marco-c commented 2 years ago

Yep, 1 sounds better.

marco-c commented 2 years ago

1342 fixed the triage owner case and not the QA contact one, but we are actually thinking of removing QA contact altogether (https://bugzilla.mozilla.org/show_bug.cgi?id=1762360) so that's OK.