Skip to content

Comments

refactor: Use new flag in API to check pipeline run has ended#1823

Open
yuechao-qin wants to merge 1 commit intomasterfrom
ycq/use_api_has_ended
Open

refactor: Use new flag in API to check pipeline run has ended#1823
yuechao-qin wants to merge 1 commit intomasterfrom
ycq/use_api_has_ended

Conversation

@yuechao-qin
Copy link
Collaborator

@yuechao-qin yuechao-qin commented Feb 18, 2026

Depends On

This PR-99 must be landed before this can be merged.

Description

Using new flag has_ended in API (GET /api/executions/{executionId}/state) to determine if a root execution node is completed.

NOTE

  • Root execution node could be either
    • Root of a Pipeline Run
    • Root of a subgraph
  • The has_ended flag is context aware of the children nodes' statuses under any root execution node

Type of Change

  • Improvement
  • Cleanup/Refactor

Checklist

  • I have tested this does not break current pipelines / runs functionality
  • I have tested the changes on staging

Test Instructions

  • Start a pipeline run
  • Check Chrome Dev Tools that API (search string state) doesn't fetch anymore when run has ended
  • Confirm new API response payload
  • Confirm component src/utils/executionStatus.ts is latest in Chrome

1.mov (uploaded via Graphite)

2.mov (uploaded via Graphite)

Copy link
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@yuechao-qin yuechao-qin marked this pull request as ready for review February 18, 2026 17:48
@yuechao-qin yuechao-qin requested a review from a team as a code owner February 18, 2026 17:48
Comment on lines +42 to +43
const isComplete = state.summary.has_ended;
const isInProgress = !isComplete;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does "complete" state include "failed" or "cancelled" states? if yes, then `isInProgress could be incorrect at times

Copy link
Collaborator Author

@yuechao-qin yuechao-qin Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does include those states here.

Interesting, can you help me understand what isInProgress is suppose to mean then in the UI?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants