[ 
https://issues.apache.org/jira/browse/AIRFLOW-5207?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Marcus Levine updated AIRFLOW-5207:
-----------------------------------
    Description: 
When trying to clear a task after upgrading to `1.10.4`, I get the following 
traceback:
{code:java}
File "/usr/local/lib/python3.7/site-packages/airflow/www/views.py", line 1451, 
in failed future, past, State.FAILED) File 
"/usr/local/lib/python3.7/site-packages/airflow/www/views.py", line 1396, in 
_mark_task_instance_state task.dag = dag File 
"/usr/local/lib/python3.7/site-packages/airflow/models/baseoperator.py", line 
509, in dag "The DAG assigned to {} can not be changed.".format(self)) 
airflow.exceptions.AirflowException: The DAG assigned to <Task(SubDagOperator): 
my-dag> can not be changed.{code}
This should be a simple fix by either dropping the offending line, or if it is 
required to keep things working, just set the private attribute instead:
{code:java}
task._dag = dag
{code}

  was:
When trying to clear a task after upgrading to `1.10.4`, I get the following 
traceback:
{code:java}
File "/usr/local/lib/python3.7/site-packages/airflow/www/views.py", line 1451, 
in failed future, past, State.FAILED) File 
"/usr/local/lib/python3.7/site-packages/airflow/www/views.py", line 1396, in 
_mark_task_instance_state task.dag = dag File 
"/usr/local/lib/python3.7/site-packages/airflow/models/baseoperator.py", line 
509, in dag "The DAG assigned to {} can not be changed.".format(self)) 
airflow.exceptions.AirflowException: The DAG assigned to <Task(SubDagOperator): 
my-dag> can not be changed.{code}
This should be a simple fix by either dropping the `task.dag = dag` line, or if 
it is required to keep things working, just set the private attribute instead: 
`task._dag = dag`


> Mark Success and Mark Failed views error out due to DAG reassignment
> --------------------------------------------------------------------
>
>                 Key: AIRFLOW-5207
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-5207
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: ui
>    Affects Versions: 1.10.4
>            Reporter: Marcus Levine
>            Assignee: Marcus Levine
>            Priority: Major
>             Fix For: 1.10.5
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> When trying to clear a task after upgrading to `1.10.4`, I get the following 
> traceback:
> {code:java}
> File "/usr/local/lib/python3.7/site-packages/airflow/www/views.py", line 
> 1451, in failed future, past, State.FAILED) File 
> "/usr/local/lib/python3.7/site-packages/airflow/www/views.py", line 1396, in 
> _mark_task_instance_state task.dag = dag File 
> "/usr/local/lib/python3.7/site-packages/airflow/models/baseoperator.py", line 
> 509, in dag "The DAG assigned to {} can not be changed.".format(self)) 
> airflow.exceptions.AirflowException: The DAG assigned to 
> <Task(SubDagOperator): my-dag> can not be changed.{code}
> This should be a simple fix by either dropping the offending line, or if it 
> is required to keep things working, just set the private attribute instead:
> {code:java}
> task._dag = dag
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to