apache / airflow

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

Add proper coverage for K8S tests #16793

Open potiuk opened 3 years ago

potiuk commented 3 years ago

Currently K8S tests are not testing Airflow source coverage because actual airflow code runs inside Docker container in K8S (pytest is added in the virtualenv in host, so the only thing coverage can capture is the coverage of "test" files which makes no sense.

We should remove the coverage from host and add coverage capturing inside the docker container.

This is a bit involved, because it needs to:

1) add coverage libraries to the kubernetes docker image 2) enable capturing coverage via environment variable 3) find a way to dump the coverage files from running containers (all of them - webserver, scheduler, worker) and export them from K8S.

So for now we should just disable the nonsense coverage gathering especially that it causes random failures in case of parallel run of K8S tests.

Apache Airflow version:

Kubernetes version (if you are using kubernetes) (use kubectl version):

Environment:

What happened:

What you expected to happen:

How to reproduce it:

Anything else we need to know:

khushi-98 commented 10 months ago

I would like to work on this error.

potiuk commented 10 months ago

Assigned. It's a bit complex though .... I hope you know what you are signing up for :)