From 10e34d348e15666a7d231bfbca2d1ffd555e7c63 Mon Sep 17 00:00:00 2001 From: Andrey Anshin Date: Tue, 30 Apr 2024 22:30:59 +0400 Subject: [PATCH] Do not provide deprecated `execution_date` in `@apply_lineage` (#39327) --- airflow/lineage/__init__.py | 8 ++------ tests/deprecations_ignore.yml | 7 ------- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/airflow/lineage/__init__.py b/airflow/lineage/__init__.py index 1ca6ad0604f65..6500d8008ea46 100644 --- a/airflow/lineage/__init__.py +++ b/airflow/lineage/__init__.py @@ -82,14 +82,10 @@ def wrapper(self, context, *args, **kwargs): inlets = list(self.inlets) if outlets: - self.xcom_push( - context, key=PIPELINE_OUTLETS, value=outlets, execution_date=context["ti"].execution_date - ) + self.xcom_push(context, key=PIPELINE_OUTLETS, value=outlets) if inlets: - self.xcom_push( - context, key=PIPELINE_INLETS, value=inlets, execution_date=context["ti"].execution_date - ) + self.xcom_push(context, key=PIPELINE_INLETS, value=inlets) if _backend: _backend.send_lineage(operator=self, inlets=self.inlets, outlets=self.outlets, context=context) diff --git a/tests/deprecations_ignore.yml b/tests/deprecations_ignore.yml index 5e1432357ecea..cb49483657ff9 100644 --- a/tests/deprecations_ignore.yml +++ b/tests/deprecations_ignore.yml @@ -162,18 +162,14 @@ - tests/models/test_skipmixin.py::TestSkipMixin::test_raise_exception_on_not_valid_branch_task_ids - tests/models/test_skipmixin.py::TestSkipMixin::test_skip_all_except - tests/models/test_skipmixin.py::TestSkipMixin::test_skip_none_dagrun -- tests/models/test_taskinstance.py::TestTaskInstance::test_changing_of_dataset_when_ddrq_is_already_populated - tests/models/test_taskinstance.py::TestTaskInstance::test_context_triggering_dataset_events - tests/models/test_taskinstance.py::TestTaskInstance::test_get_num_running_task_instances - tests/models/test_taskinstance.py::TestTaskInstance::test_get_previous_start_date_none - tests/models/test_taskinstance.py::TestTaskInstance::test_handle_failure - tests/models/test_taskinstance.py::TestTaskInstance::test_handle_failure_fail_stop -- tests/models/test_taskinstance.py::TestTaskInstance::test_outlet_datasets - tests/models/test_taskinstance.py::TestTaskInstance::test_template_with_custom_timetable_deprecated_context - tests/models/test_taskinstance.py::TestTaskInstance::test_xcom_pull - tests/models/test_taskinstance.py::TestTaskInstance::test_xcom_pull_different_execution_date -- tests/models/test_taskinstance.py::TestTaskInstance::test_outlet_dataset_extra -- tests/models/test_taskinstance.py::TestTaskInstance::test_outlet_dataset_extra_ignore_different - tests/models/test_timestamp.py::test_timestamp_behaviour - tests/models/test_timestamp.py::test_timestamp_behaviour_with_timezone - tests/models/test_xcom.py::TestXCom::test_set_serialize_call_old_signature @@ -361,15 +357,12 @@ - tests/decorators/test_python.py::TestAirflowTaskDecorator::test_python_callable_arguments_are_templatized - tests/decorators/test_python.py::TestAirflowTaskDecorator::test_python_callable_keyword_arguments_are_templatized - tests/decorators/test_python.py::TestAirflowTaskDecorator::test_xcom_arg -- tests/decorators/test_python.py::test_task_decorator_dataset - tests/decorators/test_python_virtualenv.py::TestPythonVirtualenvDecorator::test_no_system_site_packages - tests/decorators/test_python_virtualenv.py::TestPythonVirtualenvDecorator::test_python_3 - tests/decorators/test_python_virtualenv.py::TestPythonVirtualenvDecorator::test_system_site_packages - tests/decorators/test_python_virtualenv.py::TestPythonVirtualenvDecorator::test_unpinned_requirements - tests/decorators/test_python_virtualenv.py::TestPythonVirtualenvDecorator::test_with_requirements_file - tests/decorators/test_python_virtualenv.py::TestPythonVirtualenvDecorator::test_with_requirements_pinned -- tests/lineage/test_lineage.py::TestLineage::test_lineage_is_sent_to_backend -- tests/listeners/test_dataset_listener.py::test_dataset_listener_on_dataset_changed_gets_calls - tests/sensors/test_external_task_sensor.py::TestExternalTaskSensor::test_external_dag_sensor - tests/sensors/test_external_task_sensor.py::TestExternalTaskSensor::test_external_dag_sensor_log - tests/sensors/test_external_task_sensor.py::TestExternalTaskSensor::test_external_dag_sensor_soft_fail_as_skipped