flytekit
flytekit copied to clipboard
Add helper method to traverse node executions
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.