dagster
dagster copied to clipboard
[1.9] Update evaluation id logic to be in sync with tick ids
Summary & Motivation
When running in user-code mode, evaluation ids are always based off of the tick id. This prevents us from having to deserialize the AssetDaemonCursor server side, and just in general is an easier way of producing monotonically increasing integers across multiple values.
In general, the tick id is guaranteed to be strictly larger than the AssetDaemonCursor value, as the daemon cursor (unless manually edited) cannot increase without a new tick being created. This means that it is safe to switch from daemon-mode to user-mode, but if you switch from user-mode back to daemon-mode, you could end up with an evaluation id that was much smaller, with the end result being that new evaluation records you produce would have a lower evaluation_id than older ones, messing up the history.
This change makes it so that the daemon-mode id will stay in sync with the tick id, avoiding this issue.
How I Tested These Changes
Existing tests, with some small updates.
Changelog
NOCHANGELOG