Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent unexpected warnings in the code base #19788

Open
1 task done
uranusjr opened this issue Nov 23, 2021 · 3 comments
Open
1 task done

Prevent unexpected warnings in the code base #19788

uranusjr opened this issue Nov 23, 2021 · 3 comments
Labels
kind:meta High-level information important to the community

Comments

@uranusjr
Copy link
Member

Body

Spun out of #19725 (comment)

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”.

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

  • I acknowledge that I am a maintainer/committer of the Apache Airflow project.
@uranusjr uranusjr added the kind:meta High-level information important to the community label Nov 23, 2021
@potiuk
Copy link
Member

potiuk commented Nov 24, 2021

Yep. Good idea. For now we only have it at the "import level" in providers for deprecation warnings - i.e. all classes from providers are tested if they are not geneating any warning simply by importing them (except the known ones)

KNOWN_DEPRECATED_MESSAGES: Set[Tuple[str, str]] = {
- but indeed, being strict on warnings at the unit tests is good goal (will take some time thought)

@uranusjr uranusjr changed the title Prevent unexpected in the code base Prevent unexpected warnings in the code base Nov 24, 2021
@eladkal
Copy link
Contributor

eladkal commented Sep 16, 2022

Do we still need this task?
From what i've seen the CI does catch unexpected warnings.

@potiuk
Copy link
Member

potiuk commented Sep 19, 2022

I thint it would be worthwhile. Currently we only show warnings produced at "airflow" module" but we might want to get rid of all of them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:meta High-level information important to the community
Projects
None yet
Development

No branches or pull requests

3 participants