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

Proposal - enable automerging capability #2453

Closed
planetf1 opened this issue Jan 20, 2020 · 13 comments · Fixed by #2471
Closed

Proposal - enable automerging capability #2453

planetf1 opened this issue Jan 20, 2020 · 13 comments · Fixed by #2471
Assignees
Labels
build-improvement Build improvements - maven, gradle, GitHub actions github Actions, repository moves, admin open for discussion A suggestion or request for discussion on a scenario

Comments

@planetf1
Copy link
Member

planetf1 commented Jan 20, 2020

Currently merging PRs into master can be somewhat tedious.

When a PR is open it is hopefully reviewed, commented on .. and sometime later one of the maintainers sees it, considers it ready to merge, and typically clicks to update from master, then watches it over the next 20-30 minutes until the build completes, then clicks merge.

If other activity is ongoing this may take a few retries.

So we incur a significant amount of time even after that 'intent' is clear.

I would like to propose that we enable an auto-merging bot such as https://github.com/marketplace/actions/merge-pull-requests

Whilst the old workflow will still work, this will allow us to also simply tag the PR to mark our intent, and let the action worry about re-updating and trying the PR merge. For example we would tag the PR as 'automerge'

Upsides - less effort, time,distraction - quicker to clear backlog
Downsides - accidental/liberal use of automerge tag, bugs in process, very easy to queue up a series of PRs with no (easy) way to manage the queue.

Note that 'dependabot' has it's own integrated automerging which is currently enabled. Once a PR is approved it will do a similar action to that above.

There's a few alternative bots to the one above such as https://github.com/marketplace/actions/pr-merge-bot which additionally will enforce that all reviews are in approved state (even if not mandatory by github settings) which adds a little extra safety ? May be an improvement.

interested in the team's thoughts
cc: @mandy-chessell @cmgrote @grahamwallis @cong78

@planetf1 planetf1 added the open for discussion A suggestion or request for discussion on a scenario label Jan 20, 2020
@planetf1 planetf1 added this to the 2020.01 (1.4) milestone Jan 20, 2020
@planetf1 planetf1 self-assigned this Jan 20, 2020
@cmgrote
Copy link
Member

cmgrote commented Jan 20, 2020

I like the idea. My only concern is indeed that a queue is built up that we don't have a way to manage -- if there's some PR that we urgently need to "jump the queue" we end up waiting until everything above it is merged.

However, given that we're applying this approach already with Dependabot, this would give us a way of letting the system inject other PRs into that same "queue" automatically; which without such a change we don't have a way to do today. And we can presumably mitigate the risk of having a queue that is too big and blocks any other PRs from being merge-able by being careful about marking too many PRs as automerge at the same time? (Or leaving such activity to some time period where we expect some quiet time PR-submission-wise?)

So on that basis, I'm more in favor than not -- say +0.7.

@planetf1
Copy link
Member Author

Yes it's not perfect - I wondered if there's a way of only running off-peak, but that would probably require us forking an existing action & adding that capability (not looked thoroughly yet - wanted to float the idea).

I feel we have a fair bit of human 'polling; going on to merge our PRs which is wasting time. I'd hope the queue never gets too big as it's now much easier to manage.

Technically we could probably subvert the q for something critical by canceling the PR jobs in azure but it's not really a smooth process.

@planetf1 planetf1 added the build-improvement Build improvements - maven, gradle, GitHub actions label Jan 20, 2020
planetf1 added a commit to planetf1/egeria that referenced this issue Jan 21, 2020
Signed-off-by: Nigel Jones <nigel.l.jones+git@gmail.com>
planetf1 added a commit to planetf1/egeria that referenced this issue Jan 21, 2020
Signed-off-by: Nigel Jones <nigel.l.jones+git@gmail.com>
planetf1 added a commit to planetf1/egeria that referenced this issue Jan 21, 2020
Signed-off-by: Nigel Jones <nigel.l.jones+git@gmail.com>
@planetf1
Copy link
Member Author

Automerge is not working with this configuration. The job fails. This may well be down to the action not updating the PR prior to the merge attempt. Have reported to the author.

Having looked at the other marketplace options it's not entirely clear any will completely address our needs without building a more complex pipeline. This might be better done in a test repo.

Will leave this open to see if there's a simple approach we can take

@planetf1 planetf1 reopened this Jan 22, 2020
@planetf1 planetf1 modified the milestones: 2020.01 (1.4), 2020.02 (1.5) Jan 22, 2020
planetf1 added a commit to planetf1/egeria that referenced this issue Jan 27, 2020
Signed-off-by: Nigel Jones <nigel.l.jones+git@gmail.com>
planetf1 added a commit that referenced this issue Jan 27, 2020
#2453 update automerge action version
planetf1 added a commit to planetf1/egeria that referenced this issue Jan 27, 2020
Signed-off-by: Nigel Jones <nigel.l.jones+git@gmail.com>
@planetf1 planetf1 modified the milestones: 2020.02 (1.5), 2020.01 (1.4) Jan 27, 2020
planetf1 added a commit that referenced this issue Jan 27, 2020
@planetf1
Copy link
Member Author

Unfortunately this isn't working yet. I'm still working with the automerge project to see if it should do what we expect pascalgn/automerge-action#46

@planetf1
Copy link
Member Author

Have received an update - it seems there are challenges with the way github actions works that means this won't work by default with a fork. Each individual could enable it and we might get something working but it's tedious.

I'm going to propose reverting the addition of automerge and delaying this (or closing) until there's time to do further investigation and testing on another repo.

planetf1 added a commit to planetf1/egeria that referenced this issue Jan 28, 2020
Signed-off-by: Nigel Jones <nigel.l.jones+git@gmail.com>
planetf1 added a commit that referenced this issue Jan 28, 2020
#2453 disable automerge - not able to satisfy original goal
@planetf1 planetf1 removed this from the 2020.01 (1.4) milestone Jan 28, 2020
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 20 days if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the no-issue-activity Issues automatically marked as stale because they have not had recent activity. label Mar 29, 2020
@planetf1
Copy link
Member Author

still valid

@planetf1 planetf1 removed the no-issue-activity Issues automatically marked as stale because they have not had recent activity. label Mar 30, 2020
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 20 days if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the no-issue-activity Issues automatically marked as stale because they have not had recent activity. label May 30, 2020
@planetf1 planetf1 removed the no-issue-activity Issues automatically marked as stale because they have not had recent activity. label Jun 1, 2020
@planetf1 planetf1 added the github Actions, repository moves, admin label Jul 31, 2020
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 20 days if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the no-issue-activity Issues automatically marked as stale because they have not had recent activity. label Sep 30, 2020
@planetf1 planetf1 removed the no-issue-activity Issues automatically marked as stale because they have not had recent activity. label Oct 2, 2020
@github-actions
Copy link

github-actions bot commented Dec 3, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 20 days if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the no-issue-activity Issues automatically marked as stale because they have not had recent activity. label Dec 3, 2020
@planetf1 planetf1 removed the no-issue-activity Issues automatically marked as stale because they have not had recent activity. label Dec 8, 2020
@github-actions
Copy link

github-actions bot commented Feb 8, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 20 days if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the no-issue-activity Issues automatically marked as stale because they have not had recent activity. label Feb 8, 2021
@planetf1 planetf1 removed the no-issue-activity Issues automatically marked as stale because they have not had recent activity. label Feb 8, 2021
@planetf1
Copy link
Member Author

planetf1 commented Feb 9, 2021

@planetf1
Copy link
Member Author

planetf1 commented Mar 5, 2021

Closing this as github now offers this natively https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/automatically-merging-a-pull-request, selectable on a PR basis. Simple but should be more reliable than any of the myriad of plugins

@planetf1 planetf1 closed this as completed Mar 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build-improvement Build improvements - maven, gradle, GitHub actions github Actions, repository moves, admin open for discussion A suggestion or request for discussion on a scenario
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants