Skip to content

fix/status updating#3737

Merged
fiftin merged 6 commits intodevelopfrom
fix/status_updating
Mar 31, 2026
Merged

fix/status updating#3737
fiftin merged 6 commits intodevelopfrom
fix/status_updating

Conversation

@fiftin
Copy link
Copy Markdown
Collaborator

@fiftin fiftin commented Mar 31, 2026

  • fix(runners): update task status
  • fix(runners): remove extra field runnerId from taskrunner

@codacy-production
Copy link
Copy Markdown

codacy-production bot commented Mar 31, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

TIP This summary will be updated as you push new changes. Give us feedback

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +317 to +320
if jp.Status.IsFinished() {
logger.TaskInfo("Task removed from running list", jp.ID, string(jp.Status))
delete(p.runningJobs, jp.ID)
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@codex fix it

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

  • Updated one-off runner shutdown logic to only call os.Exit(0) when sendProgress() 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: 80a13da with this fix. services/runners/job_pool.goL242-L243
  • Opened a new PR via the make_pr tool with a title/body describing this change on top of the original PR.

Testing

  • go test ./services/runners/...

View task →

@fiftin fiftin merged commit 105a402 into develop Mar 31, 2026
7 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant