Page MenuHomePhabricator

Fix stats calculation for runs with missing start and end events

Authored by sashank on Dec 20 2019, 6:50 PM.



Previously, the event log for a run did not contain an event for PIPELINE_START or PIPELINE_SUCCESS | PIPELINE_FAILURE, then SqlEventLogStorage.get_stats_for_run would throw an error.

The error would be thrown because we convert start and end datetime object into floats, but in the case these events were missing, we would attempt to convert None.

This diff checks if the times exist, and then pass the datetime to date_time_as_float

Test Plan


Diff Detail

R1 dagster
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

can we write an explicit test for this?

This revision now requires changes to proceed.Dec 20 2019, 7:25 PM

Just added the test in the next diff in the stack ( since that diff parameterizes the tests.

This revision is now accepted and ready to land.Jan 6 2020, 11:00 PM