Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Planned changes on the status graph #29

Closed
timokau opened this issue Jun 23, 2020 · 9 comments
Closed

Planned changes on the status graph #29

timokau opened this issue Jun 23, 2020 · 9 comments

Comments

@timokau
Copy link
Owner

timokau commented Jun 23, 2020

Trying to implement #23 has caused me to re-think the status labels. The intention from the beginning was to make PRs that need somebody (either any reviewer or a reviewer with commit bit) easy to find for the relevant people.

The needs_review and needs_work labels kind of do that, but they are not specific enough. We don't really care that much about the status of a PR which is currently in review. What do care about is which PRs are currently in need of a new reviewer.

Supporting this needs a bit of a more complicated state graph. Here's what I have come up with:
outfile
The two interesting states are (2) and (5) (highlighted in blue). They entirely unambiguously mark PRs that need somebody new to look at them. This makes them easier discoverable for reviewers with some time to spare. It also makes it easy for marvin-mk2 to automatically triage them. The plan is to regularly

  • Search for (3), (6) sorted by least recently updated. Timeout those that are stale for let's say >=3d.
  • Search for (5) sorted by oldest (since least recently updated could create perverse incentives). Assign privileged reviewers as long as available (i.e. people who have signed up as a reviewer and whose rate limit has not yet been reached)
  • Search for (2) sorted by oldest (since least recently updated could create perverse incentives). Assign privileged or unprivileged reviewers as long as available.

Also note that only a single transition (the green one) needs manual intervention. People seem (understandably) a bit hesitant to spam PRs with /status messages, so this should be an improvement. Manual changes should still be possible if the heuristics fail.

Regarding naming of the labels, I'm thinking
(1) -> unlabeled / work_in_progress
(2) -> needs_reviewer
(3) -> awaiting_reviewer
(4) -> awaiting_changes
(5) -> needs_merger
(6) -> awaiting_merger

@timokau
Copy link
Owner Author

timokau commented Jun 23, 2020

A note on why needs_review is not enough: Unfortunately github search doesn't allow you to restrict the search to PRs whose last update was by the PR author. Otherwise searching for PRs who have been updated by their author a couple of days ago could be used to simulate the "Needs new reviewer" state. Having an explicit label for that state makes it easier to search for anyway.

timokau added a commit that referenced this issue Jun 24, 2020
Matching the new set of statuses in
#29.
@ryantm
Copy link
Contributor

ryantm commented Jun 24, 2020

I think you have the naming of labels 3 and 4 swapped.

@timokau
Copy link
Owner Author

timokau commented Jun 24, 2020

Right, thanks for catching. Should be fixed now.

@ryantm
Copy link
Contributor

ryantm commented Jun 24, 2020

Maybe "merger" could be "final_reviewer".

The author would know that it is close to done, but might need more review, and regular reviewers would know a "final" review is special.

@timokau
Copy link
Owner Author

timokau commented Jun 25, 2020

Mh, "final" has a bit of the same problem as "merger (seems to suggest that the PR author shouldn't expect any additional rounds of review). At the same time it is a bit longer, so I think I prefer "merger" among the two.

Thanks for the idea though :)

timokau added a commit that referenced this issue Jun 25, 2020
Matching the new set of statuses in
#29.
@turion
Copy link

turion commented Jul 1, 2020

This is getting quite complex.

@timokau
Copy link
Owner Author

timokau commented Jul 1, 2020

Yes, but also a lot more useful. Its a tradeoff. I don't know of a good way of supporting

  • automatic reviewer assignment (making sure no PR gets drowned out in the queue),
  • merger assignment (making sure reviews of non-committers mean something),
  • easy discovery of PRs that need attention and
  • automatic triage (making sure no PR gets lost due to inactive reviewers).

without a more complicated state graph. Feel free to suggest simpler alternatives.

timokau added a commit that referenced this issue Jul 3, 2020
timokau added a commit that referenced this issue Jul 3, 2020
timokau added a commit that referenced this issue Jul 3, 2020
timokau added a commit that referenced this issue Jul 3, 2020
@timokau
Copy link
Owner Author

timokau commented Jul 3, 2020

Implemented in #30 and already deployed.

@timokau timokau closed this as completed Jul 3, 2020
@blaggacao
Copy link
Contributor

Maybe #40 can simplify.

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

No branches or pull requests

4 participants