Skip to content

Commit

Permalink
Actions FetchTask concurrently picked jobs is an error for the runner
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
ChristopherHX authored Feb 4, 2025
1 parent 09a3b07 commit 0395d5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/actions/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0395d5c

Please sign in to comment.