Skip to content

worker: fix an edge case where a run can be lost between claim and st…#1112

Merged
josephjclark merged 2 commits intorelease/nextfrom
lost-run-on-claim
Nov 3, 2025
Merged

worker: fix an edge case where a run can be lost between claim and st…#1112
josephjclark merged 2 commits intorelease/nextfrom
lost-run-on-claim

Conversation

@josephjclark
Copy link
Copy Markdown
Collaborator

Ensure that when destroying a server, any active claims will be properly processed before shutdown. There's an edge case in #910 where claim finishes but the run doesn't actually start.

Silly error really - an async function in an each() loop is not async!

This was passing in unit tests because JWT verification was disabled and so destroy was running synchronously. It's the async await that does the harm.

Short Description

A one or two-sentence description of what this PR does.

Fixes #910

AI Usage

Please disclose how you've used AI in this work (it's cool, we just want to know!):

  • Code generation (copilot but not intellisense)
  • Learning or fact checking
  • Strategy / design
  • Optimisation / refactoring
  • Translation / spellchecking / doc gen
  • Other
  • I have not used AI

You can read more details in our Responsible AI Policy

@github-project-automation github-project-automation bot moved this to New Issues in Core Nov 3, 2025
@josephjclark josephjclark changed the base branch from main to release/next November 3, 2025 13:54
@josephjclark josephjclark merged commit 836433d into release/next Nov 3, 2025
6 checks passed
@josephjclark josephjclark deleted the lost-run-on-claim branch November 3, 2025 13:55
@github-project-automation github-project-automation bot moved this from New Issues to Done in Core Nov 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Worker: Can runs be lost between Claim and Start

2 participants