Page MenuHomePhabricator

Fix GraphQL error when switching between pipelines with different modes
ClosedPublic

Authored by bengotow on Sep 27 2019, 3:19 PM.

Details

Summary

The error toasts that appeared when you switched pipelines in the execute tab were caused by the local storage provider, which was vending data for the wrong pipeline for one render cycle because it was keeping it's own state in sync with a useEffect (componentDidUpdate) hook.

Test Plan

Run and see no errors!

Diff Detail

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

Event Timeline

bengotow created this revision.Sep 27 2019, 3:19 PM
alangenfeld accepted this revision.Sep 27 2019, 4:12 PM
alangenfeld added a subscriber: alangenfeld.
alangenfeld added inline comments.
js_modules/dagit/src/LocalStorage.tsx
104

more descriptive name - dont really undestand what this is

This revision is now accepted and ready to land.Sep 27 2019, 4:12 PM

does this also work for renaming modes on the same pipeline? make sure to test that too

No - renaming modes will be a separate fix, working on that one now!
Will put a better name on _open

bengotow updated this revision to Diff 5100.Sep 27 2019, 6:24 PM

Rename _open => _data

This revision was landed with ongoing or failed builds.Sep 27 2019, 6:25 PM
This revision was automatically updated to reflect the committed changes.