[
https://issues.apache.org/jira/browse/AIRFLOW-3110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Subu updated AIRFLOW-3110:
--
Description:
Folks,
The below line ideally should have a
```
if not test_mode:
session.merge(self)
session.commit()
```
[https://github.com/HanaDB/incubator-airflow/blob/master/airflow/models.py#L1815]
before or after it.
Else as of today we are not able to access the latest session information using
sqlalchemy from failure callbacks.
I see the same in DAG callbacks as well - the session state is committed after
the callbacks.
https://github.com/apache/incubator-airflow/blob/27a8a92f5d51843681fa4b74197781fdbea6a8be/airflow/models.py#L5207
Could these locations be changed to commit before the callbacks?
I don't know if this change is safe because I lack context elsewhere -so
cutting a JIRA.
Thanks, Subu
was:
Folks,
The below line ideally should have a
```
if not test_mode:
session.merge(self)
session.commit()
```
[https://github.com/HanaDB/incubator-airflow/blob/master/airflow/models.py#L1815]
Else as of today we are not able to access the latest session information using
sqlalchemy from failure callbacks.
I don't know if this change is safe because I lack context elsewhere -so
cutting a JIRA.
Thanks, Subu
> Session not committed before failure callback, but is committed before
> success.
> ---
>
> Key: AIRFLOW-3110
> URL: https://issues.apache.org/jira/browse/AIRFLOW-3110
> Project: Apache Airflow
> Issue Type: Bug
>Reporter: Subu
>Priority: Major
>
> Folks,
> The below line ideally should have a
> ```
> if not test_mode:
> session.merge(self)
> session.commit()
> ```
> [https://github.com/HanaDB/incubator-airflow/blob/master/airflow/models.py#L1815]
> before or after it.
> Else as of today we are not able to access the latest session information
> using sqlalchemy from failure callbacks.
> I see the same in DAG callbacks as well - the session state is committed
> after the callbacks.
> https://github.com/apache/incubator-airflow/blob/27a8a92f5d51843681fa4b74197781fdbea6a8be/airflow/models.py#L5207
> Could these locations be changed to commit before the callbacks?
> I don't know if this change is safe because I lack context elsewhere -so
> cutting a JIRA.
>
> Thanks, Subu
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)