flytekit icon indicating copy to clipboard operation
flytekit copied to clipboard

Add helper method to traverse node executions

Open troychiu opened this issue 10 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