Skip to content

Commit

Permalink
Remove generic trigger cancelled error log (#33874)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
pankajkoti authored Aug 29, 2023
1 parent ffc9854 commit 39c202f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions airflow/jobs/triggerer_job_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 39c202f

Please sign in to comment.