airflow icon indicating copy to clipboard operation
airflow copied to clipboard

DAG list: filter FAILED/RUNNING

Open ecodina opened this issue 1 year ago • 3 comments

Description

A few versions ago a very useful feature was introduced: allowing users to filter the home (DAG list) by RUNNING or FAILED DAGs. However, when you click on FAILED, all dags appear, even paused ones.

image

I believe the two sets of buttons should "work together". Therefore:

  • All + Failed: show all failed DAGs (paused and unpaused)
  • Active + Failed: only show active failed DAGs
  • ....

Use case/motivation

We have many paused DAGs that finished with an error. It would be very useful to not see them so that it is easier to check actual errors.

Related issues

I've tried to find the PR that introduced this, but couldn't find it.

Thanks!

Are you willing to submit a PR?

  • [ ] Yes I am willing to submit a PR!

Code of Conduct

ecodina avatar May 17 '24 07:05 ecodina

I've tried to find the PR that introduced this, but couldn't find it.

cc @PApostol as the original author of this feature https://github.com/apache/airflow/pull/30429 WDYT?

eladkal avatar May 17 '24 07:05 eladkal

Thanks @eladkal for finding it! Following your concern (mixing Dag and DagRun properties) I believe that adding this should be "simple":

Instead of having: arg_status_filter = request.args.get("status")

We should have

arg_status_filter = request.args.get("status")  # all, active, paused
arg_lastrun_filter = request.args.get("lastrunstatus")   # failed or running

Then, since we already have the queries (all_dags, active_dags, paused_dags, running_dags, failed_dags) it would be a matter of filtering the last two objects.

ecodina avatar May 17 '24 08:05 ecodina

This is a good idea. At the moment, "Failed" tab doesn't distinguish between "All", "Active" or "Paused" (same applies for "Running" but that's probably less relevant). It would be nice for the tabs to work together.

PApostol avatar May 17 '24 08:05 PApostol