Skip to content

Comments

feat: GetExecutionNodes API returns number of total and ended nodes#99

Open
yuechao-qin wants to merge 1 commit intoycq/api_execution_state_testsfrom
ycq/api_execution_state_summary
Open

feat: GetExecutionNodes API returns number of total and ended nodes#99
yuechao-qin wants to merge 1 commit intoycq/api_execution_state_testsfrom
ycq/api_execution_state_summary

Conversation

@yuechao-qin
Copy link
Collaborator

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

TL;DR

Added execution summary to graph execution state response to track node completion status (GET /api/executions/{id}/graph_execution_state).

What changed?

  • Enhanced GetGraphExecutionStateResponse class with a required summary field of type ExecutionSummary
  • Modified get_graph_execution_state method to populate the summary by counting node statuses
  • Updated the dataclass to use kw_only=True for better parameter handling
  • Fixed a method call from row.tuple() to row._tuple()
    • Received warning that the previous is deprecated with an older SQLAlchemy version.
  • Added tests to verify the summary information is correctly calculated

How to test?

Run the updated tests in test_execution_nodes_api_service.py which verify:

  • Empty graphs return appropriate summary values
  • Direct container children are properly counted
  • Complex nested graphs correctly calculate total nodes and ended nodes
  • The has_ended flag is properly set based on execution state

Run the new test cases in tests/test_api_server_sql.py:

pytest tests/test_execution_nodes_api_service.py

Why make this change?

image.png

Copy link
Collaborator Author

yuechao-qin commented Feb 17, 2026

@yuechao-qin yuechao-qin marked this pull request as ready for review February 17, 2026 18:03
@yuechao-qin yuechao-qin requested a review from Ark-kun as a code owner February 17, 2026 18:03
@yuechao-qin yuechao-qin force-pushed the ycq/api_execution_state_tests branch from afadec1 to 84c4f12 Compare February 18, 2026 02:26
@yuechao-qin yuechao-qin force-pushed the ycq/api_execution_state_summary branch 2 times, most recently from ec362e9 to b76e34a Compare February 18, 2026 02:58
Copy link
Contributor

Ark-kun commented Feb 19, 2026

>It need to know when a root execution node (run, subgraph) has ended.
Why does it need this info?

@yuechao-qin yuechao-qin force-pushed the ycq/api_execution_state_summary branch from b76e34a to e69bea1 Compare February 20, 2026 04:28
@yuechao-qin yuechao-qin force-pushed the ycq/api_execution_state_tests branch from 84c4f12 to 6727474 Compare February 20, 2026 04:28
@yuechao-qin yuechao-qin force-pushed the ycq/api_execution_state_tests branch from 6727474 to d41bf7a Compare February 21, 2026 20:51
@yuechao-qin yuechao-qin force-pushed the ycq/api_execution_state_summary branch from e69bea1 to e150750 Compare February 21, 2026 20:51
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