You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Bolke de Bruin (JIRA)" <ji...@apache.org> on 2016/06/06 19:38:20 UTC

[jira] [Commented] (AIRFLOW-214) TaskInstance can get detached in process_dag

    [ https://issues.apache.org/jira/browse/AIRFLOW-214?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15317063#comment-15317063 ] 

Bolke de Bruin commented on AIRFLOW-214:
----------------------------------------

The PR works, that is for sure. I do not understand why the task can get detached in the first place. Session should be consistent and it happens right after dagrun.get_task_instances. It does not happen every time but I could replicate it with example_skip_dag, but couldnt fix it by keeping the current session.

> TaskInstance can get detached in process_dag
> --------------------------------------------
>
>                 Key: AIRFLOW-214
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-214
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: scheduler
>            Reporter: Bolke de Bruin
>             Fix For: Airflow 1.8
>
>
> Is some rare occasions the TaskInstance can get detached in process_dag. It is unclear why
> {code}[2016-06-06 17:47:37,048] {models.py:3444} INFO - Updating state for <DagRun example_skip_dag @ 2016-06-05 00:00:00: scheduled__2016-06-05T00:00:00, externally triggered: False> considering 8 task(s)
> [2016-06-06 17:47:37,059] {jobs.py:670} ERROR - Instance <TaskInstance at 0x10d3e9410> is not bound to a Session; attribute refresh operation cannot proceed
> Traceback (most recent call last):
>   File "/Users/bolke/Documents/dev/airflow_env/lib/python2.7/site-packages/airflow-1.7.1.2-py2.7.egg/airflow/jobs.py", line 667, in _do_dags
>     self.process_dag(dag, tis_out)
>   File "/Users/bolke/Documents/dev/airflow_env/lib/python2.7/site-packages/airflow-1.7.1.2-py2.7.egg/airflow/jobs.py", line 531, in process_dag
>     task = dag.get_task(ti.task_id)
>   File "/Users/bolke/Documents/dev/airflow_env/lib/python2.7/site-packages/sqlalchemy/orm/attributes.py", line 237, in __get__
>     return self.impl.get(instance_state(instance), dict_)
>   File "/Users/bolke/Documents/dev/airflow_env/lib/python2.7/site-packages/sqlalchemy/orm/attributes.py", line 578, in get
>     value = state._load_expired(state, passive)
>   File "/Users/bolke/Documents/dev/airflow_env/lib/python2.7/site-packages/sqlalchemy/orm/state.py", line 474, in _load_expired
>     self.manager.deferred_scalar_loader(self, toload)
>   File "/Users/bolke/Documents/dev/airflow_env/lib/python2.7/site-packages/sqlalchemy/orm/loading.py", line 610, in load_scalar_attributes
>     (state_str(state)))
> DetachedInstanceError: Instance <TaskInstance at 0x10d3e9410> is not bound to a Session; attribute refresh operation cannot proceed{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)