forgejo/routers/api
Mathieu Fenniak 6bac9e29e7 Revert "fix: ensure actions logs are transferred when a task is done (#10008)" (#11462)
This reverts commit d4951968f0, #10008.

When Forgejo cancels a job server-side, for example due to an additional push to an open PR, it immediately archives the logs from DBFS to disk due to the changes in #10008.  Then, the runner recognizes that the job status is cancelled and it attempts to flush its pending logs to Forgejo, resulting in warnings being logged:

```
forgejo-runner.log:time="2026-02-23T01:32:11+01:00" level=warning msg="uploading final logs failed, but will be retried: already_exists: log file has been archived" task_id=51
forgejo-runner.log:time="2026-02-23T01:32:11+01:00" level=warning msg="uploading final logs failed, but will be retried: already_exists: log file has been archived" task_id=51
forgejo-runner.log:time="2026-02-23T01:32:11+01:00" level=warning msg="uploading final logs failed, but will be retried: already_exists: log file has been archived" task_id=51
forgejo-runner.log:time="2026-02-23T01:32:12+01:00" level=warning msg="uploading final logs failed, but will be retried: already_exists: log file has been archived" task_id=51
forgejo-runner.log:time="2026-02-23T01:32:13+01:00" level=warning msg="uploading final logs failed, but will be retried: already_exists: log file has been archived" task_id=51
forgejo-runner.log:time="2026-02-23T01:32:14+01:00" level=warning msg="uploading final logs failed, but will be retried: already_exists: log file has been archived" task_id=51
forgejo-runner.log:time="2026-02-23T01:32:16+01:00" level=info msg="runner: received shutdown signal"
forgejo-runner.log:time="2026-02-23T01:32:16+01:00" level=info msg="runner: shutdown initiated, waiting [runner].shutdown_timeout=0s for running jobs to complete before shutting down"
forgejo-runner.log:time="2026-02-23T01:32:16+01:00" level=info msg="[poller] shutdown begin, 1 tasks currently running"
forgejo-runner.log:time="2026-02-23T01:32:16+01:00" level=info msg="forcing the jobs to shutdown"
forgejo-runner.log:time="2026-02-23T01:32:18+01:00" level=warning msg="uploading final logs failed, but will be retried: already_exists: log file has been archived" task_id=51
forgejo-runner.log:time="2026-02-23T01:32:24+01:00" level=warning msg="uploading final logs failed, but will be retried: already_exists: log file has been archived" task_id=51
```

This appears to be the cause of the `push-cancel` end-to-end test failing since #10008 was merged.  https://code.forgejo.org/forgejo/end-to-end/actions/runs/4985/jobs/8/attempt/1   The `push-cancel` test case itself seems to succeed, but then the test process aborts with `return 1`.  Doesn't reproduce locally.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/11462
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Mathieu Fenniak <mathieu@fenniak.net>
Co-committed-by: Mathieu Fenniak <mathieu@fenniak.net>
2026-03-02 15:34:09 +01:00
..
actions Revert "fix: ensure actions logs are transferred when a task is done (#10008)" (#11462) 2026-03-02 15:34:09 +01:00
forgejo/v1 fix: /api/forgejo/v1/version Content-Type error (#9897) 2025-11-05 17:35:50 +01:00
packages fix: return bad request on malformed packages upload input (#10954) 2026-02-13 18:04:19 +01:00
shared feat: add APIContext.Reducer computed from access token 2026-02-27 17:17:29 +01:00
v1 feat: implement fine-grained access tokens in /repos/issues/search 2026-03-01 10:54:43 -07:00