On GitHub merge queues, reliability, and multiplexed serial connections

Assuming anyone was paying attention, which I suspect they are not, they would have noticed that there are a lot of queued up pull requests for Shaken Fist right now. There are a couple of factors leading to that — there are now several bots which do automated pull requests for code hygiene purposes; and a couple of months ago I decided to give GitHub’s new merge queue functionality a go in order to keep the CI resource requirements for Shaken Fist under control. All CI runs on four machines in my home office, and there were periods of time where the testing backlog would be more than 24 hours long. I can’t simply buy more hardware, and I didn’t really want to test things less.

The basic idea of GitHub merge queues is that you have a quick set of initial tests which determine if the pull request smells, and then only run the full test suite on non-stinky code which a human has signed off on. Once the human signs off, the code will only merge if the full suite passes, and GitHub manages a queue of merge attempts to keep that reasonable.

(more…)

Continue ReadingOn GitHub merge queues, reliability, and multiplexed serial connections

Fetching the most recent GitHub actions runner version

  • Post author:
  • Post category:GitHub

One of the struggles I have with running self-hosted GitHub actions runners is that GitHub releases new versions of the runner quite often and I don't notice. That's fine as long as you ignore the scary warnings on action output, until they drop support for whatever random old runner you're using. They did just that to me this week. The best bit was that the "old runner" was only a month old! I was left wondering if I could automate this. The answer is thankfully yes. Specifically, I wanted to automate it with a GitHub action which downloads the runner and puts it into the self-hosted runner image. That looks like this: - name: Install the github command line run: | sudo apt update sudo apt install -y curl curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null sudo apt update sudo apt install -y gh - name: Lookup latest version of the GitHub actions runner env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | actions_url=$(gh release view --repo actions/runner --json assets | \ jq -r '.assets[].url | select (contains("linux-x64-2")) | select (test("[0-9].tar.gz$"))') echo "GITHUB_ACTIONS_URL=$actions_url" >>…

Continue ReadingFetching the most recent GitHub actions runner version

How to maintain a local mirror of github repositories

Similarly to yesterday’s post about mirroring ONAP’s git, I also want to mirror all of the git repositories for certain github projects. In this specific case, all of the Kubernetes repositories.

So once again, here is a script based on something Tony Breeds and I cooked up a long time ago for OpenStack…

(more…)

Continue ReadingHow to maintain a local mirror of github repositories

End of content

No more pages to load