Skip to content

Commit

Permalink
[dagit] Don't block viewing PythonError on Playground preview
Browse files Browse the repository at this point in the history
Summary:
When an error occurs in generating the run preview pane on the Dagit playground, we have a PythonError but aren't correctly clearing the loading overlay. Fix this by only showing the overlay when the preview is actually loading. I'm not sure if I introduced this bug recently, but hopefully I'm not overlooking anything here.

Also change the error link to be a proper ButtonLink.

Test Plan: Yield a `SerializableErrorInfo` from `GrpcServerRepositoryLocation.get_subset_external_pipeline_result`, open playground and select a solid. Verify that the error is clickable and not blocked by the loading overlay.

Reviewers: dgibson

Reviewed By: dgibson

Differential Revision: https://dagster.phacility.com/D6435
  • Loading branch information
hellendag authored and David Laing committed Feb 20, 2021
1 parent 4201d43 commit fd74ec7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion js_modules/dagit/src/execute/ExecutionSessionContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ const ExecutionSessionContainer: React.FC<IExecutionSessionContainerProps> = (pr
second={
<>
<LoadingOverlay
isLoading={!runConfigSchema || previewLoading}
isLoading={previewLoading}
message={!runConfigSchema ? LOADING_CONFIG_SCHEMA : LOADING_RUN_PREVIEW}
/>
<RunPreview
Expand Down
7 changes: 4 additions & 3 deletions js_modules/dagit/src/execute/RunPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,10 @@ export class RunPreview extends React.Component<RunPreviewProps, RunPreviewState
errorsAndPaths.push({
pathKey: '',
error: (
<>
PythonError <span onClick={() => showCustomAlert({body: info})}>click for details</span>
</>
<span>
PythonError:{' '}
<ButtonLink onClick={() => showCustomAlert({body: info})}>Click for details</ButtonLink>
</span>
),
});
}
Expand Down

0 comments on commit fd74ec7

Please sign in to comment.