Repository navigation
v0.10.2
·
271 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
Upgrading from 0.10.1
- Under
AshWorkflow.Scheduler.Oban, an action that moves a record into an automatic step now inserts an Oban job. A test that runs such an action needs a repo connection checked out, even when the workflow resource uses the ETS data layer. With Oban'stesting: :inline, the step's action now runs inside the action that moved the record. - A
run_oban_trigger/1change that queued an automatic step after a create or a transition is no longer needed. Leaving it in place queues no second job, because ash_oban's trigger worker is unique while a job is incomplete.
Added
- A Workflows lens for Clarity. With Clarity installed,
AshWorkflow.Clarity.Lensmakeradds a Workflows lens that lists each workflow resource with its steps.AshWorkflow.Clarity.Introspectoradds anAshWorkflow.Clarity.Vertex.Stepfor each step. A workflow resource gets Workflow Overview, Workflow Diagram and Workflow Timing tabs, and a step gets Step Overview, Step Diagram and Step Timeline tabs. The timing tabs place each automatic action, retry attempt, timeout,everyfiring and undo window at its offset from entering the step, and say how long a record can stay in each step. Clarity is an optional dependency, so a project without it compiles none of these modules. - An
:actoroption forAshWorkflow.Scheduler.Oban. The value becomes each generated trigger'sdefault_actor. A cron-fired scheduler has no caller and read with anilactor, so on a resource whose read policy needs an actor it matched no rows and the workflow never advanced. Withscheduler {AshWorkflow.Scheduler.Oban, actor: ...}the scheduler reads as that actor, and the worker runs the step's or timeout's action as it when the job stored no actor. See issue #150.
Fixed
AshWorkflow.Scheduler.Obanruns an automatic step as soon as a record enters it, asAshWorkflow.Scheduler.Precisealready did. Before, the record waited for the trigger's nextcheck_interval, becauseAshWorkflow.Scheduler.notify_state_change/1called onlydeadline_changed/2andcancel/2, and the Oban scheduler implements neither.notify_state_change/2now also calls the new optionalAshWorkflow.Scheduler.step_entered/2callback whenAshWorkflow.Changes.RecordEventreports that the record entered its step.AshWorkflow.Scheduler.Oban.step_entered/2queues the step's trigger withAshOban.run_trigger/3. A step whose action routes the record back into the same step does not count as entering it, so that record still waits for the poll. An action timeout and aneverydo not count either. The queued job carries no actor, the same as a job the poll queues. A transition declared directly in thestate_machineblock does not runRecordEvent, so a record it moves into an automatic step still waits for the poll.AshWorkflow.Scheduler.Precisearms a timeout whosefire_atorfieldnames an expression calculation as soon as a record enters the step.AshWorkflow.Scheduler.notify_state_change/1handeddeadline_changed/2the record without that calculation loaded, soAshWorkflow.Scheduler.due_at/2returnednil, no timer was armed, and only the recovery sweep caught the deadline, up tolook_ahead_mslate.notify_state_change/1now loads the calculations returned by the newAshWorkflow.Scheduler.Work.deadline_loads/1before callingdeadline_changed/2.AshWorkflow.Scheduler.Obanwas not affected, because its trigger evaluates the calculation in thewhereclause.
Security
- The development lock now resolves
ash3.37.2,ash_postgres2.15.2 andplug_crypto2.2.1, which fix the advisoriesmix hex.auditreported againstash3.34.6 (EEF-CVE-2026-96581, EEF-CVE-2026-114214),ash_postgres2.13.1 (EEF-CVE-2026-115627, EEF-CVE-2026-115635) andplug_crypto2.2.0 (EEF-CVE-2026-105963). Theash ~> 3.0requirement inmix.exsis unchanged, so applications pick their own versions. Upgrade them in your own lock to get the fixes.