Page MenuHomePhabricator

Experiment with marge-bot on gitlab-test
Closed, ResolvedPublic

Description

marge-bot is "a merge-bot for GitLab that, beside other goodies, implements the Not Rocket Science Rule Of Software Engineering".

Marge-bot offers the simplest of workflows: when a merge-request is ready, just assign it to its user, and let her do all the rebase-wait-retry for you. If anything goes wrong (merge conflicts, tests that fail, etc.) she'll leave a message on the merge-request, so you'll get notified. Marge-bot can handle an adversarial environment where some developers prefer to merge their own changes, so the barrier for adoption is really low.

This has been mentioned by other users of GitLab. We should see how / if it works for us.

Event Timeline

@thcipriani did some poking at this the other morning.

First impressions: This could use more experimentation, but it has some limitations (not being able to deal with auto-squash merge requests, for example) and I'm not sure how useful it is overall for our purposes.

Setup entailed some fiddling, but not generally too bad an undertaking:

A user: https://gitlab-test.wmcloud.org/marge-bot

Run script:

/home/thcipriani/marge-bot/run.sh
#!/usr/bin/env bash
printf '[INFO] Starting marge bot...'
sudo docker run --restart=on-failure \
  -v "$(pwd)":/configuration \
  smarkets/marge-bot:0.9.2 \
  --config-file=/configuration/marge-bot-config.yaml
printf 'DONE!\n'

Config with an SSH private key and an auth token:

/home/thcipriani/marge-bot/marge-bot-config.yaml
add-part-of: true
add-reviewers: true
add-tested: true
impersonate-approvers: true
gitlab-url: "https://gitlab-test.wmcloud.org"
auth-token: "REDACTED"
ssh-key: |
    REDACTED
    -----END OPENSSH PRIVATE KEY-----

A systemd unit:

/home/thcipriani/.config/systemd/user/marge-bot.service
[Unit]
Description = Marge bot
After = network.target

[Service]
Type = simple
WorkingDirectory = /home/thcipriani/marge-bot
StandardOutput=append:/home/thcipriani/marge-bot/debug.log
StandardError=append:/home/thcipriani/marge-bot/debug.log
ExecStart = /home/thcipriani/marge-bot/run.sh

Deployed marge bot, shows promise, but there is work to be done.