Skip to content

Commit 16b2ef7

Browse files
authored
Implement infinite depth subgraph execution tracking with dynamic ID resolution and caching (#1005)
## Description Added support for nested pipeline execution monitoring with a new `useCurrentLevelExecutionData` hook that dynamically fetches and tracks execution data across multiple levels of nested subgraphs. This enables users to navigate into deeply nested components while maintaining accurate task status visualization. ## Related Issue and Pull requests ## Type of Change - [x] New feature - [x] Improvement ## Checklist - [x] I have tested this does not break current pipelines / runs functionality - [x] I have tested the changes on staging ## Screenshots (if applicable) ## Test Instructions 1. Run the new nested test pipeline (added in this PR) 2. Navigate through the different levels of nested components 3. Verify that task status is correctly displayed at each level 4. Confirm that execution data is properly cached when navigating between levels ## Additional Comments The new hook replaces the previous static task status mapping with a dynamic approach that: - Tracks the current subgraph path - Determines the correct execution ID for each level - Caches execution data to improve performance when navigating between levels - Updates task status maps based on the current level's execution state
1 parent 35703f0 commit 16b2ef7

File tree

10 files changed

+680
-10
lines changed

10 files changed

+680
-10
lines changed

src/components/PipelineRun/RootExecutionStatusProvider.test.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ describe("<RootExecutionStatusProvider />", () => {
117117
details: undefined,
118118
state: undefined,
119119
},
120+
rootExecutionId: "test-execution-id",
120121
isLoading: true,
121122
error: null,
122123
});
@@ -134,6 +135,7 @@ describe("<RootExecutionStatusProvider />", () => {
134135
details: mockExecutionDetails,
135136
state: mockRunningExecutionState,
136137
},
138+
rootExecutionId: "test-execution-id",
137139
isLoading: false,
138140
error: null,
139141
});
@@ -157,6 +159,7 @@ describe("<RootExecutionStatusProvider />", () => {
157159
details: undefined,
158160
state: undefined,
159161
},
162+
rootExecutionId: "test-execution-id",
160163
isLoading: true,
161164
error: null,
162165
});
@@ -173,6 +176,7 @@ describe("<RootExecutionStatusProvider />", () => {
173176
details: undefined,
174177
state: undefined,
175178
},
179+
rootExecutionId: "test-execution-id",
176180
isLoading: false,
177181
error: mockError,
178182
});
@@ -193,6 +197,7 @@ describe("<RootExecutionStatusProvider />", () => {
193197
details: undefined,
194198
state: undefined,
195199
},
200+
rootExecutionId: "test-execution-id",
196201
isLoading: false,
197202
error: null,
198203
});
@@ -210,6 +215,7 @@ describe("<RootExecutionStatusProvider />", () => {
210215
details: mockExecutionDetails,
211216
state: mockRunningExecutionState,
212217
},
218+
rootExecutionId: "test-execution-id",
213219
isLoading: false,
214220
error: null,
215221
});
@@ -244,6 +250,7 @@ describe("<RootExecutionStatusProvider />", () => {
244250
details: mockExecutionDetails,
245251
state: mockRunningExecutionState,
246252
},
253+
rootExecutionId: "test-execution-id",
247254
isLoading: false,
248255
error: null,
249256
});

src/components/PipelineRun/RunDetails.test.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ describe("<RunDetails/>", () => {
178178
details: mockExecutionDetails,
179179
state: mockRunningExecutionState,
180180
},
181+
rootExecutionId: "test-execution-id",
181182
isLoading: false,
182183
error: null,
183184
});
@@ -199,6 +200,7 @@ describe("<RunDetails/>", () => {
199200
details: mockExecutionDetails,
200201
state: mockRunningExecutionState,
201202
},
203+
rootExecutionId: "test-execution-id",
202204
isLoading: false,
203205
error: null,
204206
});
@@ -220,6 +222,7 @@ describe("<RunDetails/>", () => {
220222
details: mockExecutionDetails,
221223
state: mockRunningExecutionState,
222224
},
225+
rootExecutionId: "test-execution-id",
223226
isLoading: false,
224227
error: null,
225228
});
@@ -241,6 +244,7 @@ describe("<RunDetails/>", () => {
241244
details: mockExecutionDetails,
242245
state: mockRunningExecutionState,
243246
},
247+
rootExecutionId: "test-execution-id",
244248
isLoading: false,
245249
error: null,
246250
});
@@ -260,6 +264,7 @@ describe("<RunDetails/>", () => {
260264
details: mockExecutionDetails,
261265
state: mockCancelledExecutionState,
262266
},
267+
rootExecutionId: "test-execution-id",
263268
isLoading: false,
264269
error: null,
265270
});
@@ -281,6 +286,7 @@ describe("<RunDetails/>", () => {
281286
details: mockExecutionDetails,
282287
state: mockCancelledExecutionState,
283288
},
289+
rootExecutionId: "test-execution-id",
284290
isLoading: false,
285291
error: null,
286292
});
@@ -300,6 +306,7 @@ describe("<RunDetails/>", () => {
300306
details: mockExecutionDetails,
301307
state: mockRunningExecutionState,
302308
},
309+
rootExecutionId: "test-execution-id",
303310
isLoading: false,
304311
error: null,
305312
});

src/components/shared/ReactFlow/FlowCanvas/FlowCanvas.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,6 @@ const FlowCanvas = ({
871871
return (
872872
<BlockStack gap="0" className="h-full w-full">
873873
<SubgraphBreadcrumbs />
874-
875874
<ReactFlow
876875
{...rest}
877876
nodes={allNodes}

src/components/shared/ReactFlow/FlowCanvas/TaskNode/TaskConfiguration/TaskConfiguration.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const TaskConfiguration = ({ taskNode, actions }: TaskConfigurationProps) => {
5050
return null;
5151
}
5252

53-
const executionId = taskSpec.annotations?.executionId as string | undefined;
53+
const executionId = taskSpec.annotations?.executionId as string;
5454

5555
return (
5656
<div

src/components/shared/ReactFlow/FlowSidebar/FlowSidebar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const FlowSidebar = () => {
2222
const requiresAuthorization = isAuthorizationRequired();
2323

2424
const sidebarTriggerClasses = cn(
25-
"absolute top-[65px] z-1 transition-all duration-300 bg-white rounded-r-md shadow-md p-0.5 pr-1",
25+
"absolute top-[65px] z-1 transition-all duration-300 bg-white mt-8 rounded-r-md shadow-md p-0.5 pr-1",
2626
isOpen ? "left-[255px]" : "left-[47px]",
2727
);
2828

0 commit comments

Comments
 (0)