apache / apache/airflow

Possibility to filter tasks in `None` state

Open
#21,955 7 comments 3 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 10h
Merged PRs (30d)
483

Description

### Description

Currently in list of `Task Instances` there is no possibility to quickly filter only tasks with `None` state. This issue proposes to introduce such possibility. I see two approaches that could be introduced to handle this:

- add `Is empty` and `Is not empty` filtering options in filter controls
![image](https://user-images.githubusercontent.com/5680655/156524522-35c69cd9-d5be-4ce3-acaa-07fa5f695033.png)
- when querying underlying database to get list of tasks, do `COALESCE(state, 'None')` (pseudocode) so if user enters `None` into (for example) `Starts with` clause, it's filtered properly.

### Use case/motivation

None is a valid status for task and it should be possible to filter by it.

### Related issues

_No response_

### 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 with the Task Instances list and its filter controls, then trace how their filters reach the underlying database query. Compare the proposed empty-value controls with the COALESCE approach and confirm the expected behavior for None-state tasks. Done means users can reliably filter only tasks whose state is None.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
databases, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.