Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

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.

Report what a run was doing when an integration wait times out

7178cad6da30afd446141ea1fa25849ff4a1e176 · Keenan Nemetz · 9d ago · parent 51c4cc66

Report what a run was doing when an integration wait times out

`waitForRun` printed the run slice with %+v, so a failed wait said only
"saw 1 run(s): [0xc026464e08]". It now names each run's id, status, attempt and
lease deadline, which is the difference between "still queued", "reported a
failure" and "the runner never reported" — the whole question when a wait times
out.

The three artifact tests waited for StatusSuccess alone, so a job that failed
was reported as a ten-second timeout with the reason left in a log nobody looked
at. They now use terminalRun, which is moved beside waitForRun, and it fails
with the run's exit code and log.

This is diagnosis, not a fix for a lost report. A combined-result verify on this
branch failed TestRunArtifactsArePrivateForPrivateRepos this way while the same
tree's branch verify passed, and an earlier combined result on main failed eight
tests with the same timeouts, so the transient predates this work. What the
change itself cannot have done is orphan a finished attempt: a sweep requeues an
expired lease but keeps the owner, and RecordAttempt still accepts the late
record — TestRecordAttemptAcceptsALateFinishBeforeAnotherLease holds it to that.

Nothing changes what a test asserts when a run reports: only what it says when
one does not.

server/ci_pages_test.go −15

@@ -209,18 +209,3 @@ func TestWorkflowRefusesAStaleSiteDeploy(t *testing.T) {
209 209 time.Sleep(25 * time.Millisecond)
210 210 }
211 211 }
212
213 // terminalRun waits for the newest run to stop moving and complains with its log if
214 // it failed, so a broken deploy is diagnosed by the test output rather than by
215 // rerunning it under a debugger.
216 func (f *fixture) terminalRun(t *testing.T) *runs.Run {
217 t.Helper()
218 run := f.waitForRun(t, 15*time.Second, func(r *runs.Run) bool {
219 return r.Status == runs.StatusSuccess || r.Status == runs.StatusFailed
220 })
221 if run.Status == runs.StatusFailed {
222 _, log := f.get("/" + f.repo + "/runs/" + run.ID + "/log")
223 t.Fatalf("run %s failed (exit %d):\n%s", run.ID, run.ExitCode, log)
224 }
225 return run
226 }