Conversation
fiftin
commented
Mar 31, 2026
- fix(runners): update task status
- fix(runners): remove extra field runnerId from taskrunner
Up to standards ✅🟢 Issues
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ab17c90504
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if jp.Status.IsFinished() { | ||
| logger.TaskInfo("Task removed from running list", jp.ID, string(jp.Status)) | ||
| delete(p.runningJobs, jp.ID) | ||
| } |
There was a problem hiding this comment.
Prevent one-off exit before progress is acknowledged
Because finished jobs are now removed from runningJobs only after a 2xx response, any transient PUT failure leaves completed jobs in memory. In one-off mode, the main loop exits when len(p.runningJobs) > 0 && !p.hasRunningJobs(), so a post-completion 4xx/5xx can make the runner os.Exit(0) before retrying the final status/log upload, which can leave the server-side task stuck in a non-final state. Gate one-off shutdown on a successful progress upload (or keep retrying until acked).
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Summary
- Updated one-off runner shutdown logic to only call
os.Exit(0)whensendProgress()succeeded (ok == true), preventing early exit after transient progress upload failures and allowing retry of final status/log delivery. services/runners/job_pool.goL235-L243 - Created a follow-up commit on the current branch:
80a13dawith this fix. services/runners/job_pool.goL242-L243 - Opened a new PR via the
make_prtool with a title/body describing this change on top of the original PR.
Testing
- ✅
go test ./services/runners/...
…atus-updating fix(runners): gate one-off shutdown on acknowledged progress upload