How do you get the status of map tasks using Flyte...
# flyte-support
n
How do you get the status of map tasks using FlyteRemote or the python client? When I try doing
remote.sync
or
remote.sync_execution
This is a workflow containing a dynamic workflow that calls a map_task
Copy code
_InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
	status = StatusCode.NOT_FOUND
	details = "missing entity of type TASK with identifier project:"flytetester" domain:"development" name:"MAP_TASK_NAME" version:"VERSION" "
	debug_error_string = "UNKNOWN:Error received from peer ipv4:10.34.2.243:443 {grpc_message:"missing entity of type TASK with identifier project:\"flytetester\" domain:\"development\" name:\"MAP_TASK_NAME\" version:\"VERSION\" ", grpc_status:5, created_time:"2023-06-02T15:32:48.383186-07:00"}"
>
t
remote.sync
has to work for any execution, even if it contains map tasks. Are you trying to get the status of a workflow execution or a task execution?
n
I was passing in a workflow execution id
t
Is
remote.sync
working for workflows that don't use a map task?
n
sorry, it doesn't work when I try
sync_nodes=True
. Missed that detail.
and yes, other workflow don't error out with sync_nodes=true. both basic workflows and workflows containing dynamic tasks. but when theres a dynamic task calling a map task, it fails
Copy code
task_execution = client.get_task_execution(flytekit.models.core.identifier.TaskExecutionIdentifier(
    task_id=task_identifier, 
    node_execution_id=node_exe_identifier,
    retry_attempt=0
))
flyte_task_exe = flytekit.remote.executions.FlyteTaskExecution.promote_from_model(task_execution)
remote.sync_task_execution(
    execution=flyte_task_exe,
)
sync_task_execution
will error out for the map_task
t
Looks like a bug. Would you mind creating an issue? cc @high-accountant-32689
n
161 Views