apache/airflow

Add proper coverage for K8S tests

Open

#16,793 创建于 2021年7月3日

在 GitHub 查看
 (2 评论) (0 反应) (0 负责人)Python (16,781 fork)batch import
good first issuekind:taskprovider:cncf-kubernetes

仓库指标

Star
 (44,809 star)
PR 合并指标
 (平均合并 7天 18小时) (30 天内合并 834 个 PR)

描述

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:

贡献者指南