Skip to content

Commit

Permalink
[dagit] Fix config refresh when reloading repo (#7325)
Browse files Browse the repository at this point in the history
## Summary

Resolves #6312.

When setting config editor sessions for jobs with preset configs, we aren't currently setting the preset as the "base" of the session. This means that when the repository is reloaded, we don't notice that the session's config may need to be refreshed as well, so we never prompt the user.

To fix this, set the preset in the session `base`.

## Test Plan

Follow repro steps in attached issue. Verify that when I modify the job config and reload the repository in Dagit, I am prompted to refresh the config. Verify that refreshing the config works properly.
  • Loading branch information
hellendag committed Apr 6, 2022
1 parent 0692f86 commit f7f2b0f
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,10 @@ const LaunchpadSessionContainer: React.FC<LaunchpadSessionContainerProps> = (pro
const partitionSetsForMode = partitionSets.results;

if (presetsForMode.length === 1 && partitionSetsForMode.length === 0) {
return {runConfigYaml: presetsForMode[0].runConfigYaml};
return {
base: {presetName: presetsForMode[0].name, tags: null},
runConfigYaml: presetsForMode[0].runConfigYaml,
};
}

if (!presetsForMode.length && partitionSetsForMode.length === 1) {
Expand Down

0 comments on commit f7f2b0f

Please sign in to comment.