Anurag-S1ngh commented on code in PR #77087:
URL: https://github.com/apache/airflow/pull/77087#discussion_r4756620416


##########
airflow-core/src/airflow/config_templates/config.yml:
##########
@@ -3215,6 +3215,25 @@ triggerer:
       type: integer
       example: ~
       default: "500"
+    failed_trigger_retry_delay:
+      description: |
+        Base delay, in seconds, before a failed trigger is re-created. The 
actual delay grows with the
+        trigger's consecutive failure count and is capped by ``[triggerer] 
failed_trigger_retry_max_delay``.
+        Deferred tasks' triggers still fail their task right away; this only 
delays re-creating the trigger.
+        Triggers sharing a stream back off together, so they are re-created as 
one group.

Review Comment:
   Removed from both descriptions in fee64bc6.



##########
airflow-core/src/airflow/jobs/triggerer_job_runner.py:
##########
@@ -844,8 +888,14 @@ def _handle_request(self, msg: ToTriggerSupervisor, log: 
FilteringBoundLogger, r
                 self.failed_triggers.extend(msg.failures)
                 now = time.monotonic()
                 for trigger_id, _ in msg.failures:
-                    self.failure_tracker.record_failure(trigger_id, now)
+                    consecutive = 
self.failure_tracker.record_failure(trigger_id, now)
                     self.recovered_triggers.discard(trigger_id)
+                    log.info(
+                        "Trigger failed, re-creating it once its backoff has 
passed",

Review Comment:
   Skipped for task triggers in aa13211. The backoff only applies to triggers 
that get re-created, so the line is now logged for watchers and callbacks. 
Added a test for a deferred task's trigger.



##########
airflow-core/src/airflow/jobs/triggerer_job_runner.py:
##########
@@ -1285,7 +1324,17 @@ def update_triggers(self, requested_trigger_ids: 
set[int]):
         )
 
         if new_trigger_ids:
-            workloads_to_create = self.build_trigger_workloads(new_trigger_ids)
+            now = time.monotonic()
+            ready_ids = {tid for tid in new_trigger_ids if 
self.failure_tracker.attempt_ready(tid, now)}

Review Comment:
   Opening a follow-up issue with that behaviour and why it needs the stream 
key in the supervisor.



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