yuqian90 commented on issue #7324: [AIRFLOW-6704] Set TaskInstance.operator in constructor URL: https://github.com/apache/airflow/pull/7324#issuecomment-581137326 > Should we remove the other place where it was set? I think we should keep them unless it's obvious some of them are redundant. From what I can tell, the constructor `__init__()` is not the only way a `TaskInstance` can be created. E.g. sometimes `TaskInstance.task` is not set when the `TaskInstance` is created from deserialization or be read from database via sqlalchemy. One place I think it should be kept is in `_run_raw_task`. If the DAG author changes the type of an existing task that has been executed before to another class, without changing the task_id, we probably want the next execution of the task to update the `TaskInstance.operator` to the new type. @ashb what do you think?
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
