buzz icon indicating copy to clipboard operation
buzz copied to clipboard

fix(workflows): tolerate delayed cron ticks

Open tkors opened this issue 4 months ago • 3 comments

Summary

  • run scheduler ticks on a fixed 60-second cadence so workflow scan time does not accumulate as drift
  • use a bounded 120-second cron lookback and select the latest due scheduled instant
  • preserve the durable scheduled-fire claim as the at-most-once boundary across overlapping ticks and relay pods

Why

A scheduler tick arriving just over one minute late could miss a minute-granularity cron fire entirely. The overlap tolerates modest delay without repeatedly selecting the prior minute.

Test plan

  • cargo test -p buzz-workflow — 155 passed, 0 failed, 2 ignored (Postgres-required)
  • added coverage for a tick just over one minute late, newest-due selection, and bounded non-replay

Rollout

After merge, the normal upstream main image build provides immutable sha-* and rolling main images. Deployment to the hosted Dogfluence community relay remains an operator-controlled step.

tkors avatar Jul 31 '26 09:07 tkors

CI and Docker image workflow runs are awaiting maintainer approval because this PR originates from a new fork (action_required, no jobs started). Could a maintainer approve the two runs?

Local verification: cargo test -p buzz-workflow — 155 passed, 0 failed, 2 Postgres-required tests ignored.

tkors avatar Jul 31 '26 09:07 tkors

delayed cron tolerance helps. what's the max skew you accept before a tick is dropped as stale?

chessing234 avatar Jul 31 '26 10:07 chessing234

this wuld be very useful!

ziggygram avatar Aug 03 '26 21:08 ziggygram