HomeElementl

[dagit] Prompt to refresh config when repo is refreshed

Description

[dagit] Prompt to refresh config when repo is refreshed

Summary:
When the user reloads their current repository in Dagit, any open playground configurations based on presets or partition sets might now be out of date, even if they don't have any errors. Launching runs using those outdated configs can then result in undesired and confusing output.

This change introduces a warning to give the user an opportunity to reload their configuration. When the repository is reloaded, a message above any preset/partition-based configs appears, indicating that the config may be outdated. Clicking a Refresh config button regenerates the configuration. There is also a "Dismiss" button for those who don't want to respond to the warning.

Sessions that should show this warning are given needsRefresh: true in the session object tracked in localStorage.

In order to make this change, I did a little refactoring to move the config session "save" behavior up a level in the component tree. I also added a function that applies needsRefresh: true across all sessions for pipelines in the reloaded repository, as they are all affected by the reload.

Test Plan:
Open the playground for a pipeline, create config tabs based on presets and partition sets. Reload the repository, verify that the warning message appears for all affected config sessions.

Click "Refresh config", verify that the config is regenerated. Alternatively, click "Dismiss" and verify that the warning goes away.

Reviewers: catherinewu, sashank, bengotow

Reviewed By: bengotow

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

Details

Provenance
dishAuthored on Jan 22 2021, 2:34 PM
Reviewer
bengotow
Differential Revision
D6152: [dagit] Prompt to refresh config when repo is refreshed
Parents
R1:b6c5503d95c4: [dagit] Clean up excess spinners on Runs page
Branches
Unknown
Tags
Unknown