catbig opened a new issue, #33921: URL: https://github.com/apache/airflow/issues/33921
### Apache Airflow version 2.7.0 ### What happened Number of DAGs in tabs not match with number of records <img width="281" alt="gambar" src="https://github.com/apache/airflow/assets/15390033/28647e7d-0ec2-413d-be27-ae6258a669da"> Data statistic on dag table all<sup>1</sup> | is_active<sup>2</sup> | is_paused<sup>3</sup> --: | --: |--: 113 | 55 | 58 <sup>1</sup> `select count(*) from dag` <sup>2</sup> `select count(*) from dag where not is_paused` <sup>3</sup> `select count(*) from dag where is_paused` Record number on the page, count manually all | is_active | is_paused --: | --: |--: 52 | 48 | 4 ### What you think should happen instead The number on tabs should follow number of record all<sup>1</sup> | is_active<sup>2</sup> | is_paused<sup>3</sup> --: | --: |--: 52 | 48 | 4 # Proposed Solution The query should add filter `active` <sup>1</sup> `select count(*) from dag where is_active` <sup>2</sup> `select count(*) from dag where not is_paused and is_active` <sup>3</sup> `select count(*) from dag where is_paused and is_active` # Code need to change File path: https://github.com/apache/airflow/blob/main/airflow/www/views.py Class: `Airflow(AirflowBaseView)` Function: `def index(self)` ### How to reproduce # Requirement 1. DAGs populate with gitSync 2. wait: 1 (1 second to sync) # Steps 1. Add new DAGs a. filename: `hello_world.py` b. dagId: `hello_world1` 3. Go to DAGs page (`/home`) a. check number of DAGs in tab and take note b. count records of DAGs for each tab and take note 4. Change the dagId a. dagId: `hello_world2` b. wait for 5 seconds c. dagId: `hello_world3` d. wait for 5 seconds e. dagId: `hello_world4` f. wait for 5 seconds g. dagId: `hello_world5` 5. Go to DAGs page (`/home`) a. check number of DAGs in tab and take note b. count records of DAGs for each tab and take note ### Operating System Linux ### Versions of Apache Airflow Providers _No response_ ### Deployment Official Apache Airflow Helm Chart ### Deployment details Deploy on kubernetes cluster using helm chart ### Anything else _No response_ ### Are you willing to submit 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) -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
