Skip to content

Conversation

@zzstoatzz
Copy link
Collaborator

Summary

Converts the MarkLateRuns LoopService class to docket perpetual functions, following the same pattern established in #19715 and #19719.

  • Replaces MarkLateRuns LoopService with monitor_late_runs perpetual function
  • Uses find-and-flood pattern: monitor finds late runs and schedules mark_flow_run_late tasks via docket
  • Enables horizontal scaling of late run marking across multiple workers

Changes

  • late_runs.py: Convert from LoopService to docket perpetual function
  • background_workers.py: Register mark_flow_run_late task function
  • base.py: Remove late_runs from service modules
  • test_late_runs.py: Update tests to test task functions directly
  • test_perpetual_services.py: Add test for monitor_late_runs registration
  • test_service_subsets.py: Remove MarkLateRuns from service subset assertions

Test plan

  • All late_runs tests pass (6 tests)
  • perpetual_services tests pass (7 tests)
  • service_subsets tests pass (3 tests)
  • Type checking passes

🤖 Generated with Claude Code

- Replace MarkLateRuns LoopService class with docket perpetual function
- Use find-and-flood pattern: monitor_late_runs finds late runs
  and schedules mark_flow_run_late tasks via docket
- Register mark_flow_run_late task function in background_workers.py
- Remove MarkLateRuns from base.py service modules
- Update tests to test docket task functions directly

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@github-actions github-actions bot added the enhancement An improvement of an existing feature label Dec 10, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Dec 10, 2025

CodSpeed Performance Report

Merging #19722 will not alter performance

Comparing docket-late-runs (f2e57a0) with main (5c5d511)

Summary

✅ 2 untouched

@zzstoatzz zzstoatzz marked this pull request as ready for review December 11, 2025 16:21
Copy link
Member

@desertaxle desertaxle left a comment

Choose a reason for hiding this comment

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

LGTM!

@zzstoatzz zzstoatzz merged commit 8d7168b into main Dec 11, 2025
92 of 93 checks passed
@zzstoatzz zzstoatzz deleted the docket-late-runs branch December 11, 2025 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement An improvement of an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants