mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-05-12 22:10:25 +00:00
Attempt to fix intermittent test failure noted in #10633, detailed technical notes in https://codeberg.org/forgejo/forgejo/issues/10633#issuecomment-9571199. - Failure to cancel the previous processes is now a test error that aborts immediately, preventing 2hr long test runs that won't succeed. - When the process cancellation fails, the stack trace of all goroutines is printed to help diagnose the cause of any failure to cancel tasks. - `context.Background()` referenced in the actions notifier is corrected when opening git repos, which seems to be a cause of failure to cancel the tasks -- git subprocesses are spawned from the repo context, which is the background context, and that prevents the context registered in the process manager from cancelling them. ## 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. - [ ] 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/10713 Reviewed-by: Michael Kriese <michael.kriese@gmx.de> Reviewed-by: Gusted <gusted@noreply.codeberg.org> Co-authored-by: Mathieu Fenniak <mathieu@fenniak.net> Co-committed-by: Mathieu Fenniak <mathieu@fenniak.net> |
||
|---|---|---|
| .. | ||
| Test_tryHandleIncompleteMatrix | ||
| Test_tryHandleWorkflowCallOuterJob | ||
| TestActions_CancelOrApproveRun | ||
| TestActions_consistencyCheckRun | ||
| TestActionsNotifier_IsTrusted | ||
| TestActionsTrust_GetPullRequestUserIsTrustedWithActions | ||
| TestCancelPreviousJobs | ||
| TestCancelPreviousWithConcurrencyGroup | ||
| TestCreateCommitStatus | ||
| TestExpandLocalReusableWorkflows | ||
| TestGetSecretsOfJob | ||
| TestServiceActions_startTask | ||
| TestServicesActions_TransferLingeringLogs | ||
| auth.go | ||
| auth_test.go | ||
| cleanup.go | ||
| cleanup_test.go | ||
| clear_tasks.go | ||
| commit_status.go | ||
| commit_status_test.go | ||
| context.go | ||
| context_test.go | ||
| init.go | ||
| interface.go | ||
| job_emitter.go | ||
| job_emitter_test.go | ||
| log.go | ||
| log_test.go | ||
| main_test.go | ||
| notifier.go | ||
| notifier_helper.go | ||
| notifier_helper_test.go | ||
| rerun.go | ||
| rerun_test.go | ||
| reusable_workflows.go | ||
| reusable_workflows_test.go | ||
| run.go | ||
| run_test.go | ||
| schedule_tasks.go | ||
| schedule_tasks_test.go | ||
| secret.go | ||
| secret_test.go | ||
| task.go | ||
| trust.go | ||
| trust_test.go | ||
| variables.go | ||
| variables_test.go | ||
| workflows.go | ||
| workflows_test.go | ||