You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "SameerMesiah97 (via GitHub)" <gi...@apache.org> on 2026/07/25 20:20:56 UTC

[PR] Reuse existing ORM session when resolving OpenLineage dag_team_name [airflow]

SameerMesiah97 opened a new pull request, #70452:
URL: https://github.com/apache/airflow/pull/70452

   **Description**
   
   This is a follow-up to PR #69109, which introduced the `dag_team_name` field to the OpenLineage `airflowDagRun` run facet.
   
   This change updates the OpenLineage provider to reuse the existing SQLAlchemy session associated with the `DagRun` when resolving the `dag_team_name` field.
   
   **Rationale**
   
   During manual testing, it was discovered that creating a new managed session triggered Airflow's HA lock protection by performing an unexpected commit within the scheduler callback. Reusing the existing `DagRun` session ensures the lookup participates in the surrounding transaction while continuing to emit the `dag_team_name` field correctly.
   
   ###### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes (please specify the tool below)
   
   Generated-by: [GPT 5.5] following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Reuse existing ORM session when resolving OpenLineage dag_team_name [airflow]

Posted by "SameerMesiah97 (via GitHub)" <gi...@apache.org>.
SameerMesiah97 commented on PR #70452:
URL: https://github.com/apache/airflow/pull/70452#issuecomment-5131750298

   This has been closed as it has been superseded by PR #70772.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Reuse existing ORM session when resolving OpenLineage dag_team_name [airflow]

Posted by "SameerMesiah97 (via GitHub)" <gi...@apache.org>.
SameerMesiah97 commented on PR #70452:
URL: https://github.com/apache/airflow/pull/70452#issuecomment-5122177365

   > @SameerMesiah97 did you perhaps test openlineage event emission on actual multi team airflow deployment? I have a fix in #70626, as I think all the task level event emission crashes there. Can you confirm that is the case, as we're trying to access the DB from the worker currently ?
   
   I believe that PR just merged very recently. I will retest using the latest code from main and see if the original issue is resolved. If that is the case then this PR is no longer needed. 


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Reuse existing ORM session when resolving OpenLineage dag_team_name [airflow]

Posted by "SameerMesiah97 (via GitHub)" <gi...@apache.org>.
SameerMesiah97 closed pull request #70452: Reuse existing ORM session when resolving OpenLineage dag_team_name
URL: https://github.com/apache/airflow/pull/70452


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Reuse existing ORM session when resolving OpenLineage dag_team_name [airflow]

Posted by "kacpermuda (via GitHub)" <gi...@apache.org>.
kacpermuda commented on PR #70452:
URL: https://github.com/apache/airflow/pull/70452#issuecomment-5120844210

   @SameerMesiah97 did you perhaps test openlineage event emission on actual multi team airflow deployment? I have a fix in #70626, as I think all the task level event emission crashes there. Can you confirm that is the case, as we're trying to access the DB from the worker currently ?


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Reuse existing ORM session when resolving OpenLineage dag_team_name [airflow]

Posted by "kacpermuda (via GitHub)" <gi...@apache.org>.
kacpermuda commented on PR #70452:
URL: https://github.com/apache/airflow/pull/70452#issuecomment-5131527211

   I verified it myself, and yes, my previous PR was needed for sure, openlineage crashed on workers trying to access db. Also, the fix you're proposing here is needed as well, as on scheduler, the openlineage was failing with the commit locks message you mentioned. I applied this fix in #70772 and extended it a bit. Please take a look, I think we can close this one in favor of #70772 


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org