Skip to content

worker: make drain deadlines explicit#252

Merged
PaulFidika merged 1 commit into
masterfrom
agent/nonexpiring-drain
Jul 14, 2026
Merged

worker: make drain deadlines explicit#252
PaulFidika merged 1 commit into
masterfrom
agent/nonexpiring-drain

Conversation

@PaulFidika

Copy link
Copy Markdown
Contributor

Summary

  • make Drain(0) truly non-expiring while results are in flight or waiting to reconnect
  • treat a positive deadline as one total monotonic budget beginning when Drain is received
  • stop admission synchronously before a back-to-back RunJob can enter
  • close abruptly, rather than claiming a clean flush, when a positive deadline expires with results pending
  • preserve authentication, protocol, HelloAck, and ordinary non-drain disconnect deadlines

Validation

  • 22 focused lifecycle and real gRPC tests passed
  • Ruff passed for all changed Python files
  • Mypy passed for changed source and the new test module
  • HTTP-timeout structural lint passed
  • git diff check passed

The focused test run used the existing uv-managed development environment with --no-sync. A fresh frozen sync is currently blocked by the pre-existing torch 2.13.0+cu130 lock hash mismatch; this PR does not change dependencies or the lockfile.

@PaulFidika PaulFidika marked this pull request as ready for review July 14, 2026 08:09
@PaulFidika PaulFidika merged commit cc99d48 into master Jul 14, 2026
1 check passed
@PaulFidika PaulFidika deleted the agent/nonexpiring-drain branch July 14, 2026 09:05
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