diff --git a/providers/src/airflow/providers/airbyte/CHANGELOG.rst b/providers/src/airflow/providers/airbyte/CHANGELOG.rst index 5c530c6b4c66f..a3a3a9eb58749 100644 --- a/providers/src/airflow/providers/airbyte/CHANGELOG.rst +++ b/providers/src/airflow/providers/airbyte/CHANGELOG.rst @@ -26,6 +26,15 @@ Changelog --------- +main +..... + +.. warning:: + All deprecated classes, parameters, and features have been removed from the Airbyte provider package. + The following breaking changes were introduced: + + * Removed ``polling_interval`` parameter from ``AirbyteJobSensor``. Use the ``poke_interval`` parameter instead. + 4.0.0 ..... diff --git a/providers/src/airflow/providers/airbyte/sensors/airbyte.py b/providers/src/airflow/providers/airbyte/sensors/airbyte.py index ad658ef47e376..bb524fc322598 100644 --- a/providers/src/airflow/providers/airbyte/sensors/airbyte.py +++ b/providers/src/airflow/providers/airbyte/sensors/airbyte.py @@ -20,14 +20,13 @@ from __future__ import annotations import time -import warnings from collections.abc import Sequence from typing import TYPE_CHECKING, Any from airbyte_api.models import JobStatusEnum from airflow.configuration import conf -from airflow.exceptions import AirflowException, AirflowProviderDeprecationWarning +from airflow.exceptions import AirflowException from airflow.providers.airbyte.hooks.airbyte import AirbyteHook from airflow.providers.airbyte.triggers.airbyte import AirbyteSyncTrigger from airflow.sensors.base import BaseSensorOperator @@ -61,20 +60,10 @@ def __init__( ) -> None: if deferrable: if "poke_interval" not in kwargs: - # TODO: Remove once deprecated - if "polling_interval" in kwargs: - kwargs["poke_interval"] = kwargs["polling_interval"] - warnings.warn( - "Argument `poll_interval` is deprecated and will be removed " - "in a future release. Please use `poke_interval` instead.", - AirflowProviderDeprecationWarning, - stacklevel=2, - ) - else: - kwargs["poke_interval"] = 5 - - if "timeout" not in kwargs: - kwargs["timeout"] = 60 * 60 * 24 * 7 + kwargs["poke_interval"] = 5 + + if "timeout" not in kwargs: + kwargs["timeout"] = 60 * 60 * 24 * 7 super().__init__(**kwargs) self.deferrable = deferrable diff --git a/providers/tests/airbyte/sensors/test_airbyte.py b/providers/tests/airbyte/sensors/test_airbyte.py index 96a06ab0c6bb6..aefa0b568b327 100644 --- a/providers/tests/airbyte/sensors/test_airbyte.py +++ b/providers/tests/airbyte/sensors/test_airbyte.py @@ -106,3 +106,15 @@ def test_cancelled(self, mock_get_job): sensor.poke(context={}) mock_get_job.assert_called_once_with(request=GetJobRequest(job_id=self.job_id)) + + def test_airbyte_job_sensor_init(self): + """Test initializing AirbyteJobSensor with `poke_interval`.""" + sensor = AirbyteJobSensor( + task_id="test_sensor", + airbyte_job_id=1, + deferrable=True, + poke_interval=10, + timeout=3600, + ) + assert sensor.poke_interval == 10 + assert sensor.timeout == 3600