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/artifacts_test.go +3−3

@@ -134,7 +134,7 @@ func TestWorkflowArtifactTreeIsPublished(t *testing.T) {
134 134 f.waitForRun(t, 5*time.Second, func(r *runs.Run) bool { return r.Status == runs.StatusQueued })
135 135 f.runOnce(t)
136 136
137 done := f.waitForRun(t, 10*time.Second, func(r *runs.Run) bool { return r.Status == runs.StatusSuccess })
137 done := f.terminalRun(t)
138 138 arts, err := f.srv.Runs.Artifacts(done.ID)
139 139 if err != nil {
140 140 t.Fatal(err)
@@ -185,7 +185,7 @@ func TestRunArtifactsSurviveTheSweep(t *testing.T) {
185 185 }
186 186 f.waitForRun(t, 5*time.Second, func(r *runs.Run) bool { return r.Status == runs.StatusQueued })
187 187 f.runOnce(t)
188 done := f.waitForRun(t, 10*time.Second, func(r *runs.Run) bool { return r.Status == runs.StatusSuccess })
188 done := f.terminalRun(t)
189 189 arts, err := f.srv.Runs.Artifacts(done.ID)
190 190 if err != nil || len(arts) == 0 {
191 191 t.Fatalf("no artifacts to protect: %+v %v", arts, err)
@@ -221,7 +221,7 @@ func TestRunArtifactsArePrivateForPrivateRepos(t *testing.T) {
221 221 }
222 222 f.waitForRun(t, 5*time.Second, func(r *runs.Run) bool { return r.Status == runs.StatusQueued })
223 223 f.runOnce(t)
224 done := f.waitForRun(t, 10*time.Second, func(r *runs.Run) bool { return r.Status == runs.StatusSuccess })
224 done := f.terminalRun(t)
225 225
226 226 for _, path := range []string{
227 227 "/" + f.repo + "/runs/" + done.ID,