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

Add riskiness label when creating rollups #138

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rylev
Copy link
Member

@rylev rylev commented Mar 3, 2021

This change adds a riskiness label when creating rollups that uses the number of PRs and their rollup statuses to estimate riskiness. The current formula being used is (riskinessPoints + max(numPrs - 8, 0)) / 8 where riskinessPoints is the sum of all PRs where rollup=iffy equals 2 points, rollup=maybe equals 1 point and rollup=always equals 0 points.

Screenshot 2021-03-03 142953

Possible future improvements include:

  • Asking for confirmation on rollups that are deemed very risky.
  • Providing riskiness statistics in the actual rollup PR
  • Tracking the merge success rate of risky rollups

Comment on lines +256 to +266
if (value > 0 && value <= 0.5) {
riskiness = 'acceptably risky';
} else if (value <= 1.0) {
riskiness = 'somewhat risky';
} else if (value <= 2.0) {
riskinessClass = 'riskiness_medium';
riskiness = 'risky';
} else if (value > 2.0) {
riskinessClass = 'riskiness_high';
riskiness = '⚠️very risky⚠️';
}
Copy link
Member

Choose a reason for hiding this comment

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

These limits are super low, and I'm worried that since they'll trigger on almost every PR people will just ignore them. Here's some rollups that landed in the last few days:

None of these PRs are anything less than "very risky"; I doubt you'll find any that are in the past few weeks (there's a list at https://github.com/rust-lang/rust/pulls?q=is%3Apr+label%3Arollup; finding the riskiness is manual).

Maybe as an alternative you could raise the limit to something like 4, and mark rollup=maybe as a value of 3 instead? That seems closer to how rollups are done now.

Copy link
Member

Choose a reason for hiding this comment

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

Honestly even the rollups I linked don't seem super risky to me, I would mark the 8 PR rollup as "riskiness_medium" and the rest as "riskiness_low". "riskiness_high" would be rollups with over 12 PRs (and I have some monsters with over 20 I could link too).

Comment on lines +254 to +257
var riskiness = 'not risky';
var riskinessClass = 'riskiness_low';
if (value > 0 && value <= 0.5) {
riskiness = 'acceptably risky';
Copy link
Member

@jyn514 jyn514 Apr 8, 2021

Choose a reason for hiding this comment

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

In practice no one will ever make a rollup with exactly 0 risk, I think you should just use "not risky" or "low risk" for both these cases. "acceptably risky" seems to imply the others are unnacceptably risky which I don't think is the right message.

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.

None yet

2 participants