mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-24 06:29:56 +00:00
51e42d4b11
When a repository is deleted while one of its Actions runs still has a pending job update in the emitter queue, `checkJobsByRunID` returns an error because the run no longer exists. The queue handler in `jobEmitterQueueHandler` treats every error as unhandled and requeues the item, creating an infinite retry loop that fills the log with error messages. ### Changes 1. **`services/actions/job_emitter.go`** — swap the `!exist`/`err` check order so a database error is reported first, then treat a non-existent run as handled (nil error). The queue consumer drops the item instead of requeueing it. 2. **`services/actions/job_emitter_test.go`** — add `Test_checkJobsByRunID_DeletedRunIsHandled`, which verifies that a deleted run produces nil (handled, not requeued). ### Related issue Fixes #39034 --------- Co-authored-by: bircni <bircni@icloud.com>