-
Notifications
You must be signed in to change notification settings - Fork 97
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
When updating, update only one PR at a time #128
Comments
This is an interesting idea and would definitely help improve the predictability of merges and reduce the load on CI systems caused by PR updates. But as you pointed out, I think we'll need to carefully consider how to make sure the "pipeline" is not blocked by a single PR that fails CI tests, is not approved, or otherwise fails to merge. In particular, Bulldozer does not currently track any internal state between events, so there's no place to keep track of PRs that are part of an update-and-merge pipeline. To keep the application simple, we'd like to avoid adding an external state store at this time. Do you think there's a way to track or compute the necessary information based only on data in GitHub? Tracking state in memory is also not ideal, as we'd like to keep the current ability to run more than one instance of Bulldozer at the same time. |
In this mode the bot could work as follows: On a master update:
ON a successful build of a ready PR
On a failed build of a ready PR
|
+1 on this (as commented in #259). On a PR that fails the CI: It should be discarded from the queue, or put back at the end of it. |
Trying to envision what the MVP of this change would look like, so mental mapping here as I try to grok the repo. This approach avoids adding any state to Basic change targets:
Notes:
Rough initial change idea:
Addressing the above suggestions:
Questions:
|
Thanks for outlining this approach, @merrywhether. I like the idea of a Regarding the limitations of this behavior, I'll let others chime in if there are concerns. We don't use the update feature much internally at Palantir, so I don't have a good sense of how useful this will be in the minimal version. One suggestion that might address the limitations is adding This increases the number of API calls, but many of them should be shared with the existing update checks (and therefore cached) and overall, I expect the reduction of load from updating fewer PRs to be more significant. |
In the current implementation, when the target branch is updated (
master
, for example), all PRs withmaster
as target branch will be updated (implementation here).This causes CI reruns on all PRs if they're in the PR-for-merging pipeline. A better approach would be to update only the oldest PR. This will create a predictable pipeline of PRs to be merged.
One issue with this approach is what happens if the updating-PR fails during CI tests, but this could be improved by listening to "CI check failed" event and proceeding to the next PR.
I can submit a PR if agreed. This could be configurable also.
The text was updated successfully, but these errors were encountered: