Lee-W commented on code in PR #31757:
URL: https://github.com/apache/airflow/pull/31757#discussion_r1231925296


##########
airflow/jobs/triggerer_job_runner.py:
##########
@@ -608,6 +609,17 @@ async def run_trigger(self, trigger_id, trigger):
                 self.log.info("Trigger %s fired: %s", 
self.triggers[trigger_id]["name"], event)
                 self.triggers[trigger_id]["events"] += 1
                 self.events.append((trigger_id, event))
+        except asyncio.CancelledError as err:
+            trigger_timeout = trigger.task_instance.trigger_timeout
+            if trigger_timeout:
+                if not trigger_timeout.tzinfo:
+                    trigger_timeout = 
trigger_timeout.replace(tzinfo=timezone.utc)

Review Comment:
   Yep, I encounter the timezone issue after I change the fallback 
[here](https://github.com/apache/airflow/blob/6becb7031618867bc253aefc9e3e216629575d2d/airflow/jobs/scheduler_job_runner.py#L940)
 to 1.0 for testing.



##########
airflow/jobs/triggerer_job_runner.py:
##########
@@ -608,6 +609,17 @@ async def run_trigger(self, trigger_id, trigger):
                 self.log.info("Trigger %s fired: %s", 
self.triggers[trigger_id]["name"], event)
                 self.triggers[trigger_id]["events"] += 1
                 self.events.append((trigger_id, event))
+        except asyncio.CancelledError as err:
+            trigger_timeout = trigger.task_instance.trigger_timeout
+            if trigger_timeout:
+                if not trigger_timeout.tzinfo:
+                    trigger_timeout = 
trigger_timeout.replace(tzinfo=timezone.utc)

Review Comment:
   Yep, I encountered the timezone issue after I change the fallback 
[here](https://github.com/apache/airflow/blob/6becb7031618867bc253aefc9e3e216629575d2d/airflow/jobs/scheduler_job_runner.py#L940)
 to 1.0 for testing.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to