apache / airflow

Apache Airflow - A platform to programmatically author, schedule, and monitor workflows
https://airflow.apache.org/
Apache License 2.0
36.79k stars 14.23k forks source link

Add median duration markline to dag run duration page #39667

Open tirkarthi opened 5 months ago

tirkarthi commented 5 months ago

Description

Task duration chart already has median run and queued duration values as markline using echarts. However dag run duration had issues implementing this since the show landing pages is a checkbox that dynamically adds another series and due to an issue in echarts the markline was not rendering properly. Using clear method works but it loses the animations and reduces UX. Ref comments.

Since legends are clickable to show and hide corresponding series a proposed solution would be to have landing duration added by default along with legend but have it disabled by default. Users who need it can click on the legend to enable it and the series will be rendered. This is similar to using a checkbox except using legends and the selection can be saved to persist between pages if there are no issues like the dynamic series update as above.

https://github.com/apache/airflow/pull/38434#issuecomment-2016693194 https://github.com/apache/airflow/pull/38434#issuecomment-2016721461

Use case/motivation

No response

Related issues

No response

Are you willing to submit a PR?

Code of Conduct

tirkarthi commented 4 months ago

I tried an attempt at this to make this similar to task duration page but in many cases like catchup the landing page time is in days so days is applied as a unit and the actual runs which are complete in the order of minutes will be displayed on the scale of days which is not good UX. The primary issue is that landing times and dag run duration would have different units and to scale them based on selection which is not the case with task duration since the run duration is the primary field for unit with queued duration mostly in seconds to minutes.