Skip to content

Option to make UI centered around execution date rather than the start_date of interval #21493

@dennis-weyland-by

Description

@dennis-weyland-by

Description

Consider the following example:
The current datetime is 2022-02-10 09:45 CET and airflow executed two runs:

  • daily_run scheduled to run every day at 09:43 CET
  • maintenance triggered manually at 2022-02-10 09:41 CET

In the UI it looks like this:
Screenshot 2022-02-10 at 09 45 55

From someone new to airflow there are some unintuitive things for display:

  • Although both dags ran on the same day, they display different dates in the last run
  • The DateTime in the Next run column for daily_run is in the past

On a technical level, this is documented. Airflow runs its schedule after the schedule interval is completed and what is displayed is the start_date of the interval similar to the start_date parameter of a DAG. As a developer, which works with Airflow, I have to read the documentation and act accordingly. So far this is fine.

My point is, that not every consumer of the UI is familiar with Airflow and to some, this is very confusing and counterintuitive.
As a developer, I would like to have the option to switch the displayed days to the execution/run after date. This information is also already there when using the info tooltip:
Screenshot 2022-02-10 at 11 09 31 Screenshot 2022-02-10 at 11 09 44

Summary
Introduce a config flag for the web-server that on the front page the actual time of the future/past execution of a scheduled dag is shown. Since this is a behavior inconsistent with internal airflow behavior, the flag should be disabled by default.

Optional: Extending this to DAg Details page
The Frontpage is not the only place the behavior is shown. So it might make sense that the flag would also change the following examples:
Tree View:

  • Upper right: next Run
  • Calendar Filter
  • Column Name (and ordering) in Tree View

Screenshot 2022-02-10 at 11 07 29

Calendar:

Screenshot 2022-02-10 at 11 08 36

Are you willing to submit a PR?
My lack of javascript logic prevents me from doing a pr myself, but I would be willing to help on this issue if needed.

Use case/motivation

I use airflow to schedule/orchestrate ML pipelines like model training, predicting, and so on. I want to use the Airflow UI to further enable those pipelines to an audience, which is not accustomed to airflow. It turned out that the current behavior of how dates are displayed (especially with a mix of scheduled and manually triggered tasks) is very confusing for this use case and makes it hard to onboard people as WebUI-only users.

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:UIRelated to UI/UX. For Frontend Developers.kind:featureFeature Requests

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions