shivaam commented on issue #71577:
URL: https://github.com/apache/airflow/issues/71577#issuecomment-5299424596

   > And one last thought I have not put any research into: are there any cases 
where we WANT per-test leaks? Maybe have a look and see if we ave any per-class 
fixtures that persist across a few tests but then do actually clean up after 
themselves at the end of the suite.
   
   Agreed that detector-first could help validate the enforcer baseline, but I 
don’t think the order is blocking. We can update the enforcer allowlist if the 
detector finds cases the initial scan missed in that PR.
   
   One correction to my earlier explanation, the detector compares primary 
keys, not just row counts. This catches replacing one row with another even 
when the total count stays the same. 
   I expanded it to all 57 loaded core tables and tested again. Across 500 
tests, the overhead was about 15 ms per test which is still acceptable. 
   
   I also checked class, module, and session fixtures that intentionally share 
rows across tests. Their rows appear in before snapshot as well, so they are 
not reported as leaks. A test leaving data for a later test would be reported, 
which is desirable because tests should not depend on execution order.
   
   We will keep the detector opt-in for now and it can help us triage existing 
problems and preventing leaks. 


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