ashb commented on a change in pull request #13537:
URL: https://github.com/apache/airflow/pull/13537#discussion_r553277295
##########
File path: airflow/www/views.py
##########
@@ -1912,7 +1912,7 @@ def encode_ti(task_instance:
Optional[models.TaskInstance]) -> Optional[List]:
# round to seconds to reduce payload size
task_instance_data[2] =
int(task_instance.start_date.timestamp())
if task_instance.duration is not None:
- task_instance_data[3] = int(task_instance.duration)
+ task_instance_data[3] = float(task_instance.duration)
Review comment:
So, casting this to an int was an optimization for large/huge dags:
https://github.com/apache/airflow/pull/7492, particularly
https://github.com/apache/airflow/pull/7492#discussion_r384158218
So we might nee to make this smarter, say, and only say make it an int above
10 or 30s, and in other cases make it a float with 3dp (i.e. 0.123s, rather
than the default which will be to 6 or 9 dp)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]