senapati484 commented on code in PR #77745:
URL: https://github.com/apache/airflow/pull/77745#discussion_r4734566718
##########
airflow-core/src/airflow/jobs/triggerer_job_runner.py:
##########
@@ -1992,14 +1992,23 @@ async def cleanup_finished_triggers(self) -> list[int]:
trigger=details["name"],
trigger_id=trigger_id,
)
- # See if this exited without sending an event, in which case
- # any task instances depending on it need to be failed
- if details["events"] == 0:
- self.log.error(
- "Trigger exited without sending an event. Dependent
tasks will be failed.",
- name=details["name"],
- trigger_id=trigger_id,
- )
+ # See if this exited without sending an event, or if a watcher
+ # failed after sending an event. A deferred task is resumed by
+ # its first event, but a watcher is restarted and must still
+ # record a failure so repeated crashes are visible.
+ if details["events"] == 0 or (details["is_watcher"] and
saved_exc is not None):
Review Comment:
Good catch. You are right that `is_watcher` also covers deferred
`BaseEventTrigger` tasks. I kept that flag unchanged for the existing watcher
metrics/shared-stream behavior and added a separate `is_asset_watcher` flag
derived from `workload.watched_assets`. The failure-after-event path now checks
only that flag, and the regression test covers a deferred `BaseEventTrigger`
versus an asset watcher. Updated in commit `9e863dd6`.
--
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]