Hi everyone! Does anyone know if there is a way to...
# ask-the-community
Hi everyone! Does anyone know if there is a way to get the
node id
of a Flyte task execution from within that task? I have been looking into
but it is of type
which only has
(workflow id) and
. The
is of type
, so it does not have
Thank you !!
not that i know of easily. what are you trying to accomplish ?
it’s embedded in the raw output prefix that propeller sets, but that’s not a good thing to rely on.
from within a task execution, I am trying to export a custom message to a pubsub topic. I need the message to be digested in a similar manner to Flyte internal messages. In order to link the custom message to messages published by flyte, I was planning on using execution_id and node_id to identify unique task executions
I guess this brings up another question. Given that I can have multiple executions of the same task within a single workflow, is there a way for me to keep track of unique task executions without using the node id?
just curious (not that there’s support for this or anything) but does this need to be done while the task is executing, or would it be okay for the events to be queued and sent only after the task is complete?
short of passing a counter through, no. tasks are supposed to be agnostic right?
the raw output prefix is unique btw
the raw output prefix set by propeller today looks like
Copy code
that’s node and retry
but again i think this is a bad thing to rely on
i think propeller should publish a formal unique identifier that’s unique per proj/domain/execname/node/retry
hmm. I store some custom metrics about the task (collected during the execution) within the task and I want to export them to pubsub at the end of the execution so I think it needs to be during the execution since I may lose the info after the task is done running
right, the raw output prefix has the node id so it should be unique and I have access to it from within
, i dont think I see the same within the
which gets published by Flyte by default
and I need to find a way to link messages sent by flyte and messages that I explicitly send within tasks
is there anyway to use propeller to get the specific node id from within a task
like a rpc of some sort going from task back to propelelr?
no there is not
can you cut an issue to add a new unique identifier?
you don’t actually care about node id right? you just want something that matches
make an issue for it?