Page MenuHomePhabricator

Offer "time to first review" data for patches
Closed, ResolvedPublic

Description

A thought mentioned by WhatAmIDoing brought up in a meeting:

Data how long it takes on a proposed patch until a first review happens. Likely as percentile ranks / box plots.

Internal non-public task: https://gitlab.com/Bitergia/c/Wikimedia/support/issues/62

Implementation as of December 2019:

The Repositories gadget shown on both https://wikimedia.biterg.io/app/kibana#/dashboard/Gerrit and https://wikimedia.biterg.io/app/kibana#/dashboard/Gerrit-Timing has Avg. Time First Review (Days) and Median Time First Review (Days) columns so one can see per repository how long it takes until the first review. Note that this data is really the time it takes until a frist review happen. It is not the time how long patches are open which have not received any review.

In the DB, Time to first review data is available in the enriched index (time_to_first_review for changeset and patchset_time_to_first_review for patchsets) if we wanted to visualized things in different ways.

Event Timeline

Aklapper created this task.
Aklapper raised the priority of this task from Low to Medium.Jun 20 2019, 8:38 AM

For clarity and to avoiud misunderstandings: This is not about a general "response" (which might be adding a comment instead of a code-review label), but actually about a "review" (which means adding a code-review label) not added by the patch author.

Copying the internal comment here:

For instance, if we look at the history of the following changeset: https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/Translate/+/281377/, the time to first review would be from when Nemo bis Uploaded patch set 1. to the first review of Nikerabbit Nikerabbit Patch Set 1: Code-Review-1 I am not convinced...

Quoting @dicortazar that two different understandings were possible:

(1) time to first review for a Gerrit Changeset (independent from the total number of extra patchsets and iterations).
(2) first time to review but for each of the patchsets that you have in a Gerrit Changeset.

We want (2), as we want to make sure that potential reviewers are also responsive on follow-up improved iterations / patchsets on an initial changeset. :)

For the records: In the meantime, https://github.com/chaoss/grimoirelab-elk/pull/676 has been merged.

Catching up and quoting valerio here from internal https://gitlab.com/Bitergia/c/Wikimedia/support/issues/62 :

Time to first review data is already available in the enriched index (time_to_first_review for changeset and patchset_time_to_first_review for patchsets).

Note that in some cases the approval date is earlier than the creation date of the changeset/patchset. This happens because there is no approval after a new patchset. The previous approvals are copied to the new patchset, although they come from the previous patchset (this is not something we do but something that comes from the server). To overcome these cases and avoid negative numbers, we skip approval dates previous to patchset date to calculate the time to first review.

The internal ticket has been resolved:

The Repositories gadget shown on both https://wikimedia.biterg.io/app/kibana#/dashboard/Gerrit and https://wikimedia.biterg.io/app/kibana#/dashboard/Gerrit-Timing has Avg. Time First Review (Days) and Median Time First Review (Days) columns.

In the DB, Time to first review data is available in the enriched index (time_to_first_review for changeset and patchset_time_to_first_review for patchsets) if we wanted to visualized things in different ways.

Does that suffice?

Aklapper claimed this task.
Aklapper updated the task description. (Show Details)
Aklapper added a subscriber: Whatamidoing-WMF.

Resolving this task.

Also giving a CC heads-up to @Whatamidoing-WMF who came up with this thought initially.

Note that this might not yet do what's expected due to T240954