v0.0.28¶
New¶
lythonic.compose.dag_provenance: runs record who started them. Set the initiator with theinitiated_by(who)context manager (it sets therun_initiatorcontext variable).DagRunner.runstores it in the newdag_runs.initiated_bycolumn, exposed asDagRun.initiated_byandget_run()["initiated_by"]. Child runs inherit it, including runs started from sync nodes.replayattributes the new run to its caller, andrestartkeeps the original. Scheduled fires recordSCHEDULER("scheduler"). Values are opaque strings chosen by the host.lythonic.compose.trigger:activateanddeactivaterecordchanged_byandchanged_at. They write them when an initiator is set, or when the call changes the trigger's status (with no initiator,changed_bybecomesNULL).lythonic.compose.trigger:TriggerManager.activate_configured()activates every trigger defined in node configs, except those stored asdisabled, and returnsTriggerActivationResult(activated, left_disabled). Call it on every process start, so a deliberatedeactivate()stays in force until an explicitactivate(). It replaces woodglue'sactivate_triggers.TriggerStore.activategainskeep_disabled=Falseand now returnsbool(previouslyNone).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. Existingdag_runsandtrigger_activationstables gain their new columns automatically when they are opened.
Fixes¶
lythonic.compose.trigger: a poll trigger whosepoll_fnreturnedNone, or raised, was called again on every one-second loop tick instead of on its schedule. Everypoll_fncall now recordslast_checked_at, and the schedule counts from it.last_run_atstill moves only on a real fire, so the catch-up-once rule from v0.0.26 is unchanged. Activating adisabledtrigger resetslast_checked_atas 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_initiatorrather than a parameter, so it crosses triggers, namespace wrappers and sub-DAG runs unchanged. Lythonic reserves onlySCHEDULER, and the host owns the rest of the format.
Closed tickets: