-
Notifications
You must be signed in to change notification settings - Fork 797
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
[infra] Commit automation #976
Comments
GitHub has "Draft PR" feature when create a PR. Unfortunately, after normal PR is created, no way to change it to Draft. Still this is useful, as it can go through the review process but no Big Green Button is shown :) |
I don't think automation for merging is the right path: A model where patch authors commit their own changes has plenty of advantages, but it does mean that we either need to add a way to mechanically enforce cases where reviewers say "Looks good to me, but please wait for X before merging" or rely on patch submitters to follow such instructions. I think it would work fine most of the time, but given the security sensitive nature of the project we're typically making slightly different choices in areas like that to some other open source projects. We should definitely document that patch submitters should state explicitly when they feel their submission is ready for merging from their perspective. We can also encourage pinging after a certain period of no response, and consider what we want to do to catch submissions which are waiting someone to merge them (either someone scans through periodically, or we have tooling to help with this). |
It'd be nice if we could use a label like "Status:Commit-Ready" or something, but I'm not sure what the GitHub permission model looks like around editing labels. We could add a webhook that would turn messages like "Ready to commit!" into "Status:Commit-Ready" labels, which would make it easier for committers to look for changes that are ready to go. |
Permissions are summarised here. Someone with only read permission can't add labels unfortunately. Having the label added might be a bit useful, but I wonder if it would be confusing project-specific process for contributors, and we might do a better job of helping out contributors by checking for approved requests that haven't actually been merged. Ideally the person doing the merging will be the committer who actually reviewed it, rather than another committer who may lack knowledge in that area. |
You're right. I think I'm every-problem's-a-nailing this. So long as committers doing reviews communicate with the reviewee that they'll merge their change when they're ready, and we follow up on reviews that are approved and unmerged, then I think that's probably more than enough to keep reviews moving and get changes merged. |
One thing that has happened a few times recently is that a change will get merged (rebased and merged) with CI results that are out of date. If we used bors or something similar that would guarantee that no change could be merged that didn't pass CI when rebased on top of the current branch... |
bors would also help in situations where a change looks good and a committer wants to land it but instead of being able to commit it at that point has to come back later when the pipelines run has finished. |
Thanks for bringing this up @gkelly. I'm a bit undecided about bors. The main problem of this discussion is that bors solves multiple problems at the same time, not all of which are equally applicable to our use case. Here's my thinking at this point. Pro:
Con:
I see three problems in our current setup which bors doesn't solve:
So: I'm personally not convinced the downsides of bors are outweighing the benefits. I might be wrong, so the best way to figure that out is to try it. Assuming others are OK with that, I'm happy to work with you or somebody else to integrate bors and see if it does the trick for us. |
Thanks for your response, @imphil, my responses inline.
It does add noise, but if you look at a fairly representative PR using bors it's all legible. Commands to bors are done via
That's correct,
That's correct.
Bors can perform rollup commits, where it will attempt to batch commits together for testing and merging. That could reduce the load on the CI machines in a fairly major way, as many smaller commits can get batched together.
Agreed.
I believe that a trial period is worthwhile. I believe that we shouldn't force people to use it, but that we can make it available and encourage people to try it out to see if it addresses some of the issues. |
@gkelly Since we had a fair share of master-breaking commits in recent times, I think we've how reached the point where bors can provide value to OpenTitan. Were you able to look into that topic more deeply since we last talked about it? |
I'm not sure this issue is worth keeping open. In particular, I think we've sort of agreed that the current flow works well except for the merge-skew problem. But I'm not sure this is the best starting point for an issue tracking that. @moidx: I think you're the only contributor to this issue who's left on the project(!!). Do you think there's value keeping this open? |
Closing as obsolete. |
Right now we don't have any way beyond a committer clicking the big green button to get a change landed. There are occasions where a change author will receive approval but not yet want to land a change, so having a committer always merge a change upon approval doesn't seem like the preferred flow. Do we go full-bors? Have a protocol of having authors just say "Commit please!" when it's ready might be the easier approach...
The text was updated successfully, but these errors were encountered: