From 876698569ec8451d1d1014eefeb231d10b9ebac4 Mon Sep 17 00:00:00 2001 From: Pankaj Koti Date: Tue, 29 Aug 2023 15:09:25 +0530 Subject: [PATCH] Remove generic trigger cancelled error log We tried to address #31720 in PR #31757. The issue talked about adding a trigger cancelled log when trigger timesout, but we also added a generic Trigger canceled log. This log appears even in successful runs of the triggers when they finish. This is confusing some users as the log level is Error and there are sometimes quite a few log lines saying "Trigger cancelled; err=" with giving no clue as to what is happening. So, I am removing this generic error log line and we can add specific cancel scenarios with detailed reasons when we implement those. --- airflow/jobs/triggerer_job_runner.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/airflow/jobs/triggerer_job_runner.py b/airflow/jobs/triggerer_job_runner.py index 610441be21213..ccc4508ff9ede 100644 --- a/airflow/jobs/triggerer_job_runner.py +++ b/airflow/jobs/triggerer_job_runner.py @@ -607,12 +607,11 @@ 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: + except asyncio.CancelledError: if timeout := trigger.task_instance.trigger_timeout: timeout = timeout.replace(tzinfo=timezone.utc) if not timeout.tzinfo else timeout if timeout < timezone.utcnow(): self.log.error("Trigger cancelled due to timeout") - self.log.error("Trigger cancelled; message=%s", err) raise finally: # CancelledError will get injected when we're stopped - which is