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/12/05 03:07:54 UTC

[GitHub] [airflow] potiuk commented on a diff in pull request #28097: logging poke info when external dag is not none and task_id and task_ids are none

potiuk commented on code in PR #28097:
URL: https://github.com/apache/airflow/pull/28097#discussion_r1039105739


##########
airflow/sensors/external_task.py:
##########
@@ -199,18 +199,17 @@ def poke(self, context, session=None):
         dttm_filter = self._get_dttm_filter(context)
         serialized_dttm_filter = ",".join(dt.isoformat() for dt in dttm_filter)
 
-        if self.external_task_ids:
+        if self.external_task_group_id:
             self.log.info(
-                "Poking for tasks %s in dag %s on %s ... ",
-                self.external_task_ids,
+                "Poking for task_group '%s' in dag '%s' on %s ... ",
+                self.external_task_group_id,
                 self.external_dag_id,
                 serialized_dttm_filter,
             )
-
-        if self.external_task_group_id:
+        else:
             self.log.info(
-                "Poking for task_group '%s' in dag '%s' on %s ... ",
-                self.external_task_group_id,
+                "Poking for tasks %s in dag %s on %s ... ",

Review Comment:
   I thin, we should change the log and  it should be "Poking for DAG"  if task_id is None according to documentation of the Sensor. We should likely also fali the sensor when both  task_id and group_id are specified.



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