apache / airflow

Apache Airflow - A platform to programmatically author, schedule, and monitor workflows
https://airflow.apache.org/
Apache License 2.0
36.36k stars 14.1k forks source link

Improve Code Coverage for Airflow #35127

Open ephraimbuddy opened 11 months ago

ephraimbuddy commented 11 months ago

Description

Airflow code coverage is currently at an impressive 84% but we would like to improve the code coverage and get to at least 95%. This is a call to help improve the code coverage by adding the missing tests.

You can use the code coverage tool to find modules to improve. Here is the link to the documentation: https://github.com/apache/airflow/blob/main/contributing-docs/testing/unit_tests.rst#code-coverage

Below is how you can discover modules to work on, follow the above link for up-to-date instruction:

Note In order to see the coverage report, you must start webserver first in breeze environment via airflow webserver. Once you enter breeze, you can start tmux (terminal multiplexer) and split the terminal (by pressing ctrl-B " for example) to continue testing and run the webserver in one terminal and run tests in the second one (you can switch between the terminals with ctrl-B <arrow>).

PRs should be per module or related codebase

UPDATE (added by @potiuk )

Also you might want to have a look at #35442 - we had a "project structure" test that was supposed to detect modules that do not have corresponding tests and fail our build in this case. This test has been however broken for a long time and we have many missing modules on the list.

potiuk commented 10 months ago

Hey @ephraimbuddy - I added a comment in the issue description.

Also you might want to have a look at https://github.com/apache/airflow/issues/35442 - we had a "project structure" test that was supposed to detect modules that do not have corresponding tests and fail our build in this case. This test has been however broken for a long time and we have many missing modules on the list.