<#3440 [BUG] Latest task status may not always be ...
# flyte-github
a
#3440 [BUG] Latest task status may not always be reported Issue created by hamersaw Describe the bug Every time FlytePropeller checks a task status it constructs a pluginRequestedTransition which contains information regarding the state change of the plugin. This information is used to determine whether the current state has altered from the previously reported state which is determined using the
Phase
and
PhaseVersion
information that each plugin reports. If this has not changed (based on these two field) then FltyePropeller immediately returns and bypasses sending a TaskExecutionEvent reporting the task state to FlyteAdmin. The problem is that plugins may report new status with the same
Phase
and
PhaseVersion
but with an updated
Reason
, the
Reason
field contains information regarding task execution. One such scenario is where a k8s Pod requests more resources than are available within the cluster. The initial
TaskExecutionEvent
will report a
Reason
"task submitted to K8s". In a subsequent evaluation the plugin updates this
Reason
to "Unschedulable:0/1 nodes are available: 1 Insufficient memory.", however this is never reported to FlyteAdmin because the
Phase
and
PhaseVersion
remain the same. Expected behavior The FlyteConsole UI should always display the latest status. This requires FlytePropeller to correctly identify an update and therefore to send an event to FlyteAdmin reporting the change. Additional context to reproduce Start a workflow with resource requests larger than what is available in the cluster. In the task status' pane in the UI it will always display the "RUNNING" phase with a reason of "task submitted to K8s".
Copy code
@task(requests=Resources(mem="12G"))
def say_hello_resources(name: str) -> str:
    return f"hello {name}"

@workflow
def my_wf_resources(name: str) -> str:
    res = say_hello_resources(name=name)
    return res
Screenshots

image▾

Are you sure this issue hasn't been raised already? ☑︎ Yes Have you read the Code of Conduct? ☑︎ Yes flyteorg/flyte