flytekit icon indicating copy to clipboard operation
flytekit copied to clipboard

Add helper method to traverse node executions

Open troychiu opened this issue 11 months ago • 2 comments

Why are the changes needed?

Currently it's hard for users to traverse all node executions under a workflowExecution/nodeExecution.

What changes were proposed in this pull request?

Added helper method for workflowExecution and nodeExecution.

How was this patch tested?

You can easily traverse nodes like

r = FlyteRemote()
execs = r.recent_executions(project=project, domain=domain, limit=limit)
a = r.sync(execs[0], sync_nodes=True)
for node in a.traverse_node_executions():
    print(node.id.node_id)

Example output:

n0
n0-0-n0
n0-0-n1
n0-0-n2
n0-0-n3
n0-0-n3-0-dn0
n1
n2
n3

Check all the applicable boxes

  • [ ] I updated the documentation accordingly.
  • [ ] All new and existing tests passed.
  • [ ] All commits are signed-off.

Related PRs

Docs link

troychiu avatar Feb 27 '25 21:02 troychiu

Code Review Agent Run Status

  • Limitations and other issues:  Failure - The AI Code Review Agent skipped reviewing this change because it is configured to exclude certain pull requests based on the source/target branch or the pull request status. You can change the settings here, or contact the agent instance creator at [email protected].

flyte-bot avatar Feb 27 '25 21:02 flyte-bot

Code Review Agent Run Status

  • Limitations and other issues:  Failure - The AI Code Review Agent skipped reviewing this change because it is configured to exclude certain pull requests based on the source/target branch or the pull request status. You can change the settings here, or contact the agent instance creator at [email protected].

flyte-bot avatar Mar 01 '25 00:03 flyte-bot