Skip to content

ci: Run the smoke test VM with gcloud instead of Vagrant - #1488

Open
marcleblanc2 wants to merge 1 commit into
marc/ci-check-compose-shell-jaeger-executorfrom
marc/smoke-test-vm-gcloud
Open

marcleblanc2 wants to merge 1 commit into
marc/ci-check-compose-shell-jaeger-executorfrom
marc/smoke-test-vm-gcloud

Conversation

@marcleblanc2

@marcleblanc2 marcleblanc2 commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Replaces Vagrant with a gcloud script for the smoke test VM. .buildkite/smoke-test-vm.sh creates the VM, copies the repository to it over SSH, runs the same tests, and deletes it.

  • No Vagrant. Removes .buildkite/vagrant-run.sh, test/Vagrantfile, and test/servers.yaml.
  • Faster. No Vagrant plugins to install on every run, and the job does not wait for the VM to be deleted. The smoke test job took 333 seconds here, and 451 seconds with the same tests on Vagrant (ci: Check every Compose file and shell script, and test Jaeger and the executor #1489), one run each.
  • 1 hour limit. GCP deletes each VM an hour after it starts (--max-run-duration=1h), so a job which dies cannot leave a VM running. The step times out after 30 minutes.
  • Cleans up leftovers. Each job first deletes smoke test VMs and unattached disks older than an hour.
  • 20 GB boot disk, set explicitly. Before, the VM took the image's size.
  • Secrets. Each job fetches the builder key into its own temporary directory and removes it; before, every job on an agent shared /tmp/e2e-builder.json. The Docker Hub password goes to the VM over stdin, and is no longer written to /root/.profile.
  • Retries the SSH connection, on the same VM. In build 16777 the VM stopped answering while the repository was being copied to it. The script retries that copy every 15 seconds, up to 10 times, when ssh exits with 255. It never creates a second VM, and never retries a test failure.
  • Updates AGENTS.md for the new script.

Risk: low. CI only. The VM image, machine type, network, and service account are unchanged.

Things to know

Checklist

  • All images have a valid tag and SHA256 sum (no image changes)

Test plan

  • Build 16957 passed: both tests ran on the gcloud VM
  • With stub gcloud, ssh, and curl commands, each of these creates one VM, requests one deletion, and removes the key files:
    • a passing run
    • a failing test: exits 1, no retry, logs copied back
    • a copy which fails twice with 255, then works: two retries, then the tests run
    • a copy which never works: ten retries, exits 255, the tests do not run
  • The retry has not run in Buildkite: I could not make a real VM drop off the network on demand

Closes FE-584

@marcleblanc2
marcleblanc2 added this pull request to stack #1491 November 11, 2026 10:45
@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

@marcleblanc2
marcleblanc2 force-pushed the marc/smoke-test-vm-gcloud branch from 184dce9 to ebb8e85 Compare November 11, 2026 22:23
@marcleblanc2
marcleblanc2 force-pushed the marc/smoke-test-vm-gcloud branch 2 times, most recently from ebbd5b6 to 32ddf90 Compare November 12, 2026 04:05
@marcleblanc2
marcleblanc2 removed this pull request from stack #1491 November 12, 2026 22:27
@marcleblanc2
marcleblanc2 force-pushed the marc/smoke-test-vm-gcloud branch from 32ddf90 to 21feebc Compare November 12, 2026 22:27
@marcleblanc2
marcleblanc2 added this pull request to stack #1498 November 12, 2026 22:27
@marcleblanc2
marcleblanc2 force-pushed the marc/smoke-test-vm-gcloud branch from 21feebc to 343915f Compare November 12, 2026 22:56
@marcleblanc2
marcleblanc2 removed this pull request from stack #1498 November 13, 2026 04:58
@marcleblanc2
marcleblanc2 changed the base branch from marc/smoke-test-wait-for-health to main November 13, 2026 04:58
@marcleblanc2
marcleblanc2 force-pushed the marc/smoke-test-vm-gcloud branch from 343915f to 3e971cd Compare November 13, 2026 04:58
@marcleblanc2
marcleblanc2 changed the base branch from main to marc/ci-check-compose-shell-jaeger-executor November 13, 2026 04:58
@marcleblanc2
marcleblanc2 added this pull request to stack #1504 November 13, 2026 04:58
@marcleblanc2
marcleblanc2 marked this pull request as ready for review November 13, 2026 05:37
@marcleblanc2
marcleblanc2 requested a review from a team November 13, 2026 05:37
@marcleblanc2
marcleblanc2 enabled stacked auto-merge (squash) November 13, 2026 05:40
stacked auto-merge was automatically disabled November 13, 2026 07:29

Pull Request is not mergeable

@marcleblanc2
marcleblanc2 force-pushed the marc/smoke-test-vm-gcloud branch from 3e971cd to a08f00a Compare November 13, 2026 07:40
smoke-test-vm.sh creates the VM with gcloud, copies the repository to it over SSH, runs test/smoke-test.sh and test/executor-smoke-test.sh, and asks GCP to delete the VM without waiting.

GCP deletes each VM an hour after it starts, and each job deletes the VMs and disks older jobs left behind. The boot disk is 20 GB. If the VM stops answering SSH while the repository is copied to it, the script retries the copy on the same VM.

Amp-Thread-ID: https://ampcode.com/threads/T-01a1c7a5-6b65-723b-980c-b85e1e9008b5
Co-authored-by: Amp <amp@ampcode.com>
@marcleblanc2
marcleblanc2 force-pushed the marc/smoke-test-vm-gcloud branch from a08f00a to 0610c7d Compare November 13, 2026 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant