This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 8f8565fac0 Airflow 3: processor_poll_interval deprecated parameter
usage removal (#41096)
8f8565fac0 is described below
commit 8f8565fac03122659cc827a9847d49d8e67eb186
Author: Gopal Dirisala <[email protected]>
AuthorDate: Mon Aug 19 05:00:27 2024 +0530
Airflow 3: processor_poll_interval deprecated parameter usage removal
(#41096)
* processor_poll_interval deprecated parameter usage removal
* news fragment added
* news fragment added
* news fragment added
* Update newsfragments/41096.significant.rst
Co-authored-by: Jarek Potiuk <[email protected]>
* Update 41096.significant.rst
---------
Co-authored-by: Jarek Potiuk <[email protected]>
---
airflow/configuration.py | 1 -
airflow/jobs/scheduler_job_runner.py | 12 +-----------
newsfragments/41096.significant.rst | 1 +
3 files changed, 2 insertions(+), 12 deletions(-)
diff --git a/airflow/configuration.py b/airflow/configuration.py
index 618f5185db..27534f78e8 100644
--- a/airflow/configuration.py
+++ b/airflow/configuration.py
@@ -363,7 +363,6 @@ class AirflowConfigParser(ConfigParser):
("metrics", "statsd_datadog_metrics_tags"): ("scheduler",
"statsd_datadog_metrics_tags", "2.6.0"),
("metrics", "statsd_custom_client_path"): ("scheduler",
"statsd_custom_client_path", "2.0.0"),
("scheduler", "parsing_processes"): ("scheduler", "max_threads",
"1.10.14"),
- ("scheduler", "scheduler_idle_sleep_time"): ("scheduler",
"processor_poll_interval", "2.2.0"),
("operators", "default_queue"): ("celery", "default_queue", "2.1.0"),
("core", "hide_sensitive_var_conn_fields"): ("admin",
"hide_sensitive_variable_fields", "2.1.0"),
("core", "sensitive_var_conn_names"): ("admin",
"sensitive_variable_fields", "2.1.0"),
diff --git a/airflow/jobs/scheduler_job_runner.py
b/airflow/jobs/scheduler_job_runner.py
index 497e1d045e..baf91dc40d 100644
--- a/airflow/jobs/scheduler_job_runner.py
+++ b/airflow/jobs/scheduler_job_runner.py
@@ -40,7 +40,7 @@ from airflow import settings
from airflow.callbacks.callback_requests import DagCallbackRequest,
SlaCallbackRequest, TaskCallbackRequest
from airflow.callbacks.pipe_callback_sink import PipeCallbackSink
from airflow.configuration import conf
-from airflow.exceptions import RemovedInAirflow3Warning,
UnknownExecutorException
+from airflow.exceptions import UnknownExecutorException
from airflow.executors.executor_loader import ExecutorLoader
from airflow.jobs.base_job_runner import BaseJobRunner
from airflow.jobs.job import Job, perform_heartbeat
@@ -165,7 +165,6 @@ class SchedulerJobRunner(BaseJobRunner, LoggingMixin):
scheduler_idle_sleep_time: float = conf.getfloat("scheduler",
"scheduler_idle_sleep_time"),
do_pickle: bool = False,
log: logging.Logger | None = None,
- processor_poll_interval: float | None = None,
):
super().__init__(job)
self.subdir = subdir
@@ -174,15 +173,6 @@ class SchedulerJobRunner(BaseJobRunner, LoggingMixin):
# number of times. This is only to support testing, and isn't
something a user is likely to want to
# configure -- they'll want num_runs
self.num_times_parse_dags = num_times_parse_dags
- if processor_poll_interval:
- # TODO: Remove in Airflow 3.0
- warnings.warn(
- "The 'processor_poll_interval' parameter is deprecated. "
- "Please use 'scheduler_idle_sleep_time'.",
- RemovedInAirflow3Warning,
- stacklevel=2,
- )
- scheduler_idle_sleep_time = processor_poll_interval
self._scheduler_idle_sleep_time = scheduler_idle_sleep_time
# How many seconds do we wait for tasks to heartbeat before mark them
as zombies.
self._zombie_threshold_secs = conf.getint("scheduler",
"scheduler_zombie_task_threshold")
diff --git a/newsfragments/41096.significant.rst
b/newsfragments/41096.significant.rst
new file mode 100644
index 0000000000..1d63fa7740
--- /dev/null
+++ b/newsfragments/41096.significant.rst
@@ -0,0 +1 @@
+Removed deprecated ``processor_poll_interval`` configuration parameter from
``scheduler`` section. Please use ``scheduler_idle_sleep_time`` configuration
parameter.