A restored node whose source run is gone says its curve was lost
The run detail works out curve_lost per node when read, from whether its cached_from run still exists. The run page names the deleted run in place of the generic NO_CURVE note.
This commit is contained in:
@@ -22,10 +22,10 @@ import { MetricPicker, RunMetricChart, useMetricNames } from "./MetricChart"
|
||||
import { OpenInDashboard } from "./OpenInDashboard"
|
||||
import {
|
||||
CARD,
|
||||
curveLost,
|
||||
downloadArtifact,
|
||||
FLOW_GONE,
|
||||
isLive,
|
||||
NO_CURVE,
|
||||
paramText,
|
||||
runQueryOptions,
|
||||
shortCommit,
|
||||
@@ -53,10 +53,9 @@ export function RunDetail({ id }: { id: string }) {
|
||||
const nodes = run.nodes ?? []
|
||||
const artifacts = run.artifacts ?? []
|
||||
const reason = statusReason(run)
|
||||
// A restored node's curve comes from the run it was restored from, so an
|
||||
// empty chart here means that run is gone rather than that this one failed.
|
||||
// Said once, where it applies.
|
||||
const cached = nodes.some((node) => node.status === "cached")
|
||||
// A restored node's curve comes from the run it was restored from, so it
|
||||
// goes when that run is deleted. Said once, where it applies.
|
||||
const lost = nodes.filter((node) => node.curve_lost)
|
||||
|
||||
// What the flow declared when this run was submitted. A run from before
|
||||
// that was kept reads against the flow's current declarations.
|
||||
@@ -206,8 +205,10 @@ export function RunDetail({ id }: { id: string }) {
|
||||
</section>
|
||||
)}
|
||||
|
||||
{names.length === 0 && cached && (
|
||||
<p className={cn(CARD, "text-muted-foreground text-sm")}>{NO_CURVE}</p>
|
||||
{lost.length > 0 && (
|
||||
<p className={cn(CARD, "text-muted-foreground text-sm")}>
|
||||
{curveLost(lost)}
|
||||
</p>
|
||||
)}
|
||||
|
||||
{Object.keys(run.result ?? {}).length > 0 && (
|
||||
|
||||
Reference in New Issue
Block a user