Hello all Can you please help me with the below qu...
# ask-the-community
n
Hello all Can you please help me with the below questions pertaining to the
task_executions
table in flyte
AdminDb
? 1. Can you please let me know when are
started_at
and
duration
set to
null
? 2. I am of the impression that {
created_at
and
task_execution_created_at
}, {
updated_at
and
task_execution_updated_at
} should be the same. Can you please confirm this? cc @Yee @Alex Pozimenko (FYI)
d
Great questions. So: 1. The
started_at
field is set when the task initially transitions to the
RUNNING
state either here or here . Consequently, it will not be set if the task never transitions to
RUNNING
. So things like cache hits, failure to create pods, etc. Similarly, duration is computed when a task reaches a terminal state here or here . So if a task finishes (ex. succeeds, fails, etc). Then duration is computed based on the difference between
started_at
and the current time. 2. There is some very specific differences here to keep in mind. The
created_at
and
updated_at
fields are maintained by gorm (the DB ORM we use internally) based on the conventions. So these timestamps should refer to DB object creation and update timestamps. Alternatively, the
task_execution_created_at
and
task_execution_updated_at
fields are set based on event timestamps from flytepropeller tracking the workflow execution. Propeller marks an event with timestamp A, send this to admin to track the status, and admin updates the DB. So, generally, they are going to be identical, or at least VERY close. However, if your attempted to track task execution times, it would be best practice to rely on the
task_execution_created_at
and
task_execution_updated_at
fields.
106 Views