You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I looked into it, the endpoint api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id} and it was giving the right result. In the code, it is seems to be attached to the field _try_number
_try_number = auto_field(data_key="try_number")
but the one we see in the UI is try_number attribute from TaskInstance model which is _try_number + 1 for finished tasks
@hybrid_property
def try_number(self):
"""
Return the try number that this task number will be when it is actually
run.
If the TaskInstance is currently running, this will match the column in the
database, in all other cases this will be incremented.
"""
# This is designed so that task logs end up in the right file.
if self.state == State.RUNNING:
return self._try_number
return self._try_number + 1
So we can, instead of showing try_number we can show _try_number in the UI.
Activity
Adaverse commentedon Jul 3, 2023
I looked into it, the endpoint
api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}and it was giving the right result. In the code, it is seems to be attached to the field_try_numberbut the one we see in the UI is
try_numberattribute fromTaskInstancemodel which is_try_number + 1for finished tasksSo we can, instead of showing
try_numberwe can show_try_numberin the UI.Will open a PR for this.