apache / apache/airflow

Add ability to filter DAGs in DAGs View by tags using "AND" instead of default behavior "OR"

Open
#38,147 10 comments 2 reactions 0 assignees View on GitHub
area:webserver good first issue kind:feature
Dominant language
Python
Stars
46.9k
Forks
17.8k
Avg merge
2d 7h
Merged PRs (30d)
484

Description

### Description

In the DAGs View, we can enter tags in the "Filter DAGs by tag" box by entering one or more tags. However, this results in an OR-type behavior, where the results show every DAG with any of the entered tags.

With this feature enabled, the list of DAGs returned would be a list only of those DAGs containing **ALL** of the user-entered tags, rather than a list of DAGs containing **ANY** of the user-entered tags.

### Use case/motivation

This feature could be as simple as adding a checkbox next to the "Filter DAGs by tag" box (marked "use AND" or similar). This will be a great help to filter DAGs when tagging is used extensively and there are hundreds of DAGs on an instance. For instance, we're migrating legacy ELT procedures that use legacy systems. We're tagging these DAGs with all the legacy systems they use. If we could zero in on which DAGs are using legacy system A **and** legacy system B, it would help us to understand the relationships between those systems, and what needs to be done to no longer rely on either.

### Related issues

None I'm aware of.

### Are you willing to submit a PR?

- [X] Yes I am willing to submit a PR!

### Code of Conduct

- [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)

Contributor guide

Open the contributing guide

Research direction

Start at the Airflow DAGs View and its “Filter DAGs by tag” control, then trace the existing tag-filter behavior and any related tests. Done means users can opt into AND matching so results contain every entered tag, while the current OR behavior remains available.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.