https://flyte.org logo
#ask-the-community
Title
# ask-the-community
r

Roman Isecke

04/27/2023, 1:34 PM
Hi everyone! I recently started working with Flyte and have a workflow with conditional branching that kicks of one of two other sub workflows. I need a way to programmatically fetch from python if a specific task within an execution of that workflow was run and if it was if it finished successfully. Even looking into the flytekit code, I can't find a simple way to do this. Ideally I don't need to get the state of the entire workflow, just a single task. The branching logic also complicates it from what I've noticed. I was able to do this in a static workflow by pulling out some code from the
sync_execution()
method. Maybe I'm missing something?
k

Ketan (kumare3)

04/27/2023, 1:41 PM
Hmm this is flytekit.remote
There is a way to do it, do you want to see the artifacts generated
If so @Yee has a nice trick that he will be merging next week
I am sure he will Love your feedback
r

Roman Isecke

04/27/2023, 1:44 PM
Artifacts aren't required right now but would be nice. I've also noticed there's a difference in node status vs task status. I didn't see much docs about this but node status updates to SUCCESS before the task status does, so I need to make sure the task has completed, not the node itself.
Appreciate the help.
k

Ketan (kumare3)

04/27/2023, 1:46 PM
Ohh. Ode status cannot update to success before task
This is just a UI bug maybe
r

Roman Isecke

04/27/2023, 2:03 PM
I was seeing it in the code when I explicitly synced the node execution and it would be marked as SUCCESS before the task finished in the UI. In general though the node would always be marked finished after the tasks? I didn't see much docs around the status types but I've been using the
enum_to_string
methods to parse the grpc response ints.
s

Samhita Alla

04/28/2023, 4:39 AM
In general though the node would always be marked finished after the tasks?
Yes!
6 Views