Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

replace automerge with scheduled workflow living in this repo #477

Merged
merged 9 commits into from
Jul 20, 2023

Conversation

galargh
Copy link
Contributor

@galargh galargh commented Feb 23, 2023

Resolves #475

Description

This PR proposes replacing individual automerge.yml workflows with a single Merge PRs workflow which goes over all the repos web3-bot has access to and merges PRs created by web3-bot if they are ready to be merged once a day.

Why?

I want to introduce this change because it's quite wasteful to hoard a runner for the entire duration of CI just for automerge. As described in #475, this could lead to deadlocks in extreme cases.

What are we giving up?

We're increasing the time between workflow being finished successfully and merge to up to 1 day. I think this is acceptable for updates from web3-bot but I'd definitely want to hear from you whether you agree.

What else changes?

I decided to use github-script action for the new/modified workflows. This allowed me to define workflows in inline JS. It could be even better if we turned them into proper JS actions but I think we can leave it until the next time we're investing time in one of these workflows.

Testing

I ran the new/modified workflows on push while replacing the PR creation/PR merge/workflow deletion with core.info log:

How to roll it out?

  1. Disable Dispatch workflow
  2. Merge this to master
  3. Run Delete workflow workflow with:
    • path: .github/workflows/automerge.yml
    • dry-run: true
  4. Run Delete workflow workflow with (*we might need stronger credentials to delete files directly in default branches):
    • path: .github/workflows/automerge.yml
    • dry-run: false
  5. Enable Dispatch workflow

@galargh galargh force-pushed the merge-prs branch 5 times, most recently from e7264e0 to f14be93 Compare March 8, 2023 21:06
@galargh galargh changed the title wip: replace automerge with scheduled workflow living in this repo replace automerge with scheduled workflow living in this repo Mar 9, 2023
@galargh galargh marked this pull request as ready for review March 9, 2023 15:23
@galargh galargh requested a review from a team as a code owner March 9, 2023 15:23
@galargh galargh changed the base branch from master to unified-ci-2.0 July 20, 2023 08:20
@galargh galargh merged commit 9b850f9 into unified-ci-2.0 Jul 20, 2023
29 of 30 checks passed
@galargh galargh deleted the merge-prs branch July 20, 2023 08:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automerge might starve other workflows
1 participant