vole
Site
Clone
Read only, no credentials:
https://rodent.software/vole.git
Write over SSH with a registered key:
git clone ssh://git@rodent.software/vole.git
Self-hosted forge that lives in your Git repo.
Test the deadline and the site guard, not the machine
e48543eec150817b20c17a8b3d4f663be1c11609 · Keenan Nemetz · 23d ago · parent c284cb2c
Test the deadline and the site guard, not the machine verify failed twice on cli-help-table while the runner host was at 50-60% CPU steal. Neither failing test was about the code under test. TestWorkflowRefusesAStaleSiteDeploy started its held runner with exec.Command(binPath, "runner", ...) instead of f.runnerCmd, so it kept the 2G disk reserve that c284cb2 turned off for every other test-spawned runner. Inside a CI job /tmp is the runtime's 1G tmpfs, so the nested runner stopped the build at its first one-second disk check: the stale run failed, but for the disk rather than for staleness, and the log never said "the site was not deployed". TestTestRunnersComeFromRunnerCmd now fails when a test starts a runner directly, because the mistake is invisible on a workstation where /tmp is large. TestHandshakeDeadlineIsClearedForTheSession gave the handshake a 100 ms deadline and then slept past it. On a loaded machine the server cut the test's own handshake, so dial failed with EOF and the test reported a product problem it had created. It now reads the deadlines the server set on the connection: a non-zero bound for the handshake, then a zero one after it. That is the property, it takes no wall-clock assumption, and deleting the clearing in serveConn fails it immediately instead of a third of a second later. Closes: 01M7389DZ8JY77W3AF1P10ZDRT
server/ci_pages_test.go +2−3
| @@ -8,7 +8,6 @@ package server_test | |||
| 8 | 8 | import ( | |
| 9 | 9 | "io" | |
| 10 | 10 | "os" | |
| 11 | "os/exec" | ||
| 12 | 11 | "path/filepath" | |
| 13 | 12 | "strings" | |
| 14 | 13 | "testing" | |
| @@ -123,7 +122,7 @@ func TestWorkflowRefusesAStaleSiteDeploy(t *testing.T) { | |||
| 123 | 122 | ||
| 124 | 123 | // Lease the first run and hold it in its step, so the second commit lands while the | |
| 125 | 124 | // build is running rather than waiting. | |
| 126 | held := exec.Command(binPath, "runner", "--remote", f.sshBase(), "--once", "--dir", t.TempDir()) | ||
| 125 | held := f.runnerCmd(t, "--once", "--dir", t.TempDir()) | ||
| 127 | 126 | held.Env = f.ciEnv() | |
| 128 | 127 | held.Stderr = io.Discard | |
| 129 | 128 | if err := held.Start(); err != nil { | |
| @@ -155,7 +154,7 @@ func TestWorkflowRefusesAStaleSiteDeploy(t *testing.T) { | |||
| 155 | 154 | if err := os.WriteFile(sentinel, []byte("go\n"), 0o644); err != nil { | |
| 156 | 155 | t.Fatal(err) | |
| 157 | 156 | } | |
| 158 | stale := f.waitForRun(t, 30*time.Second, func(r *runs.Run) bool { | ||
| 157 | stale := f.waitForRun(t, 60*time.Second, func(r *runs.Run) bool { | ||
| 159 | 158 | return r.ID == first.ID && (r.Status == runs.StatusFailed || r.Status == runs.StatusSuccess) | |
| 160 | 159 | }) | |
| 161 | 160 | if stale.Status != runs.StatusFailed { | |