You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/03/29 09:45:53 UTC

[GitHub] [airflow] ashb commented on a change in pull request #22396: Fix /rendered-templates for mapped operator

ashb commented on a change in pull request #22396:
URL: https://github.com/apache/airflow/pull/22396#discussion_r837273983



##########
File path: airflow/models/taskinstance.py
##########
@@ -1495,8 +1496,9 @@ def _update_ti_state_for_sensing(self, session=NEW_SESSION):
         # Raise exception for sensing state
         raise AirflowSmartSensorException("Task successfully registered in smart sensor.")
 
-    def _execute_task(self, context, task_copy):
+    def _execute_task(self, context, task_orig):
         """Executes Task (optionally with a Timeout) and pushes Xcom results"""
+        task_copy = self.task

Review comment:
       This looks suspect - it isn't a copy anymore but the same object.
   
   (It might make sense in the full diff, but I can't easily see that on the mobile view)

##########
File path: airflow/models/mappedoperator.py
##########
@@ -225,7 +226,7 @@ def expand(self, **mapped_kwargs: "Mappable") -> "MappedOperator":
 class MappedOperator(AbstractOperator):
     """Object representing a mapped operator in a DAG."""
 
-    operator_class: Union[Type["BaseOperator"], str]
+    operator_class: Union[Type["BaseOperator"], Dict[str, Any]]

Review comment:
       This feels like this is doing too many different things now. Maybe we should have two separate attrs instead?




-- 
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