Page MenuHomeElementl

[dagit] Debounce Websocket disconnection updates

Authored by dish on Mar 29 2021, 4:16 PM.



We currently have a bug where the websocket is disconnecting too often. We immediately update Dagit to inform the user, which is a little bit thrashy since the websocket immediately reconnects.

To sidestep this while we figure out what's going on on the backend, debounce the websocket updates in JS for five seconds. This should give the websocket enough time to reconnect without alarming the user.

Test Plan

Load dagit, view a run. Kill the dagit backend, verify that the browser console starts spewing connection errors but that the Gantt chart does not show a warning. Verify that the warning does appear after five seconds. Restart dagit backend, verify that the warning goes away after five seconds.

Reload dagit. Kill backend, verify console spew. Immediately restart dagit, verify that console spew stops, and that the disconnection warning never appears on the Gantt chart at all.

Diff Detail

R1 dagster
Lint Not Applicable
Tests Not Applicable