-
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
Change capture warnings output format to the JSON #38905
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Test |
47322f1
to
35b4fd4
Compare
Also add about configuration into the documentation, so worthwhile to check spelling and grammar |
Covert to draft for avoid accidentally merge I have a plan to change a bit what we store into output file Warnings output from this PR enough for play with merge into resulting dump, split into the categories and found some unnecessary or important warnings |
5f96fee
to
91cae11
Compare
91cae11
to
f81e749
Compare
Many changes since original review
Make it also work in xdist worker and exchange data with controller Provide simple script for summarize warnings with simple report
f81e749
to
07fd917
Compare
Co-authored-by: Vincent <97131062+vincbeck@users.noreply.github.com>
Feel difference Python 3.12 (non-db) ================== Warning summary. Total: 4,670, Unique: 329 ==================
airflow: total 133, unique 16
other: total 3,737, unique 24
providers: total 222, unique 44
tests: total 578, unique 245
Warnings saved into /files/warnings-all-none.txt file. Python 3.11 (non-db) ================== Warning summary. Total: 1,136, Unique: 320 ==================
airflow: total 132, unique 15
other: total 204, unique 17
providers: total 224, unique 45
tests: total 576, unique 243
Warnings saved into /files/warnings-all-none.txt file. Python 3.8 (non-db) ================== Warning summary. Total: 1,134, Unique: 320 ==================
airflow: total 132, unique 15
other: total 203, unique 18
providers: total 223, unique 44
tests: total 576, unique 243
Warnings saved into /files/warnings-all-none.txt file. The differences mostly because some upstream dependency still use And also fork from multithreading, which are "deprecated" in Python 3.12: https://discuss.python.org/t/concerns-regarding-deprecation-of-fork-with-alive-threads/33555 {"category": "DeprecationWarning", "message": "This process (pid=99) is multi-threaded, use of fork() may lead to deadlocks in the child.", "node_id": "tests/secrets/test_cache.py::TestSecretCache::test_cache_accessible_from_other_process", "filename": "/usr/local/lib/python3.12/multiprocessing/popen_fork.py", "lineno": 66}
{"category": "DeprecationWarning", "message": "This process (pid=99) is multi-threaded, use of fork() may lead to deadlocks in the child.", "node_id": "tests/providers/celery/executors/test_celery_kubernetes_executor.py::TestCeleryKubernetesExecutor::test_queue_command", "filename": "/usr/local/lib/python3.12/multiprocessing/popen_fork.py", "lineno": 66}
{"category": "DeprecationWarning", "message": "This process (pid=99) is multi-threaded, use of fork() may lead to deadlocks in the child.", "node_id": "tests/providers/celery/executors/test_celery_kubernetes_executor.py::TestCeleryKubernetesExecutor::test_job_id_setter", "filename": "/usr/local/lib/python3.12/multiprocessing/popen_fork.py", "lineno": 66}
{"category": "DeprecationWarning", "message": "This process (pid=99) is multi-threaded, use of fork() may lead to deadlocks in the child.", "node_id": "tests/providers/celery/executors/test_celery_kubernetes_executor.py::TestCeleryKubernetesExecutor::test_send_callback", "filename": "/usr/local/lib/python3.12/multiprocessing/popen_fork.py", "lineno": 66} |
This PR is a result of complete rework on warning capture system:
tests/warnings.txt
regardless of the current working directory.stacklevel
if it set incorrectly than it might come to the non-expected categoryairflow/providers/
airflow/
tests/
The only things the same with pytest-capture-warnings is an idea, so I remove license headers, if some one have any objections feel free to ping me to return it.
Output before
Output after
Sample output of Finalize tests / Summarize warnings
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rst
or{issue_number}.significant.rst
, in newsfragments.