I added sentinel error values for jobs not being found and no jobs being updated by the `CreateTaskForRunner` function. This avoids the nilnil antipattern and allows the nilnil lint to be enabled for the `models/actions/task.go` file again. The handling of these new errors was added to the `PickTask` function in `services/actions/task.go`. Related issue: https://codeberg.org/forgejo/forgejo/issues/11261 Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12768 Reviewed-by: limiting-factor <limiting-factor@noreply.codeberg.org> Reviewed-by: elle <0xllx0@noreply.codeberg.org>
14 lines
248 B
YAML
14 lines
248 B
YAML
-
|
|
id: 1004
|
|
name: "create task - no matching job found test runner"
|
|
owner_id: 0
|
|
repo_id: 0
|
|
agent_labels: '["fedora"]'
|
|
|
|
-
|
|
id: 1005
|
|
name: "create task - no job updated test runner"
|
|
owner_id: 0
|
|
repo_id: 0
|
|
agent_labels: '["ubuntu"]'
|