-
Notifications
You must be signed in to change notification settings - Fork 39
Alternative rollup implementation for the rust branch #47
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
Conversation
Currently it works as follows: 1. Mark the commits to be merged together as rollup. (e.g. r+ rollup) These commits will have an implicit priority of -1 to postpone the individual merge. 2. If one of the marked commits reaches the top of the queue, all the marked commits will be merged together and tested. 3. While merging commits, those commits that fail to merge are ignored. 4. You can prioritize the rollup by setting p=. Typical usage: 1. We have three commits to be tested together. 2. Set r+ rollup to the first commit. 3. Set r+ rollup to the second commit. 4. Set r+ rollup p=10 to the last commit, which will trigger the rollup process soon. Fixes graydon#34.
bors.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be simplified to
p = -1 if self.batched() else 0There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've applied it, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this cfg.get when the surround code is not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I guess it's a default value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think providing a sane default when the configuration value does not exist is good. (That's what cfg.get(key, default_value) does.) So I think we might even want to replace almost all the occurrences of cfg[key] to cfg.get(key, default_value).
However, it is just a matter of taste. You could also prefer explicit failing if the configuration value is not provided. Which way do you prefer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine as is, thanks.
|
This looks good to me though the logic around self.merge_sha was a bit hard for me to follow, and my python is weak. Unfortunately I can't test it right now. I may be able to tonight, but if not I will tomorrow. ISTM that if the rollup fails the failure will be posted to whichever PR triggered the test, but then bors will proceed to the other rollup PRs and do the test again (which will fail again, until all the PRs have triggered a failed rollup). This would be counter-productive. I'm wondering what the workflow is for rollups that fail. Currently rollups have a PR and if there's a failure, the rollup author fixes it manually and tries again, or removes. Under this scheme I'd imagine someone would figure out which PR caused the failure, remove the 'rollup' comment or 'r-' it, then '@bors: retry' the rollup. Does that sound right? |
|
With this arrangement that doesn't create a new PR it won't be possibly to use the hypothetical '@bors: try' to test a rollup before attempting to land. I'm not sure this is a problem, but my hunch is that rollups often fail a number of times since they're so big. If it becomes desirable to try rollups it might be nice to support tagging rollups independently of r+, like one comment with '@bors: rollup' (though maybe your regexp supports just the word 'rollup'?). |
I also think the code around
This is true, but bors won't proceed to one of the remaining rollup PRs immediately, because they all have lower priority than the normal PRs. (We triggered the rollup by setting
Yes, that would be a typical approach to a failed rollup.
Right, |
Alternative rollup implementation for the rust branch
|
I've deployed this to production. @barosl will you write up a summary of how to do rollups to discuss.rust-lang.org? |
|
🎊 |
This is an alternative implementation of #46.