You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2021/05/27 05:09:05 UTC
[airflow] branch master updated: Restores apply_defaults import in
base_sensor_operator (#16040)
This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/master by this push:
new 0f8f66e Restores apply_defaults import in base_sensor_operator (#16040)
0f8f66e is described below
commit 0f8f66eb6bb5fe7f91ecfaa2e93d4c3409813b61
Author: Jarek Potiuk <ja...@potiuk.com>
AuthorDate: Thu May 27 07:08:34 2021 +0200
Restores apply_defaults import in base_sensor_operator (#16040)
The GCSToLocalFilesystemOperator in Google Provider <=3.0.0 had wrong
import for apply_defaults. It used
`from airflow.sensors.base_sensor_operator import apply_defaults`
instead of
`from airflow.utils.decorators import apply_defaults`
When we removed apply_defaults in #15667, the base_sensor_operator
import was removed as well which made the GCSToLocalFilestystemOperator
stops working in 2.1.0
Fixes: #16035
---
airflow/sensors/base.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/airflow/sensors/base.py b/airflow/sensors/base.py
index 880a4ef..24e3699 100644
--- a/airflow/sensors/base.py
+++ b/airflow/sensors/base.py
@@ -36,6 +36,11 @@ from airflow.models.taskreschedule import TaskReschedule
from airflow.ti_deps.deps.ready_to_reschedule import ReadyToRescheduleDep
from airflow.utils import timezone
+# We need to keep the import here because GCSToLocalFilesystemOperator released in
+# Google Provider before 3.0.0 imported apply_defaults from here.
+# See https://github.com/apache/airflow/issues/16035
+from airflow.utils.decorators import apply_defaults # pylint: disable=unused-import
+
class BaseSensorOperator(BaseOperator, SkipMixin):
"""