Skip to content

fix(decision): fix query race condition causing indeterminate data

Ben Whitmore requested to merge control-page-intermittent-crash-20230719 into main

The problem here was a race condition and unsafe loading of data. For the main query we checked if the query had completed and showed a spinner until then. But we had another GET_EMAIL_TEMPLATES query running separately, which could return its results before or after the main query, and we weren't preventing rendering until that query was complete. Instead we were passing down data in an indeterminate state: it could be valid data or undefined. Further down the component hierarchy was a component that expected it to contain valid data and crashed if it didn't.

Merge request reports