mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-14 05:56:14 +01:00
fdb1874ada
Some checks failed
/ release (push) Waiting to run
testing / backend-checks (push) Waiting to run
testing / frontend-checks (push) Waiting to run
testing / test-unit (push) Blocked by required conditions
testing / test-remote-cacher (map[image:docker.io/valkey/valkey:7.2.5-alpine3.19 port:6379]) (push) Blocked by required conditions
testing / test-remote-cacher (map[image:ghcr.io/microsoft/garnet-alpine:1.0.14 port:6379]) (push) Blocked by required conditions
testing / test-remote-cacher (map[image:redis:7.2 port:6379]) (push) Blocked by required conditions
testing / test-remote-cacher (map[image:registry.redict.io/redict:7.3.0-scratch port:6379]) (push) Blocked by required conditions
testing / test-mysql (push) Blocked by required conditions
testing / test-pgsql (push) Blocked by required conditions
testing / test-sqlite (push) Blocked by required conditions
testing / security-check (push) Blocked by required conditions
Integration tests for the release process / release-simulation (push) Has been cancelled
This commit adds a new flag, `--keep-labels`, to the runner registration CLI command. If this flag is present and the runner being registered already exists, it will prevent the runners' labels from being reset. In order to accomplish this, the signature of the `RegisterRunner` function from the `models/actions` package has been modified so that the labels argument can be nil. If it is, the part of the function that updates the record will not change the runner. Various tests have been added for this function, for the following cases: new runner with labels, new runner without label, existing runner with labels, existing runner without labels. The flag has been added to the CLI command, the action function has been updated to read the labels parameters through a separate function (`getLabels`), and test cases for this function have been added. <!-- Before submitting a PR, please read the contributing guidelines: https://codeberg.org/forgejo/forgejo/src/branch/forgejo/CONTRIBUTING.md --> Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4610 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org> Co-authored-by: Emmanuel BENOÎT <tseeker@nocternity.net> Co-committed-by: Emmanuel BENOÎT <tseeker@nocternity.net> |
||
---|---|---|
.. | ||
artifact.go | ||
forgejo.go | ||
forgejo_test.go | ||
main_test.go | ||
run.go | ||
run_job.go | ||
run_job_list.go | ||
run_list.go | ||
runner.go | ||
runner_list.go | ||
runner_test.go | ||
runner_token.go | ||
runner_token_test.go | ||
schedule.go | ||
schedule_list.go | ||
schedule_spec.go | ||
schedule_spec_list.go | ||
status.go | ||
task.go | ||
task_list.go | ||
task_output.go | ||
task_step.go | ||
tasks_version.go | ||
utils.go | ||
utils_test.go | ||
variable.go |