Repository navigation
Add the setup-vagrant-libvirt composite action - #18
Merged
Merged
Conversation
Install Vagrant, the vagrant-libvirt provider and libvirt on an Ubuntu runner for Beaker acceptance tests, without failing the job when Launchpad is down. Ubuntu dropped vagrant and vagrant-libvirt after 23.10; ppa:evgeni/vagrant carries vagrant 2.3.7, the last MPL-licensed release, and a matching vagrant-libvirt. The action tries, in order: 1. The Actions cache: the PPA's packages, restored from the newest key for the runner's Ubuntu series and architecture, installed with no request to Launchpad. 2. The PPA, with each step retried three times, 30s and then 60s apart. Only the PPA's own index refresh uses --error-on=any, so a flaky third-party source on the runner image doesn't fail the job. 3. HashiCorp's apt repository, pinned to vagrant-version, with `vagrant plugin install vagrant-libvirt` pinned to vagrant-libvirt-version, and a warning that this is BSL-licensed Vagrant. On a series the PPA doesn't publish for (ppa-series), the action goes straight here with a notice. A pull request can only restore caches saved from its own ref, its base branch or the default branch, so `cache-only: 'true'` saves the packages from a default-branch workflow instead of installing. It caches every package the PPA would provide, unpinned, under a key derived from their file names: a new PPA build gets a new key, and restoring an existing key keeps it from being evicted. Downloads go through apt-get download, which checks them against the PPA's signed index. The action lives here rather than in a simp/github-action-* repo of its own, so there is one repo to manage; the README now says composite actions belong here. CI shellchecks the actions' scripts and runs this one on real runners: cache-only on ubuntu-24.04 and ubuntu-latest, and installs from the cache, the PPA and HashiCorp, with Launchpad reachable and blocked. See simp/puppetsync#122. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 2, 2026
silug
reviewed
Nov 2, 2026
silug
left a comment
Contributor
There was a problem hiding this comment.
Overall the action looks solid, and the PR's CI exercises every path on real runners. Keeping it in this repo, rather than a new github-action-* repo, seems right to me: it has the same consumers, the same tag-pinning and Renovate flow, and the same branch protection.
Two things to fix: (1) ubuntu-latest is already 26.04, so the fleet's acceptance jobs skip the PPA and cache entirely, and (2) the action's test jobs now gate every PR to this repo on Launchpad being up. The other comments are mostly README prose.
- CI runs the action's tests only when the action or ci.yml changes, so a Launchpad outage can't block an unrelated PR; `All checks` counts a skipped job as passing. - Name the install test cases by what they exercise, and call the ubuntu-latest row a canary for how consuming repos run. - README: document that the cache and PPA only apply on noble runners, so jobs on ubuntu-latest (now 26.04) always install HashiCorp's Vagrant; add a "Warming the cache" section and the 60-day schedule caveat; reword the source list and the repo README per review. - action.yml: "Set up" in the name, drop `branding` (Marketplace only), and finish the vagrant-version description. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hcaballero2
approved these changes
Nov 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the
setup-vagrant-libvirtcomposite action, under.github/actions/, for simp/puppetsync#122: install Vagrant, vagrant-libvirt and libvirt on an Ubuntu runner without failing the job when Launchpad is down.The pupmod acceptance jobs installed from
ppa:evgeni/vagrantalone. On 2026-10-21 Launchpad returned 503 for several hours, every acceptance job failed, and the requiredAll checksstatus blocked merging. simp/puppetsync#126 switches the pupmodpr_tests.ymltemplates to this action and adds avagrant_package_cache.ymlworkflow that warms its cache from each repo's default branch.Behavior
The action tries, in order:
add-apt-repository, a refresh of the PPA's index alone with--error-on=any, then the install. Each step is retried three times, 30s and then 60s apart. Otherapt-get updatecalls are plain, so a flaky third-party source on the runner image doesn't fail the job.vagrantpinned tovagrant-version(2.4.9-1), andvagrant plugin install vagrant-libvirtpinned tovagrant-libvirt-version(0.12.2), with a::warning::that this is BSL-licensed Vagrant. On a series the PPA doesn't publish for (ppa-series, defaultnoble), the action goes straight here with a::notice::.ubuntu-latestis moving to 26.04, which the PPA doesn't cover.When the PPA path fails, its sources file is deleted directly, because
add-apt-repository -rcan itself need Launchpad.cache-onlyA pull request can only restore caches saved from its own ref, its base branch or the default branch, so caches saved by pull requests don't help other PRs. With
cache-only: 'true', the action is meant for a default-branch workflow (push and schedule). It works as follows:apt-get install --print-uris vagrant vagrant-libvirtand keeps every package the PPA would provide, so a dependency the PPA ships is cached too.apt-get download, which checks them against the PPA's signed index, and saves them.Testing
shellcheckandactionlintpass. The cache path (resolve, download, then install with the PPA removed) was also run in anubuntu:24.04container.ci.yml) runs the action on real runners: cache-only onubuntu-24.04andubuntu-latest, and five install cases covering the cache, the PPA and HashiCorp, with Launchpad reachable and blocked (via/etc/hosts).Which runner
The cache and the PPA only apply on
noble(ubuntu-24.04), the one series the PPA publishes for.ubuntu-latestnow resolves toubuntu-26.04, so jobs on it, including the pupmod acceptance jobs, install HashiCorp's Vagrant directly with a notice and never contact Launchpad. The cache and PPA paths are a hedge for jobs onubuntu-24.04. The README says so.Where it lives
This is the first composite action in this repo. The README said single actions go in their own
simp/github-action-*repos. It now lists composite actions under "What belongs here", so there is one repo to manage instead of one per action, and adds an "Actions" table. Callers pin a tag as with the workflows:uses: simp/gha-workflows/.github/actions/setup-vagrant-libvirt@v1.1.0.CI gains
shellcheckfor the actions' scripts and the action test jobs below. The tests depend on Launchpad, so they only run when the action orci.ymlchanges; achangesjob decides, andAll checkscounts a skipped job as passing. A Launchpad outage then can't block an unrelated PR here.After merge
Tag
v1.1.0(a new action is a minor release); simp/puppetsync#126 pins to it.🤖 Generated with Claude Code