You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/10/12 17:30:03 UTC

[GitHub] [airflow] bbovenzi commented on a diff in pull request #26993: Fix inconsistent try_counts across logs

bbovenzi commented on code in PR #26993:
URL: https://github.com/apache/airflow/pull/26993#discussion_r993730841


##########
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'm not really sure. It seems to cause another issue: https://github.com/apache/airflow/issues/24958
   Happy to hop on a call an investigate more.



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org