fix: replace tick-based SinceCondition with storage-id comparison#3422
fix: replace tick-based SinceCondition with storage-id comparison#3422
Conversation
… dep updates SinceCondition's tick-based state machine silently swallows dep updates when both any_deps_updated (trigger) and newly_updated (reset) fire in the same evaluation tick — the reset unconditionally wins regardless of wall-clock ordering. This was observed in production when an upstream asset materialized after the downstream's run completed but within the same tick window. Introduces AnyDepsUpdatedSinceSelf, a custom SubsetAutomationCondition that compares monotonically-increasing storage_ids instead of relying on tick boundaries. Also supports will_be_requested() semantics for same-tick chain propagation and view lookthrough with diamond-DAG protection. Removes the now-dead _build_any_ancestor_updated function whose functionality is subsumed by the new condition's _gather_dep_keys recursion. Ref: dagster-io/dagster#33587 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Claude finished @cbini's task in 2m 11s —— View job Code Review
Overall AssessmentThis is a well-reasoned fix for a real production bug. The storage-id comparison approach correctly sidesteps the tick-collision issue in
|
Summary
SinceConditionsilently swallows dep updates when bothany_deps_updated(trigger) andnewly_updated(reset) fire within the same evaluation tick — the reset unconditionally wins regardless of wall-clock ordering (SinceCondition discards trigger events when trigger and reset both fire in the same evaluation tick dagster-io/dagster#33587)AnyDepsUpdatedSinceSelf, a customSubsetAutomationConditionthat compares monotonically-increasingstorage_ids instead of relying on tick boundaries, with view lookthrough and diamond-DAG protection_build_any_ancestor_updatedfunction whose functionality is subsumed by the new conditionTest plan
test_table_requested_when_dep_updates_between_request_and_completionconfirms the fixuv run pytest tests/test_automation_conditions.py -v)🤖 Generated with Claude Code