eladkal commented on code in PR #26993:
URL: https://github.com/apache/airflow/pull/26993#discussion_r993754316
##########
airflow/www/utils.py:
##########
@@ -440,6 +440,11 @@ def dag_run_link(attr):
return Markup('<a href="{url}">{run_id}</a>').format(url=url,
run_id=run_id)
+def task_try_count(ti: TaskInstance) -> int:
+ """Get the total try count for a task instance"""
+ return ti._try_number if ti._try_number != 0 or ti.state in State.running
else ti._try_number + 1
Review Comment:
I think it's an issue with running task vs non running tasks
https://github.com/apache/airflow/blob/0ec9651f88b7073f8de4df70b21e70be0bd08b2a/airflow/models/taskinstance.py#L611-L623
It has some other refrences
https://issues.apache.org/jira/browse/AIRFLOW-2143
https://github.com/apache/airflow/blob/9514b6ca701728bc21c609af18a59a2ba9cffe97/airflow/www/views.py#L3237-L3240
##########
airflow/www/utils.py:
##########
@@ -440,6 +440,11 @@ def dag_run_link(attr):
return Markup('<a href="{url}">{run_id}</a>').format(url=url,
run_id=run_id)
+def task_try_count(ti: TaskInstance) -> int:
+ """Get the total try count for a task instance"""
+ return ti._try_number if ti._try_number != 0 or ti.state in State.running
else ti._try_number + 1
Review Comment:
I think it's an issue with running task vs non running tasks
https://github.com/apache/airflow/blob/0ec9651f88b7073f8de4df70b21e70be0bd08b2a/airflow/models/taskinstance.py#L611-L623
It has some other references
https://issues.apache.org/jira/browse/AIRFLOW-2143
https://github.com/apache/airflow/blob/9514b6ca701728bc21c609af18a59a2ba9cffe97/airflow/www/views.py#L3237-L3240
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]