-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
Follow zero internal warning in unit tests #38642
Labels
Comments
Taragolis
added
good first issue
kind:meta
High-level information important to the community
labels
Mar 31, 2024
This was referenced Apr 5, 2024
This was referenced Apr 23, 2024
56 tasks
This was referenced Apr 30, 2024
This was referenced May 7, 2024
This was referenced May 29, 2024
This was referenced Jun 11, 2024
This was referenced Jun 16, 2024
This was referenced Jun 19, 2024
This was referenced Jun 23, 2024
This was referenced Jun 30, 2024
This was referenced Jul 6, 2024
This was referenced Jul 17, 2024
can I pick it ? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Body
This is follow up task after #38504, we have quite a few tests which raise one of the internal deprecation warning:
airflow.exceptions.AirflowProviderDeprecationWarning
airflow.exceptions.RemovedInAirflow3Warning
airflow.utils.context.AirflowContextDeprecationWarning
All current exclusions which should be resolved stored into the
tests/deprecations_ignore.yml
in format test node id:{relative path to the test}::{ClassName}::{test_case}
or{relative path to the test}::{test_case}
without parametrised partHow to resolve specific test suite
Remove /commented out specific line in exclusion list a have a look on error by run removed node id,
After that need to determine which kind of a problem here
Option 1: It might be test deprecation functional without explicit usage of
pytest.warn
. This case is pretty simple and required to addpytest.warn
context manager wit appropriate matcher.Option 2: Use deprecated functional in tests, time moves on and not all test updated. In this case need to rewrite test to avoid use deprecated part
Option 3: Use deprecated functional in tests utilities and fixtures, the same as option 2, however it might spread across multiple tests suits, replace/add functional to use not deprecated functional it this utilities/fixtures. This might required to use
full test needed
label in pr, If you not a Commiter or PMC please ask to add this label.Option 4: Incorrect depreciation in code base. This one could be cause if one part of functional deprecated in code base, but the other still use it. There is no a universal solution for this situation, it might required to avoid use deprecated functional in codebase or even undeprecate.
Other cases: It might be other cases, feel free to share you experience with non listed above in this issue or into the Slack
Tip
Feel free to ask a suggestion/helps in slack channels
#contributors
or#new-contributors
Note
There main target of this task it resolve deprecation warnings, but not hide all of them under
pytest.warn
, use this context manager, as well aswarnings.catch_warnings
context manager only for test suites around deprecated functionalWarning
Please do not mixin changes in code base and only tests into the same PR. Better to split it into the separate PRs.
Committer
The text was updated successfully, but these errors were encountered: