From 0395d5c9f537585a1214efbdcbbd61a25c8deda5 Mon Sep 17 00:00:00 2001 From: ChristopherHX Date: Tue, 4 Feb 2025 23:09:26 +0100 Subject: [PATCH] Actions FetchTask concurrently picked jobs is an error for the runner * Before this Gitea claimed no job is available to be picked in this case * The runner had to wait for an external taskversion increment * Now act_runner is notified about an error and retries the request later without updating its taskversion --- models/actions/task.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/actions/task.go b/models/actions/task.go index 9f13ff94c9..e94688e612 100644 --- a/models/actions/task.go +++ b/models/actions/task.go @@ -317,7 +317,7 @@ func CreateTaskForRunner(ctx context.Context, runner *ActionRunner) (*ActionTask if n, err := UpdateRunJob(ctx, job, builder.Eq{"task_id": 0}); err != nil { return nil, false, err } else if n != 1 { - return nil, false, nil + return nil, false, fmt.Errorf("other runner picked up our job") } task.Job = job