Hello, I have a custom UI basically representing a...
# ask-the-community
s
Hello, I have a custom UI basically representing a flyte DAG. I create and execute workflows programatically. Then I pull on execution statuses and update my custom GUI accordingly. This appears to be working. But I would like to tag the tasks per execution with custom ids which would hopefully become available when retrieving execution statues. The reason I want this is because updating my GUI will be much easier if I can just match custom ids. Is there any way to add arbitrary data to an instance of a workflow node? Thanks! THIS IS ESSENTIALLY WHAT I HAVE (sudo code):
Copy code
flyte_task_a = self.client.fetch_task(name=task_name)
flyte_task_b = self.client.fetch_task(name=task_name)
flyte_task_c = self.client.fetch_task(name=task_name)

workflow = Workflow(name=workflow_name)
workflow.add_entity(flyte_task_a)
workflow.add_entity(flyte_task_b)
workflow.add_entity(flyte_task_c)
THIS IS WHAT I WANT TO DO:
Copy code
flyte_task_a = self.client.fetch_task(name=task_name)
flyte_task_b = self.client.fetch_task(name=task_name)
flyte_task_c = self.client.fetch_task(name=task_name)

flyte_task_a.add_arbitraty_data(custom_uuid)
flyte_task_b.add_arbitraty_data(custom_uuid)
flyte_task_c.add_arbitraty_data(custom_uuid)

workflow = Workflow(name=workflow_name)
workflow.add_entity(flyte_task_a)
workflow.add_entity(flyte_task_b)
workflow.add_entity(flyte_task_c)
s
Isn't an execution ID sufficient for your use-case?
s
Oh, interesting I'll look into this. From what I've seen the execution tag is associated with a workflow. Which is good, but I would like to be able to tag the nodes of a workflow instance. Lets say I have a 5 node workflow. 2/5 nodes use the same task. So the name will be the same for those 2 nodes. I'm trying to figure out how to robustly map the statues to the nodes. If I could tag the nodes with a custom id at the point of execution, It would be very easy to map the node "phases" to the GUI.
s
I don't think that's possible. You should, however, be able to use the execution ID to fetch the execution first, followed by the node in the execution.
s
Ok, thanks very much, I'll work with that