Skip to content

Add proper coverage for K8S tests #16793

@potiuk

Description

@potiuk

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:

  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

What happened:

What you expected to happen:

How to reproduce it:

Anything else we need to know:

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issuekind:taskA task that needs to be completed as part of a larger issueprovider:cncf-kubernetesKubernetes (k8s) provider related issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions