diff --git a/js_modules/dagster-ui/packages/ui-core/src/runs/Run.tsx b/js_modules/dagster-ui/packages/ui-core/src/runs/Run.tsx index fde9c0f26bd65..4fd391633cf5c 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/runs/Run.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/runs/Run.tsx @@ -105,7 +105,7 @@ export const Run = memo((props: RunProps) => { {(logs) => ( <> - + {(metadata) => ( { ); }); -const OnLogsLoaded = ({dependency}: {dependency: ReturnType}) => { +const OnLogsLoaded = ({ + dependency, + logs, +}: { + dependency: ReturnType; + logs: LogsProviderLogs; +}) => { useLayoutEffect(() => { - dependency.completeDependency(CompletionType.SUCCESS); - }, [dependency]); + if (!logs.loading) { + dependency.completeDependency(CompletionType.SUCCESS); + } + }, [dependency, logs]); return null; };