Skip to content

Commit

Permalink
1 more ting
Browse files Browse the repository at this point in the history
  • Loading branch information
salazarm committed Dec 20, 2024
1 parent 7262f1e commit 3eee5f6
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions js_modules/dagster-ui/packages/ui-core/src/runs/Run.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export const Run = memo((props: RunProps) => {
<LogsProvider key={runId} runId={runId}>
{(logs) => (
<>
<OnLogsLoaded dependency={logsDependency} />
<OnLogsLoaded dependency={logsDependency} logs={logs} />
<RunMetadataProvider logs={logs}>
{(metadata) => (
<RunWithData
Expand All @@ -128,10 +128,18 @@ export const Run = memo((props: RunProps) => {
);
});

const OnLogsLoaded = ({dependency}: {dependency: ReturnType<typeof useTraceDependency>}) => {
const OnLogsLoaded = ({
dependency,
logs,
}: {
dependency: ReturnType<typeof useTraceDependency>;
logs: LogsProviderLogs;
}) => {
useLayoutEffect(() => {
dependency.completeDependency(CompletionType.SUCCESS);
}, [dependency]);
if (!logs.loading) {
dependency.completeDependency(CompletionType.SUCCESS);
}
}, [dependency, logs]);
return null;
};

Expand Down

0 comments on commit 3eee5f6

Please sign in to comment.