hussein-awala opened a new pull request, #40774:
URL: https://github.com/apache/airflow/pull/40774

   closes: #40773
   
   There is a session created in `DagRun.verify_integrity` method, these 
statements will be called:
   
https://github.com/apache/airflow/blob/8de5e7a6755559e2560000ac194153d612dd616e/airflow/models/dagrun.py#L1205-L1207
   
https://github.com/apache/airflow/blob/8de5e7a6755559e2560000ac194153d612dd616e/airflow/models/dagrun.py#L1334
   
https://github.com/apache/airflow/blob/8de5e7a6755559e2560000ac194153d612dd616e/airflow/models/taskinstance.py#L1933-L1936
   
   So if the decorator `provide_session` is used in the 
`PriorityWeightStrategy` class, a nested session will be created and committed, 
and the session created in `verify_integrity` will be somehow closed.
   
   In this PR I provide the session to `get_weight` method to make it more 
flexible without the mentioned issue.
   
   P.S: the future is still experimental.
   


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