-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[historical-runs 3/n] Make runs obey event log entry timestamp #29382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dpeng817/add_history_import_run_method
Are you sure you want to change the base?
[historical-runs 3/n] Make runs obey event log entry timestamp #29382
Conversation
f03f254
to
90135e9
Compare
16ce37e
to
558fac0
Compare
90135e9
to
3dfbac9
Compare
558fac0
to
18ec729
Compare
Worth getting more eyes on this. This changes the run start/end to be in terms of the event timestamps rather than by the time that the instance handles the event. |
Is the |
@shalabhc the intended use case is for that to come from the event log entry - so not quite user provided but may be calculated by user code. We'll likely fork implementations outside of OSS to maintain a cleaner user code vs db layer but this seems reasonable for OSS |
3dfbac9
to
4b3b452
Compare
18ec729
to
e2cf599
Compare
4b3b452
to
103f752
Compare
e2cf599
to
dcd8450
Compare
103f752
to
4503c8c
Compare
dcd8450
to
ad88867
Compare
4503c8c
to
1a5d483
Compare
ad88867
to
1042d1d
Compare
1a5d483
to
850a289
Compare
1042d1d
to
f6b9f49
Compare
850a289
to
4433fb7
Compare
f6b9f49
to
2923b33
Compare
4433fb7
to
1df7391
Compare
2923b33
to
6125bf2
Compare
1df7391
to
0e8e74e
Compare
6125bf2
to
ad57047
Compare
0e8e74e
to
49297e7
Compare
ad57047
to
c33f358
Compare
49297e7
to
6cc9aa6
Compare
c33f358
to
9417cf2
Compare
6cc9aa6
to
a89a412
Compare
9417cf2
to
813d40f
Compare
a89a412
to
101bdca
Compare
813d40f
to
2a1333e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this is probably fine
# consider changing the `handle_run_event` signature to get timestamp off of the | ||
# EventLogEntry instead of the DagsterEvent, for consistency |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the fact this comment was already here i think helps this changes case
def handle_run_event( | ||
self, run_id: str, event: DagsterEvent, update_timestamp: Optional[datetime] = None | ||
) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will have to update the ABC
theoretically could break custom run storages, not sure how much to worry about that
# consider changing the `handle_run_event` signature to get timestamp off of the | ||
# EventLogEntry instead of the DagsterEvent, for consistency | ||
now = get_current_datetime() | ||
update_timestamp = update_timestamp or get_current_datetime() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comments here or below to clarify what "update_timestamp" means to us ie not when the db row was last touched but the time of the latest event to change the status of the run
101bdca
to
3deac73
Compare
2a1333e
to
7e32499
Compare
3deac73
to
aa14550
Compare
7e32499
to
e30a5d8
Compare
aa14550
to
cc1adfe
Compare
e30a5d8
to
bafa107
Compare
cc1adfe
to
eae751a
Compare
bafa107
to
560b46c
Compare
Summary & Motivation
How I Tested These Changes
Changelog