HomePhabricator

Fix stats calculation for runs with missing start and end events

Description

Fix stats calculation for runs with missing start and end events

Summary:
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: unit

Reviewers: max, schrockn, alangenfeld

Reviewed By: alangenfeld

Differential Revision: https://dagster.phacility.com/D1726

Details

Provenance
sashankAuthored on Dec 20 2019, 6:45 PM
Reviewer
alangenfeld
Differential Revision
D1726: Fix stats calculation for runs with missing start and end events
Parents
R1:d6071f988b35: Add wrapper for Python enums in Dagster configs. (#2046)
Branches
Unknown
Tags
Unknown