apache / apache/airflow

Prevent unexpected warnings in the code base

Open
#19,788 3 comments 0 reactions 0 assignees View on GitHub
kind:meta
Dominant language
Python
Stars
46.9k
Forks
17.8k
Avg merge
2d 10h
Merged PRs (30d)
483

Description

### Body

Spun out of https://github.com/apache/airflow/pull/19725#issuecomment-977062213

It may be worthwhile to strengthen up the test suite to also catch warnings so we can fix them before the reach the user. Currently there are a ton of warnings being emitted from the test suite, and it’s not exactly optimal (and makes the Pytest result yellow instead of green). [Pytest has a flag for “strict mode”.](https://docs.pytest.org/en/6.2.x/warnings.html)

I’m thinking maybe we can add a CI job to enable that, and slowly fix those warnings (either by actually rewriting relevant code, or just add suppression when they are expected). Once they are all delt with, we can enable them globally on all jobs (and remove the redundant job).

### Committer

- [X] I acknowledge that I am a maintainer/committer of the Apache Airflow project.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the test suite's current warning output and the linked Pytest warnings strict-mode documentation. Identify how a CI job could run the suite with strict warning handling, then track and remove or explicitly suppress existing warnings; done means the warnings are addressed and the dedicated check passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ci-cd, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.