mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-05-12 22:10:25 +00:00
When `concurrency.cancel-in-progress: false` is set on a Forgejo Action run, the run will be queued behind other runs of the same concurrency group. This requires a complex query to identify when a run can be dispatched to a runner. During a refactoring of this code in #9927, @earl-warren noted that the query was using a `status NOT IN (...)` clause, which we had discussed in another issue as a possible performance concern -- an index on `status` cannot be used to fulfill that query clause. This PR inverts the clause allowing an index to be used. Covered by existing automated tests in `tests/integration/actions_concurrency_group_queue_test.go` -- a minor commented-out section was removed in these tests while reviewing for this change. ## Checklist The [contributor guide](https://forgejo.org/docs/next/contributor/) contains information that will be helpful to first time contributors. There also are a few [conditions for merging Pull Requests in Forgejo repositories](https://codeberg.org/forgejo/governance/src/branch/main/PullRequestsAgreement.md). You are also welcome to join the [Forgejo development chatroom](https://matrix.to/#/#forgejo-development:matrix.org). ### Tests - I added test coverage for Go changes... - [ ] in their respective `*_test.go` for unit tests. - [ ] in the `tests/integration` directory if it involves interactions with a live Forgejo server. - I added test coverage for JavaScript changes... - [ ] in `web_src/js/*.test.js` if it can be unit tested. - [ ] in `tests/e2e/*.test.e2e.js` if it requires interactions with a live Forgejo server (see also the [developer guide for JavaScript testing](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/tests/e2e/README.md#end-to-end-tests)). ### Documentation - [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change. - [x] I did not document these changes and I do not expect someone else to do it. ### Release notes - [x] I do not want this change to show in the release notes. - Minor implementation change for a feature that is new in the v14 release; not relevant for the release notes. - [ ] I want the title to show in the release notes with a link to this pull request. - [ ] I want the content of the `release-notes/<pull request number>.md` to be be used for the release notes instead of the title. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/9943 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org> Co-authored-by: Mathieu Fenniak <mathieu@fenniak.net> Co-committed-by: Mathieu Fenniak <mathieu@fenniak.net> |
||
|---|---|---|
| .. | ||
| artifact.go | ||
| forgejo.go | ||
| forgejo_test.go | ||
| main_test.go | ||
| run.go | ||
| run_job.go | ||
| run_job_list.go | ||
| run_job_status_test.go | ||
| run_job_test.go | ||
| run_list.go | ||
| run_test.go | ||
| runner.go | ||
| runner_list.go | ||
| runner_test.go | ||
| runner_token.go | ||
| runner_token_test.go | ||
| schedule.go | ||
| schedule_spec.go | ||
| schedule_spec_list.go | ||
| schedule_spec_test.go | ||
| status.go | ||
| task.go | ||
| task_list.go | ||
| task_output.go | ||
| task_step.go | ||
| task_test.go | ||
| tasks_version.go | ||
| utils.go | ||
| utils_test.go | ||
| variable.go | ||