RNHTTR commented on code in PR #30375:
URL: https://github.com/apache/airflow/pull/30375#discussion_r1157712035


##########
airflow/jobs/scheduler_job.py:
##########
@@ -152,6 +152,43 @@ def __init__(
         self._zombie_threshold_secs = conf.getint("scheduler", 
"scheduler_zombie_task_threshold")
         self._standalone_dag_processor = conf.getboolean("scheduler", 
"standalone_dag_processor")
         self._dag_stale_not_seen_duration = conf.getint("scheduler", 
"dag_stale_not_seen_duration")
+
+        # Since the functionality for stalled_task_timeout, 
task_adoption_timeout, and worker_pods_pending_timeout
+        # are now handled by a single config (task_queued_timeout), we can't 
deprecate them as we normally would.
+        # So, we'll read each config and take the max value in order to ensure 
we're not undercutting a legitimate
+        # use of any of these configs.
+        stalled_task_timeout = conf.getfloat("celery", "stalled_task_timeout", 
fallback=0)
+        if stalled_task_timeout:
+            # TODO: Remove in Airflow 3.0
+            warnings.warn(
+                "The 'stalled_task_timeout' parameter is deprecated. "
+                "Please use 'scheduler.task_queued_timeout'.",
+                RemovedInAirflow3Warning,
+                stacklevel=2,

Review Comment:
   Based on [this 
comment](https://github.com/apache/airflow/pull/30375#discussion_r1157632498), 
I'm not sure it would make sense to deprecate in this manner in case one of 
these timeouts is intentionally set longer than whatever default is chosen for 
`task_queued_timeout`



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