Skip to content

Commit

Permalink
Airflow 3: processor_poll_interval deprecated parameter usage removal (
Browse files Browse the repository at this point in the history
…apache#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]>
  • Loading branch information
2 people authored and romsharon98 committed Aug 20, 2024
1 parent bb29583 commit 3dd0b4d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
1 change: 0 additions & 1 deletion airflow/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,6 @@ def sensitive_config_values(self) -> Set[tuple[str, str]]: # noqa: UP006
("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"),
Expand Down
12 changes: 1 addition & 11 deletions airflow/jobs/scheduler_job_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
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
Expand Down Expand Up @@ -165,7 +165,6 @@ def __init__(
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
Expand All @@ -174,15 +173,6 @@ def __init__(
# 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")
Expand Down
1 change: 1 addition & 0 deletions newsfragments/41096.significant.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Removed deprecated ``processor_poll_interval`` configuration parameter from ``scheduler`` section. Please use ``scheduler_idle_sleep_time`` configuration parameter.

0 comments on commit 3dd0b4d

Please sign in to comment.