Surya Kocherlakota
04/01/2022, 11:22 AMrun_status_sensor
, that keeps failing with GRPC details = "Deadline Exceeded"
errors.
I’m aware that sensors usually have a 60s timeout, so I suspect the cause is that the underlying instance.get_event_records
query takes too long.
I verified that’s the case by running this, and indeed, it takes around 3mins:
import dagster
import time
from dagster import EventRecordsFilter, DagsterEventType
instance = dagster.DagsterInstance.get()
run_failure_records = instance.get_event_records(
EventRecordsFilter(
event_type=DagsterEventType.RUN_FAILURE,
after_timestamp=time.time() - 86400,
),
ascending=False,
limit=1,
)
Am I right that this is likely caused by us having a lot of pipelines or something(?)
Any suggestions on how to make that query faster running (e.g. limiting get_event_records
to only search for records of a specific pipeline)?
Or more generally, how we can get `run_status_sensor`s working again?daniel
04/01/2022, 2:33 PMSurya Kocherlakota
04/01/2022, 2:34 PM0.13.19
@daniel
🙂Surya Kocherlakota
04/01/2022, 2:35 PMafter_cursor
This does the job for now inside a normal sensor, but is a little cumbersome since the run_status_sensor
won’t work out of the box.daniel
04/01/2022, 2:40 PM