BenoitHanotte opened a new pull request #15423:
URL: https://github.com/apache/airflow/pull/15423


   <!--
   Thank you for contributing! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   In case of existing issue, reference it using one of the following:
   
   closes: #ISSUE
   related: #ISSUE
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   
   # Motivation
   
   Introduce a DAG Calendar View to provide visibility over the full state of 
the dag by displaying the aggregated dag runs' states in a calendar.
   This makes it possible to monitor the state of thousands of dag runs in a 
single view that is concise and easy to understand. It is particularly useful 
to monitor the state of large backfills:
   
   
![image](https://user-images.githubusercontent.com/6229788/115161178-0b4afd80-a094-11eb-9d9f-38709d76700b.png)
   
   Each day is displayed with a color according to the dag runs' states for 
that day:
   - If at least one dag run has failed for a day, the day will be displayed as 
"failed".
   - If all dag runs have succeeded, the day will be shown as "succeeded". 
   - If there are still running dag runs (and no failed dag run) for that day, 
the day will be shown as "running".
   
   A tooltip, for each day, gives the exact number of dag runs in each state 
for the day.
   
![image](https://user-images.githubusercontent.com/6229788/115161622-acd34e80-a096-11eb-989c-d40c0aa82676.png)
   
   Clicking on a day redirects to the tree view for that day to show the task 
instances for that day.
   
   # Implementation
   - New `/calendar` endpoint in `views.py`. 
   This view returns, for each day, the number of dag run in each state. Thus, 
only the `dag_run` table is queried, and the query returns at most 3 * days 
records. Thus, this view puts little strain on the database, even for dags with 
a large number of task instances.
   - New `calendar.html` template, `calendar.js` and `calendar.css` static 
files.
   The calendar view is implemented usng d3, thus no additional dependency has 
been introduced.
   
   The proposal has been discussed on the dev mailing list:
   
https://lists.apache.org/thread.html/r6f2ea3f83d268a665ac63219553718ed089a01e9530627cca0572ab1%40%3Cdev.airflow.apache.org%3E


-- 
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]


Reply via email to