potiuk commented on PR #43280:
URL: https://github.com/apache/airflow/pull/43280#issuecomment-2436459596

   > Actually, when I run the tests locally on main it also fails. Which is a 
relief but also frustrating. How is main not more broken in the CI of all other 
PRs and Canary builds?
   
   As discussed in slack - and for posterity.  This is another teeting problem 
after #42505 and later #43173.
   
   It is the result of accidentally triggering database initialization for 
xdist (parallel) tests - in your PR by plugin initialization, in main runnnig  
when BACKEND != none.
   
   A solution to that would be to force BACKEND to "none" and 
_AIRLFOW_SKIP_DB_TESTS to "true" in order to avoid all the DB autouse fixtures. 
But this is quite tricky as plugins passed with `-p` wil be initialized before 
conftest.py that could be used for it, also conftest.py cannot be put at 
top-level apparently because pytest has problems when several top-level tests 
folders have conftest.py - it will refuse to load them.
   
   We need to find a better solution - likely use different mechanism of Pytest 
to do imports - likely 
https://docs.pytest.org/en/7.1.x/explanation/pythonpath.html or maybe find some 
other creative ways of loading plugins from common place. Or maybe figure out a 
better way of sharing common test code.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to