Skip to content

v0.0.28

New

  • lythonic.compose.dag_provenance: runs record who started them. Set the initiator with the initiated_by(who) context manager (it sets the run_initiator context variable). DagRunner.run stores it in the new dag_runs.initiated_by column, exposed as DagRun.initiated_by and get_run()["initiated_by"]. Child runs inherit it, including runs started from sync nodes. replay attributes the new run to its caller, and restart keeps the original. Scheduled fires record SCHEDULER ("scheduler"). Values are opaque strings chosen by the host.
  • lythonic.compose.trigger: activate and deactivate record changed_by and changed_at. They write them when an initiator is set, or when the call changes the trigger's status (with no initiator, changed_by becomes NULL).
  • lythonic.compose.trigger: TriggerManager.activate_configured() activates every trigger defined in node configs, except those stored as disabled, and returns TriggerActivationResult(activated, left_disabled). Call it on every process start, so a deliberate deactivate() stays in force until an explicit activate(). It replaces woodglue's activate_triggers. TriggerStore.activate gains keep_disabled=False and now returns bool (previously None).
  • lythonic.compose.namespace: Namespace.triggers() lists (node, trigger_config) pairs.
  • lythonic.state: add_missing_column() adds a column to a table created by an older version. Existing dag_runs and trigger_activations tables gain their new columns automatically when they are opened.

Fixes

  • lythonic.compose.trigger: a poll trigger whose poll_fn returned None, or raised, was called again on every one-second loop tick instead of on its schedule. Every poll_fn call now records last_checked_at, and the schedule counts from it. last_run_at still moves only on a real fire, so the catch-up-once rule from v0.0.26 is unchanged. Activating a disabled trigger resets last_checked_at as well, so the checks missed during a pause are not caught up.

Documentation

  • The scheduled-triggers tutorial now uses activate_configured() on start, and gains a "Who Started a Run" section and a note on empty poll checks.
  • The glossary defines "Initiator".

Decisions and tickets

New ADRs:

  • 0006 Run initiator is a context variable. Attribution passes through run_initiator rather than a parameter, so it crosses triggers, namespace wrappers and sub-DAG runs unchanged. Lythonic reserves only SCHEDULER, and the host owns the rest of the format.

Closed tickets:

  • 13 Triggers: poll_fn returning None is re-polled every loop tick instead of on schedule

  • 14 Record who started each DAG run and who changed each trigger

  • 15 Triggers: keep deactivated triggers disabled across restarts (move woodglue's activate_triggers into lythonic)