Skip to content

Commit 7987e44

Browse files
authored
replace useFetchExecutionInfo with optimized usePipelineRunData (#1095)
## Description Refactored the pipeline run data fetching mechanism by replacing the `RootExecutionStatusProvider` implementation with the `usePipelineRunData` hook. This change improves data fetching by: 1. Renaming `rootExecutionId` to `pipelineRunId` throughout the codebase for better clarity 2. Removing the custom polling logic in favor of React Query's built-in refetch capabilities 3. Simplifying the execution data fetching process with more efficient caching ## Type of Change - [x] Improvement - [x] Cleanup/Refactor ## Checklist - [x] I have tested this does not break current pipelines / runs functionality - [ ] I have tested the changes on staging ## Test Instructions 1. Navigate to a pipeline run page 2. Verify that execution data loads correctly 3. For running pipelines, verify that polling still works as expected 4. For completed pipelines, verify that polling stops appropriately
1 parent d529210 commit 7987e44

File tree

7 files changed

+109
-461
lines changed

7 files changed

+109
-461
lines changed

src/components/PipelineRun/PipelineRunPage.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { RunDetails } from "./RunDetails";
1616

1717
const GRID_SIZE = 10;
1818

19-
const PipelineRunPage = ({ rootExecutionId }: { rootExecutionId: string }) => {
19+
const PipelineRunPage = ({ pipelineRunId }: { pipelineRunId: string }) => {
2020
const [flowConfig, setFlowConfig] = useState<ReactFlowProps>({
2121
snapGrid: [GRID_SIZE, GRID_SIZE],
2222
snapToGrid: true,
@@ -36,7 +36,7 @@ const PipelineRunPage = ({ rootExecutionId }: { rootExecutionId: string }) => {
3636
);
3737

3838
return (
39-
<RootExecutionStatusProvider rootExecutionId={rootExecutionId}>
39+
<RootExecutionStatusProvider pipelineRunId={pipelineRunId}>
4040
<ContextPanelProvider defaultContent={<RunDetails />}>
4141
<ComponentLibraryProvider>
4242
<ResizablePanelGroup direction="horizontal">

0 commit comments

Comments
 (0)