apache-airflow-providers-standard 1.8.0rc1__tar.gz → 1.9.0rc1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of apache-airflow-providers-standard might be problematic. Click here for more details.
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/PKG-INFO +6 -6
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/README.rst +3 -3
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/docs/changelog.rst +18 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/docs/index.rst +1 -1
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/provider.yaml +4 -1
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/pyproject.toml +3 -3
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/__init__.py +1 -1
- apache_airflow_providers_standard-1.9.0rc1/src/airflow/providers/standard/decorators/stub.py +102 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/example_dags/example_bash_decorator.py +4 -11
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/get_provider_info.py +1 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/sensors/external_task.py +6 -1
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/tests/unit/standard/decorators/test_python.py +5 -6
- apache_airflow_providers_standard-1.9.0rc1/tests/unit/standard/decorators/test_stub.py +57 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/tests/unit/standard/operators/test_hitl.py +3 -3
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/tests/unit/standard/operators/test_python.py +4 -6
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/tests/unit/standard/sensors/test_external_task_sensor.py +42 -29
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/tests/unit/standard/sensors/test_time_delta.py +6 -2
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/tests/unit/standard/sensors/test_weekday.py +6 -2
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/tests/unit/standard/utils/test_sensor_helper.py +1 -2
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/docs/commits.rst +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/docs/conf.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/docs/configurations-ref.rst +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/docs/installing-providers-from-sources.rst +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/docs/operators/bash.rst +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/docs/operators/datetime.rst +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/docs/operators/index.rst +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/docs/operators/latest_only.rst +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/docs/operators/python.rst +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/docs/operators/trigger_dag_run.rst +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/docs/security.rst +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/docs/sensors/bash.rst +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/docs/sensors/datetime.rst +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/docs/sensors/external_task_sensor.rst +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/docs/sensors/file.rst +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/docs/sensors/index.rst +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/docs/sensors/python.rst +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/__init__.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/__init__.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/LICENSE +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/decorators/__init__.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/decorators/bash.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/decorators/branch_external_python.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/decorators/branch_python.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/decorators/branch_virtualenv.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/decorators/external_python.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/decorators/python.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/decorators/python_virtualenv.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/decorators/sensor.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/decorators/short_circuit.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/example_dags/__init__.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/example_dags/example_bash_operator.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/example_dags/example_branch_datetime_operator.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/example_dags/example_branch_day_of_week_operator.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/example_dags/example_branch_operator.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/example_dags/example_branch_operator_decorator.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/example_dags/example_external_task_child_deferrable.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/example_dags/example_external_task_marker_dag.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/example_dags/example_external_task_parent_deferrable.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/example_dags/example_hitl_operator.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/example_dags/example_latest_only.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/example_dags/example_python_decorator.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/example_dags/example_python_operator.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/example_dags/example_sensor_decorator.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/example_dags/example_sensors.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/example_dags/example_short_circuit_decorator.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/example_dags/example_short_circuit_operator.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/example_dags/example_trigger_controller_dag.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/example_dags/sql/__init__.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/example_dags/sql/sample.sql +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/exceptions.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/hooks/__init__.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/hooks/filesystem.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/hooks/package_index.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/hooks/subprocess.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/models/__init__.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/operators/__init__.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/operators/bash.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/operators/branch.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/operators/datetime.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/operators/empty.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/operators/hitl.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/operators/latest_only.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/operators/python.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/operators/smooth.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/operators/trigger_dagrun.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/operators/weekday.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/sensors/__init__.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/sensors/bash.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/sensors/date_time.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/sensors/filesystem.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/sensors/python.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/sensors/time.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/sensors/time_delta.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/sensors/weekday.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/triggers/__init__.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/triggers/external_task.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/triggers/file.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/triggers/hitl.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/triggers/temporal.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/utils/__init__.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/utils/python_virtualenv.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/utils/python_virtualenv_script.jinja2 +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/utils/sensor_helper.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/utils/skipmixin.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/utils/weekday.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/src/airflow/providers/standard/version_compat.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/tests/conftest.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/tests/unit/__init__.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/tests/unit/standard/__init__.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/tests/unit/standard/decorators/__init__.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/tests/unit/standard/decorators/test_bash.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/tests/unit/standard/decorators/test_branch_external_python.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/tests/unit/standard/decorators/test_branch_python.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/tests/unit/standard/decorators/test_branch_virtualenv.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/tests/unit/standard/decorators/test_external_python.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/tests/unit/standard/decorators/test_python_virtualenv.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/tests/unit/standard/decorators/test_sensor.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/tests/unit/standard/decorators/test_short_circuit.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/tests/unit/standard/hooks/__init__.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/tests/unit/standard/hooks/test_filesystem.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/tests/unit/standard/hooks/test_package_index.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/tests/unit/standard/hooks/test_subprocess.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/tests/unit/standard/operators/__init__.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/tests/unit/standard/operators/test_bash.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/tests/unit/standard/operators/test_branch_operator.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/tests/unit/standard/operators/test_datetime.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/tests/unit/standard/operators/test_latest_only_operator.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/tests/unit/standard/operators/test_smooth.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/tests/unit/standard/operators/test_trigger_dagrun.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/tests/unit/standard/operators/test_weekday.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/tests/unit/standard/sensors/__init__.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/tests/unit/standard/sensors/test_bash.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/tests/unit/standard/sensors/test_date_time.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/tests/unit/standard/sensors/test_filesystem.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/tests/unit/standard/sensors/test_python.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/tests/unit/standard/sensors/test_time.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/tests/unit/standard/test_exceptions.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/tests/unit/standard/triggers/__init__.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/tests/unit/standard/triggers/test_external_task.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/tests/unit/standard/triggers/test_file.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/tests/unit/standard/triggers/test_hitl.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/tests/unit/standard/triggers/test_temporal.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/tests/unit/standard/utils/__init__.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/tests/unit/standard/utils/test_python_virtualenv.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/tests/unit/standard/utils/test_skipmixin.py +0 -0
- {apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/tests/unit/standard/utils/test_weekday.py +0 -0
{apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: apache-airflow-providers-standard
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.9.0rc1
|
|
4
4
|
Summary: Provider package apache-airflow-providers-standard for Apache Airflow
|
|
5
5
|
Keywords: airflow-provider,standard,airflow,integration
|
|
6
6
|
Author-email: Apache Software Foundation <dev@airflow.apache.org>
|
|
@@ -22,8 +22,8 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
22
22
|
Classifier: Topic :: System :: Monitoring
|
|
23
23
|
Requires-Dist: apache-airflow>=2.10.0rc1
|
|
24
24
|
Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
|
|
25
|
-
Project-URL: Changelog, https://airflow.staged.apache.org/docs/apache-airflow-providers-standard/1.
|
|
26
|
-
Project-URL: Documentation, https://airflow.staged.apache.org/docs/apache-airflow-providers-standard/1.
|
|
25
|
+
Project-URL: Changelog, https://airflow.staged.apache.org/docs/apache-airflow-providers-standard/1.9.0/changelog.html
|
|
26
|
+
Project-URL: Documentation, https://airflow.staged.apache.org/docs/apache-airflow-providers-standard/1.9.0
|
|
27
27
|
Project-URL: Mastodon, https://fosstodon.org/@airflow
|
|
28
28
|
Project-URL: Slack Chat, https://s.apache.org/airflow-slack
|
|
29
29
|
Project-URL: Source Code, https://github.com/apache/airflow
|
|
@@ -54,7 +54,7 @@ Project-URL: YouTube, https://www.youtube.com/channel/UCSXwxpWZQ7XZ1WL3wqevChA/
|
|
|
54
54
|
|
|
55
55
|
Package ``apache-airflow-providers-standard``
|
|
56
56
|
|
|
57
|
-
Release: ``1.
|
|
57
|
+
Release: ``1.9.0``
|
|
58
58
|
|
|
59
59
|
|
|
60
60
|
Airflow Standard Provider
|
|
@@ -67,7 +67,7 @@ This is a provider package for ``standard`` provider. All classes for this provi
|
|
|
67
67
|
are in ``airflow.providers.standard`` python package.
|
|
68
68
|
|
|
69
69
|
You can find package information and changelog for the provider
|
|
70
|
-
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-standard/1.
|
|
70
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-standard/1.9.0/>`_.
|
|
71
71
|
|
|
72
72
|
Installation
|
|
73
73
|
------------
|
|
@@ -88,5 +88,5 @@ PIP package Version required
|
|
|
88
88
|
================== ==================
|
|
89
89
|
|
|
90
90
|
The changelog for the provider package can be found in the
|
|
91
|
-
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-standard/1.
|
|
91
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-standard/1.9.0/changelog.html>`_.
|
|
92
92
|
|
{apache_airflow_providers_standard-1.8.0rc1 → apache_airflow_providers_standard-1.9.0rc1}/README.rst
RENAMED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
|
|
24
24
|
Package ``apache-airflow-providers-standard``
|
|
25
25
|
|
|
26
|
-
Release: ``1.
|
|
26
|
+
Release: ``1.9.0``
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
Airflow Standard Provider
|
|
@@ -36,7 +36,7 @@ This is a provider package for ``standard`` provider. All classes for this provi
|
|
|
36
36
|
are in ``airflow.providers.standard`` python package.
|
|
37
37
|
|
|
38
38
|
You can find package information and changelog for the provider
|
|
39
|
-
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-standard/1.
|
|
39
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-standard/1.9.0/>`_.
|
|
40
40
|
|
|
41
41
|
Installation
|
|
42
42
|
------------
|
|
@@ -57,4 +57,4 @@ PIP package Version required
|
|
|
57
57
|
================== ==================
|
|
58
58
|
|
|
59
59
|
The changelog for the provider package can be found in the
|
|
60
|
-
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-standard/1.
|
|
60
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-standard/1.9.0/changelog.html>`_.
|
|
@@ -35,6 +35,24 @@
|
|
|
35
35
|
Changelog
|
|
36
36
|
---------
|
|
37
37
|
|
|
38
|
+
1.9.0
|
|
39
|
+
.....
|
|
40
|
+
|
|
41
|
+
Features
|
|
42
|
+
~~~~~~~~
|
|
43
|
+
|
|
44
|
+
* ``Add a '@task.stub' to allow tasks in other languages to be defined in dags (#56055)``
|
|
45
|
+
|
|
46
|
+
Misc
|
|
47
|
+
~~~~
|
|
48
|
+
|
|
49
|
+
* ``Move DagBag to airflow/dag_processing (#55139)``
|
|
50
|
+
|
|
51
|
+
.. Below changes are excluded from the changelog. Move them to
|
|
52
|
+
appropriate section above if needed. Do not delete the lines(!):
|
|
53
|
+
* ``Fix 'example_bash_decorator' DAG (#56020)``
|
|
54
|
+
* ``Enable pt011 rule 2 (#55749)``
|
|
55
|
+
|
|
38
56
|
1.8.0
|
|
39
57
|
.....
|
|
40
58
|
|
|
@@ -21,12 +21,13 @@ name: Standard
|
|
|
21
21
|
description: |
|
|
22
22
|
Airflow Standard Provider
|
|
23
23
|
state: ready
|
|
24
|
-
source-date-epoch:
|
|
24
|
+
source-date-epoch: 1758734916
|
|
25
25
|
# Note that those versions are maintained by release manager - do not update them manually
|
|
26
26
|
# with the exception of case where other provider in sources has >= new provider version.
|
|
27
27
|
# In such case adding >= NEW_VERSION and bumping to NEW_VERSION in a provider have
|
|
28
28
|
# to be done in the same PR
|
|
29
29
|
versions:
|
|
30
|
+
- 1.9.0
|
|
30
31
|
- 1.8.0
|
|
31
32
|
- 1.7.0
|
|
32
33
|
- 1.6.0
|
|
@@ -141,3 +142,5 @@ task-decorators:
|
|
|
141
142
|
name: sensor
|
|
142
143
|
- class-name: airflow.providers.standard.decorators.short_circuit.short_circuit_task
|
|
143
144
|
name: short_circuit
|
|
145
|
+
- class-name: airflow.providers.standard.decorators.stub.stub
|
|
146
|
+
name: stub
|
|
@@ -25,7 +25,7 @@ build-backend = "flit_core.buildapi"
|
|
|
25
25
|
|
|
26
26
|
[project]
|
|
27
27
|
name = "apache-airflow-providers-standard"
|
|
28
|
-
version = "1.
|
|
28
|
+
version = "1.9.0rc1"
|
|
29
29
|
description = "Provider package apache-airflow-providers-standard for Apache Airflow"
|
|
30
30
|
readme = "README.rst"
|
|
31
31
|
authors = [
|
|
@@ -95,8 +95,8 @@ apache-airflow-providers-common-sql = {workspace = true}
|
|
|
95
95
|
apache-airflow-providers-standard = {workspace = true}
|
|
96
96
|
|
|
97
97
|
[project.urls]
|
|
98
|
-
"Documentation" = "https://airflow.staged.apache.org/docs/apache-airflow-providers-standard/1.
|
|
99
|
-
"Changelog" = "https://airflow.staged.apache.org/docs/apache-airflow-providers-standard/1.
|
|
98
|
+
"Documentation" = "https://airflow.staged.apache.org/docs/apache-airflow-providers-standard/1.9.0"
|
|
99
|
+
"Changelog" = "https://airflow.staged.apache.org/docs/apache-airflow-providers-standard/1.9.0/changelog.html"
|
|
100
100
|
"Bug Tracker" = "https://github.com/apache/airflow/issues"
|
|
101
101
|
"Source Code" = "https://github.com/apache/airflow"
|
|
102
102
|
"Slack Chat" = "https://s.apache.org/airflow-slack"
|
|
@@ -29,7 +29,7 @@ from airflow import __version__ as airflow_version
|
|
|
29
29
|
|
|
30
30
|
__all__ = ["__version__"]
|
|
31
31
|
|
|
32
|
-
__version__ = "1.
|
|
32
|
+
__version__ = "1.9.0"
|
|
33
33
|
|
|
34
34
|
if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
|
|
35
35
|
"2.10.0"
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Licensed to the Apache Software Foundation (ASF) under one
|
|
2
|
+
# or more contributor license agreements. See the NOTICE file
|
|
3
|
+
# distributed with this work for additional information
|
|
4
|
+
# regarding copyright ownership. The ASF licenses this file
|
|
5
|
+
# to you under the Apache License, Version 2.0 (the
|
|
6
|
+
# "License"); you may not use this file except in compliance
|
|
7
|
+
# with the License. You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
|
12
|
+
# software distributed under the License is distributed on an
|
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
# KIND, either express or implied. See the License for the
|
|
15
|
+
# specific language governing permissions and limitations
|
|
16
|
+
# under the License.
|
|
17
|
+
|
|
18
|
+
from __future__ import annotations
|
|
19
|
+
|
|
20
|
+
import ast
|
|
21
|
+
from collections.abc import Callable
|
|
22
|
+
from typing import TYPE_CHECKING, Any
|
|
23
|
+
|
|
24
|
+
if TYPE_CHECKING:
|
|
25
|
+
from airflow.sdk.bases.decorator import DecoratedOperator, TaskDecorator, task_decorator_factory
|
|
26
|
+
else:
|
|
27
|
+
try:
|
|
28
|
+
from airflow.sdk.bases.decorator import DecoratedOperator, TaskDecorator, task_decorator_factory
|
|
29
|
+
except ModuleNotFoundError:
|
|
30
|
+
from airflow.decorators.base import (
|
|
31
|
+
DecoratedOperator,
|
|
32
|
+
TaskDecorator,
|
|
33
|
+
task_decorator_factory,
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
if TYPE_CHECKING:
|
|
37
|
+
from airflow.sdk.definitions.context import Context
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
class _StubOperator(DecoratedOperator):
|
|
41
|
+
custom_operator_name: str = "@task.stub"
|
|
42
|
+
|
|
43
|
+
def __init__(
|
|
44
|
+
self,
|
|
45
|
+
*,
|
|
46
|
+
python_callable: Callable,
|
|
47
|
+
task_id: str,
|
|
48
|
+
**kwargs,
|
|
49
|
+
) -> None:
|
|
50
|
+
super().__init__(
|
|
51
|
+
python_callable=python_callable,
|
|
52
|
+
task_id=task_id,
|
|
53
|
+
**kwargs,
|
|
54
|
+
)
|
|
55
|
+
# Validate python callable
|
|
56
|
+
module = ast.parse(self.get_python_source())
|
|
57
|
+
|
|
58
|
+
if len(module.body) != 1:
|
|
59
|
+
raise RuntimeError("Expected a single statement")
|
|
60
|
+
fn = module.body[0]
|
|
61
|
+
if not isinstance(fn, ast.FunctionDef):
|
|
62
|
+
raise RuntimeError("Expected a single sync function")
|
|
63
|
+
for stmt in fn.body:
|
|
64
|
+
if isinstance(stmt, ast.Pass):
|
|
65
|
+
continue
|
|
66
|
+
if isinstance(stmt, ast.Expr):
|
|
67
|
+
if isinstance(stmt.value, ast.Constant) and isinstance(stmt.value.value, (str, type(...))):
|
|
68
|
+
continue
|
|
69
|
+
|
|
70
|
+
raise ValueError(
|
|
71
|
+
f"Functions passed to @task.stub must be an empty function (`pass`, or `...` only) (got {stmt})"
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
...
|
|
75
|
+
|
|
76
|
+
def execute(self, context: Context) -> Any:
|
|
77
|
+
raise RuntimeError(
|
|
78
|
+
"@task.stub should not be executed directly -- we expected this to go to a remote worker. "
|
|
79
|
+
"Check your pool and worker configs"
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
def stub(
|
|
84
|
+
python_callable: Callable | None = None,
|
|
85
|
+
queue: str | None = None,
|
|
86
|
+
executor: str | None = None,
|
|
87
|
+
**kwargs,
|
|
88
|
+
) -> TaskDecorator:
|
|
89
|
+
"""
|
|
90
|
+
Define a stub task in the DAG.
|
|
91
|
+
|
|
92
|
+
Stub tasks exist in the Dag graph only, but the execution must happen in an external
|
|
93
|
+
environment via the Task Execution Interface.
|
|
94
|
+
|
|
95
|
+
"""
|
|
96
|
+
return task_decorator_factory(
|
|
97
|
+
decorated_operator_class=_StubOperator,
|
|
98
|
+
python_callable=python_callable,
|
|
99
|
+
queue=queue,
|
|
100
|
+
executor=executor,
|
|
101
|
+
**kwargs,
|
|
102
|
+
)
|
|
@@ -92,21 +92,14 @@ def example_bash_decorator():
|
|
|
92
92
|
# [END howto_decorator_bash_parametrize]
|
|
93
93
|
|
|
94
94
|
# [START howto_decorator_bash_build_cmd]
|
|
95
|
-
def _get_files_in_cwd() -> list[str]:
|
|
96
|
-
from pathlib import Path
|
|
97
|
-
|
|
98
|
-
dir_contents = Path.cwd().glob("airflow-core/src/airflow/example_dags/*.py")
|
|
99
|
-
files = [str(elem) for elem in dir_contents if elem.is_file()]
|
|
100
|
-
|
|
101
|
-
return files
|
|
102
|
-
|
|
103
95
|
@task.bash
|
|
104
96
|
def get_file_stats() -> str:
|
|
97
|
+
from pathlib import Path
|
|
105
98
|
from shlex import join
|
|
106
99
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
cmd = join(["stat",
|
|
100
|
+
# Get stats of the current DAG file itself
|
|
101
|
+
current_file = str(Path(__file__))
|
|
102
|
+
cmd = join(["stat", current_file])
|
|
110
103
|
|
|
111
104
|
return cmd
|
|
112
105
|
|
|
@@ -25,7 +25,6 @@ from typing import TYPE_CHECKING, Any, ClassVar
|
|
|
25
25
|
from airflow.configuration import conf
|
|
26
26
|
from airflow.exceptions import AirflowSkipException
|
|
27
27
|
from airflow.models.dag import DagModel
|
|
28
|
-
from airflow.models.dagbag import DagBag
|
|
29
28
|
from airflow.providers.standard.exceptions import (
|
|
30
29
|
DuplicateStateError,
|
|
31
30
|
ExternalDagDeletedError,
|
|
@@ -41,6 +40,7 @@ from airflow.providers.standard.triggers.external_task import WorkflowTrigger
|
|
|
41
40
|
from airflow.providers.standard.utils.sensor_helper import _get_count, _get_external_task_group_task_ids
|
|
42
41
|
from airflow.providers.standard.version_compat import (
|
|
43
42
|
AIRFLOW_V_3_0_PLUS,
|
|
43
|
+
AIRFLOW_V_3_1_PLUS,
|
|
44
44
|
BaseOperator,
|
|
45
45
|
BaseOperatorLink,
|
|
46
46
|
BaseSensorOperator,
|
|
@@ -51,6 +51,11 @@ from airflow.utils.state import State, TaskInstanceState
|
|
|
51
51
|
if not AIRFLOW_V_3_0_PLUS:
|
|
52
52
|
from airflow.utils.session import NEW_SESSION, provide_session
|
|
53
53
|
|
|
54
|
+
if AIRFLOW_V_3_1_PLUS:
|
|
55
|
+
from airflow.dag_processing.dagbag import DagBag
|
|
56
|
+
else:
|
|
57
|
+
from airflow.models.dagbag import DagBag # type: ignore[attr-defined, no-redef]
|
|
58
|
+
|
|
54
59
|
if TYPE_CHECKING:
|
|
55
60
|
from sqlalchemy.orm import Session
|
|
56
61
|
|
|
@@ -680,13 +680,11 @@ def test_mapped_decorator_shadow_context() -> None:
|
|
|
680
680
|
def print_info(message: str, run_id: str = "") -> None:
|
|
681
681
|
print(f"{run_id}: {message}")
|
|
682
682
|
|
|
683
|
-
with pytest.raises(ValueError)
|
|
683
|
+
with pytest.raises(ValueError, match=r"cannot call partial\(\) on task context variable 'run_id'"):
|
|
684
684
|
print_info.partial(run_id="hi")
|
|
685
|
-
assert str(ctx.value) == "cannot call partial() on task context variable 'run_id'"
|
|
686
685
|
|
|
687
|
-
with pytest.raises(ValueError)
|
|
686
|
+
with pytest.raises(ValueError, match=r"cannot call expand\(\) on task context variable 'run_id'"):
|
|
688
687
|
print_info.expand(run_id=["hi", "there"])
|
|
689
|
-
assert str(ctx.value) == "cannot call expand() on task context variable 'run_id'"
|
|
690
688
|
|
|
691
689
|
|
|
692
690
|
def test_mapped_decorator_wrong_argument() -> None:
|
|
@@ -702,9 +700,10 @@ def test_mapped_decorator_wrong_argument() -> None:
|
|
|
702
700
|
print_info.expand(wrong_name=["hi", "there"])
|
|
703
701
|
assert str(ct.value) == "expand() got an unexpected keyword argument 'wrong_name'"
|
|
704
702
|
|
|
705
|
-
with pytest.raises(
|
|
703
|
+
with pytest.raises(
|
|
704
|
+
ValueError, match=r"expand\(\) got an unexpected type 'str' for keyword argument 'message'"
|
|
705
|
+
):
|
|
706
706
|
print_info.expand(message="hi")
|
|
707
|
-
assert str(cv.value) == "expand() got an unexpected type 'str' for keyword argument 'message'"
|
|
708
707
|
|
|
709
708
|
|
|
710
709
|
def test_mapped_decorator():
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Licensed to the Apache Software Foundation (ASF) under one
|
|
2
|
+
# or more contributor license agreements. See the NOTICE file
|
|
3
|
+
# distributed with this work for additional information
|
|
4
|
+
# regarding copyright ownership. The ASF licenses this file
|
|
5
|
+
# to you under the Apache License, Version 2.0 (the
|
|
6
|
+
# "License"); you may not use this file except in compliance
|
|
7
|
+
# with the License. You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
|
12
|
+
# software distributed under the License is distributed on an
|
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
# KIND, either express or implied. See the License for the
|
|
15
|
+
# specific language governing permissions and limitations
|
|
16
|
+
# under the License.
|
|
17
|
+
from __future__ import annotations
|
|
18
|
+
|
|
19
|
+
import contextlib
|
|
20
|
+
|
|
21
|
+
import pytest
|
|
22
|
+
|
|
23
|
+
from airflow.providers.standard.decorators.stub import stub
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def fn_ellipsis(): ...
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def fn_pass(): ...
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def fn_doc():
|
|
33
|
+
"""Some string"""
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def fn_doc_pass():
|
|
37
|
+
"""Some string"""
|
|
38
|
+
pass
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def fn_code():
|
|
42
|
+
return None
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
@pytest.mark.parametrize(
|
|
46
|
+
("fn", "error"),
|
|
47
|
+
[
|
|
48
|
+
pytest.param(fn_ellipsis, contextlib.nullcontext(), id="ellipsis"),
|
|
49
|
+
pytest.param(fn_pass, contextlib.nullcontext(), id="pass"),
|
|
50
|
+
pytest.param(fn_doc, contextlib.nullcontext(), id="doc"),
|
|
51
|
+
pytest.param(fn_doc_pass, contextlib.nullcontext(), id="doc-and-pass"),
|
|
52
|
+
pytest.param(fn_code, pytest.raises(ValueError, match="must be an empty function"), id="not-empty"),
|
|
53
|
+
],
|
|
54
|
+
)
|
|
55
|
+
def test_stub_signature(fn, error):
|
|
56
|
+
with error:
|
|
57
|
+
stub(fn)()
|
|
@@ -316,7 +316,7 @@ class TestHITLOperator:
|
|
|
316
316
|
params={"input": 1},
|
|
317
317
|
)
|
|
318
318
|
|
|
319
|
-
with pytest.raises(ValueError):
|
|
319
|
+
with pytest.raises(ValueError, match="not exists"):
|
|
320
320
|
hitl_op.execute_complete(
|
|
321
321
|
context={},
|
|
322
322
|
event={
|
|
@@ -335,7 +335,7 @@ class TestHITLOperator:
|
|
|
335
335
|
params={"input": 1},
|
|
336
336
|
)
|
|
337
337
|
|
|
338
|
-
with pytest.raises(ValueError):
|
|
338
|
+
with pytest.raises(ValueError, match="no such key"):
|
|
339
339
|
hitl_op.execute_complete(
|
|
340
340
|
context={},
|
|
341
341
|
event={
|
|
@@ -442,7 +442,7 @@ class TestHITLOperator:
|
|
|
442
442
|
|
|
443
443
|
class TestApprovalOperator:
|
|
444
444
|
def test_init_with_options(self) -> None:
|
|
445
|
-
with pytest.raises(ValueError):
|
|
445
|
+
with pytest.raises(ValueError, match="Passing options to ApprovalOperator is not allowed."):
|
|
446
446
|
ApprovalOperator(
|
|
447
447
|
task_id="hitl_test",
|
|
448
448
|
subject="This is subject",
|
|
@@ -985,9 +985,10 @@ class BaseTestPythonVirtualenvOperator(BasePythonTest):
|
|
|
985
985
|
assert task.execute_callable() is False
|
|
986
986
|
|
|
987
987
|
def test_lambda(self):
|
|
988
|
-
with pytest.raises(
|
|
988
|
+
with pytest.raises(
|
|
989
|
+
ValueError, match="PythonVirtualenvOperator only supports functions for python_callable arg"
|
|
990
|
+
):
|
|
989
991
|
PythonVirtualenvOperator(python_callable=lambda x: 4, task_id=self.task_id)
|
|
990
|
-
assert str(info.value) == "PythonVirtualenvOperator only supports functions for python_callable arg"
|
|
991
992
|
|
|
992
993
|
def test_nonimported_as_arg(self):
|
|
993
994
|
def f(_):
|
|
@@ -1689,13 +1690,10 @@ class TestPythonVirtualenvOperator(BaseTestPythonVirtualenvOperator):
|
|
|
1689
1690
|
system_site_packages=False,
|
|
1690
1691
|
)
|
|
1691
1692
|
|
|
1692
|
-
with pytest.raises(ValueError
|
|
1693
|
+
with pytest.raises(ValueError, match=rf"Invalid requirement '{invalid_requirement}'"):
|
|
1693
1694
|
# Consume the generator to trigger parsing
|
|
1694
1695
|
list(op._iter_serializable_context_keys())
|
|
1695
1696
|
|
|
1696
|
-
msg = str(exc_info.value)
|
|
1697
|
-
assert f"Invalid requirement '{invalid_requirement}'" in msg
|
|
1698
|
-
|
|
1699
1697
|
@mock.patch("airflow.providers.standard.operators.python.PythonVirtualenvOperator._prepare_venv")
|
|
1700
1698
|
@mock.patch(
|
|
1701
1699
|
"airflow.providers.standard.operators.python.PythonVirtualenvOperator._execute_python_callable_in_subprocess"
|
|
@@ -27,7 +27,7 @@ import pytest
|
|
|
27
27
|
|
|
28
28
|
from airflow import settings
|
|
29
29
|
from airflow.exceptions import AirflowException, AirflowSensorTimeout, AirflowSkipException, TaskDeferred
|
|
30
|
-
from airflow.models import
|
|
30
|
+
from airflow.models import DagRun, TaskInstance
|
|
31
31
|
from airflow.models.dag import DAG
|
|
32
32
|
from airflow.models.serialized_dag import SerializedDagModel
|
|
33
33
|
from airflow.models.xcom_arg import XComArg
|
|
@@ -67,9 +67,11 @@ else:
|
|
|
67
67
|
from airflow.models import BaseOperator # type: ignore[assignment,no-redef]
|
|
68
68
|
|
|
69
69
|
if AIRFLOW_V_3_1_PLUS:
|
|
70
|
+
from airflow.dag_processing.dagbag import DagBag
|
|
70
71
|
from airflow.sdk import TaskGroup
|
|
71
72
|
from airflow.sdk.timezone import coerce_datetime, datetime
|
|
72
73
|
else:
|
|
74
|
+
from airflow.models.dagbag import DagBag # type: ignore[attr-defined, no-redef]
|
|
73
75
|
from airflow.utils.task_group import TaskGroup # type: ignore[no-redef]
|
|
74
76
|
from airflow.utils.timezone import coerce_datetime, datetime # type: ignore[attr-defined,no-redef]
|
|
75
77
|
|
|
@@ -86,6 +88,8 @@ DEV_NULL = "/dev/null"
|
|
|
86
88
|
TASK_ID = "external_task_sensor_check"
|
|
87
89
|
EXTERNAL_DAG_ID = "child_dag" # DAG the external task sensor is waiting on
|
|
88
90
|
EXTERNAL_TASK_ID = "child_task" # Task the external task sensor is waiting on
|
|
91
|
+
EXTERNAL_ID_AND_IDS_PROVIDE_ERROR = "Only one of `external_task_id` or `external_task_ids` may be provided to ExternalTaskSensor; use external_task_id or external_task_ids or external_task_group_id."
|
|
92
|
+
EXTERNAL_IDS_AND_TASK_GROUP_ID_PROVIDE_ERROR = "Only one of `external_task_group_id` or `external_task_ids` may be provided to ExternalTaskSensor; use external_task_id or external_task_ids or external_task_group_id."
|
|
89
93
|
|
|
90
94
|
|
|
91
95
|
@pytest.fixture(autouse=True)
|
|
@@ -203,7 +207,10 @@ class TestExternalTaskSensorV2:
|
|
|
203
207
|
op.run(start_date=DEFAULT_DATE, end_date=DEFAULT_DATE, ignore_ti_state=True)
|
|
204
208
|
|
|
205
209
|
def test_raise_with_external_task_sensor_task_id_and_task_ids(self):
|
|
206
|
-
with pytest.raises(
|
|
210
|
+
with pytest.raises(
|
|
211
|
+
ValueError,
|
|
212
|
+
match=EXTERNAL_ID_AND_IDS_PROVIDE_ERROR,
|
|
213
|
+
):
|
|
207
214
|
ExternalTaskSensor(
|
|
208
215
|
task_id="test_external_task_sensor_task_id_with_task_ids_failed_status",
|
|
209
216
|
external_dag_id=TEST_DAG_ID,
|
|
@@ -211,14 +218,9 @@ class TestExternalTaskSensorV2:
|
|
|
211
218
|
external_task_ids=TEST_TASK_ID,
|
|
212
219
|
dag=self.dag,
|
|
213
220
|
)
|
|
214
|
-
assert (
|
|
215
|
-
str(ctx.value) == "Only one of `external_task_id` or `external_task_ids` may "
|
|
216
|
-
"be provided to ExternalTaskSensor; "
|
|
217
|
-
"use external_task_id or external_task_ids or external_task_group_id."
|
|
218
|
-
)
|
|
219
221
|
|
|
220
222
|
def test_raise_with_external_task_sensor_task_group_and_task_id(self):
|
|
221
|
-
with pytest.raises(ValueError)
|
|
223
|
+
with pytest.raises(ValueError, match=EXTERNAL_IDS_AND_TASK_GROUP_ID_PROVIDE_ERROR):
|
|
222
224
|
ExternalTaskSensor(
|
|
223
225
|
task_id="test_external_task_sensor_task_group_with_task_id_failed_status",
|
|
224
226
|
external_dag_id=TEST_DAG_ID,
|
|
@@ -226,14 +228,9 @@ class TestExternalTaskSensorV2:
|
|
|
226
228
|
external_task_group_id=TEST_TASK_GROUP_ID,
|
|
227
229
|
dag=self.dag,
|
|
228
230
|
)
|
|
229
|
-
assert (
|
|
230
|
-
str(ctx.value) == "Only one of `external_task_group_id` or `external_task_ids` may "
|
|
231
|
-
"be provided to ExternalTaskSensor; "
|
|
232
|
-
"use external_task_id or external_task_ids or external_task_group_id."
|
|
233
|
-
)
|
|
234
231
|
|
|
235
232
|
def test_raise_with_external_task_sensor_task_group_and_task_ids(self):
|
|
236
|
-
with pytest.raises(ValueError)
|
|
233
|
+
with pytest.raises(ValueError, match=EXTERNAL_IDS_AND_TASK_GROUP_ID_PROVIDE_ERROR):
|
|
237
234
|
ExternalTaskSensor(
|
|
238
235
|
task_id="test_external_task_sensor_task_group_with_task_ids_failed_status",
|
|
239
236
|
external_dag_id=TEST_DAG_ID,
|
|
@@ -241,11 +238,6 @@ class TestExternalTaskSensorV2:
|
|
|
241
238
|
external_task_group_id=TEST_TASK_GROUP_ID,
|
|
242
239
|
dag=self.dag,
|
|
243
240
|
)
|
|
244
|
-
assert (
|
|
245
|
-
str(ctx.value) == "Only one of `external_task_group_id` or `external_task_ids` may "
|
|
246
|
-
"be provided to ExternalTaskSensor; "
|
|
247
|
-
"use external_task_id or external_task_ids or external_task_group_id."
|
|
248
|
-
)
|
|
249
241
|
|
|
250
242
|
# by default i.e. check_existence=False, if task_group doesn't exist, the sensor will run till timeout,
|
|
251
243
|
# this behaviour is similar to external_task_id doesn't exists
|
|
@@ -304,7 +296,10 @@ class TestExternalTaskSensorV2:
|
|
|
304
296
|
)
|
|
305
297
|
|
|
306
298
|
def test_external_task_sensor_wrong_failed_states(self):
|
|
307
|
-
with pytest.raises(
|
|
299
|
+
with pytest.raises(
|
|
300
|
+
ValueError,
|
|
301
|
+
match="Valid values for `allowed_states`, `skipped_states` and `failed_states` when `external_task_id` or `external_task_ids` or `external_task_group_id` is not `None`",
|
|
302
|
+
):
|
|
308
303
|
ExternalTaskSensor(
|
|
309
304
|
task_id="test_external_task_sensor_check",
|
|
310
305
|
external_dag_id=TEST_DAG_ID,
|
|
@@ -666,7 +661,10 @@ exit 0
|
|
|
666
661
|
def test_external_task_sensor_error_delta_and_fn(self):
|
|
667
662
|
self.add_time_sensor()
|
|
668
663
|
# Test that providing execution_delta and a function raises an error
|
|
669
|
-
with pytest.raises(
|
|
664
|
+
with pytest.raises(
|
|
665
|
+
ValueError,
|
|
666
|
+
match="Only one of `execution_delta` or `execution_date_fn` may be provided to ExternalTaskSensor; not both.",
|
|
667
|
+
):
|
|
670
668
|
ExternalTaskSensor(
|
|
671
669
|
task_id="test_external_task_sensor_check_delta",
|
|
672
670
|
external_dag_id=TEST_DAG_ID,
|
|
@@ -680,7 +678,10 @@ exit 0
|
|
|
680
678
|
def test_external_task_sensor_error_task_id_and_task_ids(self):
|
|
681
679
|
self.add_time_sensor()
|
|
682
680
|
# Test that providing execution_delta and a function raises an error
|
|
683
|
-
with pytest.raises(
|
|
681
|
+
with pytest.raises(
|
|
682
|
+
ValueError,
|
|
683
|
+
match=EXTERNAL_ID_AND_IDS_PROVIDE_ERROR,
|
|
684
|
+
):
|
|
684
685
|
ExternalTaskSensor(
|
|
685
686
|
task_id="test_external_task_sensor_task_id_and_task_ids",
|
|
686
687
|
external_dag_id=TEST_DAG_ID,
|
|
@@ -711,7 +712,7 @@ exit 0
|
|
|
711
712
|
allowed_states=["success"],
|
|
712
713
|
dag=self.dag,
|
|
713
714
|
)
|
|
714
|
-
with pytest.raises(ValueError):
|
|
715
|
+
with pytest.raises(ValueError, match="Duplicate task_ids"):
|
|
715
716
|
op1.run(start_date=DEFAULT_DATE, end_date=DEFAULT_DATE)
|
|
716
717
|
|
|
717
718
|
def test_catch_duplicate_task_ids_with_xcom_arg(self):
|
|
@@ -731,7 +732,7 @@ exit 0
|
|
|
731
732
|
dag=self.dag,
|
|
732
733
|
)
|
|
733
734
|
op1.run(start_date=DEFAULT_DATE, end_date=DEFAULT_DATE)
|
|
734
|
-
with pytest.raises(ValueError):
|
|
735
|
+
with pytest.raises(ValueError, match="Duplicate task_ids"):
|
|
735
736
|
op2.run(start_date=DEFAULT_DATE, end_date=DEFAULT_DATE)
|
|
736
737
|
|
|
737
738
|
def test_catch_duplicate_task_ids_with_multiple_xcom_args(self):
|
|
@@ -752,11 +753,14 @@ exit 0
|
|
|
752
753
|
dag=self.dag,
|
|
753
754
|
)
|
|
754
755
|
op1.run(start_date=DEFAULT_DATE, end_date=DEFAULT_DATE)
|
|
755
|
-
with pytest.raises(ValueError):
|
|
756
|
+
with pytest.raises(ValueError, match="Duplicate task_ids"):
|
|
756
757
|
op2.run(start_date=DEFAULT_DATE, end_date=DEFAULT_DATE)
|
|
757
758
|
|
|
758
759
|
def test_catch_invalid_allowed_states(self):
|
|
759
|
-
with pytest.raises(
|
|
760
|
+
with pytest.raises(
|
|
761
|
+
ValueError,
|
|
762
|
+
match="Valid values for `allowed_states`, `skipped_states` and `failed_states`",
|
|
763
|
+
):
|
|
760
764
|
ExternalTaskSensor(
|
|
761
765
|
task_id="test_external_task_sensor_check_1",
|
|
762
766
|
external_dag_id=TEST_DAG_ID,
|
|
@@ -765,7 +769,10 @@ exit 0
|
|
|
765
769
|
dag=self.dag,
|
|
766
770
|
)
|
|
767
771
|
|
|
768
|
-
with pytest.raises(
|
|
772
|
+
with pytest.raises(
|
|
773
|
+
ValueError,
|
|
774
|
+
match="Valid values for `allowed_states`, `skipped_states` and `failed_states`",
|
|
775
|
+
):
|
|
769
776
|
ExternalTaskSensor(
|
|
770
777
|
task_id="test_external_task_sensor_check_2",
|
|
771
778
|
external_dag_id=TEST_DAG_ID,
|
|
@@ -1185,7 +1192,10 @@ class TestExternalTaskSensorV3:
|
|
|
1185
1192
|
|
|
1186
1193
|
def test_external_task_sensor_invalid_combination(self, dag_maker):
|
|
1187
1194
|
"""Test that the sensor raises an error with invalid parameter combinations."""
|
|
1188
|
-
with pytest.raises(
|
|
1195
|
+
with pytest.raises(
|
|
1196
|
+
ValueError,
|
|
1197
|
+
match=EXTERNAL_ID_AND_IDS_PROVIDE_ERROR,
|
|
1198
|
+
):
|
|
1189
1199
|
with dag_maker("test_external_task_sensor_invalid_combination"):
|
|
1190
1200
|
ExternalTaskSensor(
|
|
1191
1201
|
task_id="test_external_task_sensor_check",
|
|
@@ -1195,7 +1205,10 @@ class TestExternalTaskSensorV3:
|
|
|
1195
1205
|
)
|
|
1196
1206
|
|
|
1197
1207
|
def test_external_task_sensor_invalid_state(self, dag_maker):
|
|
1198
|
-
with pytest.raises(
|
|
1208
|
+
with pytest.raises(
|
|
1209
|
+
ValueError,
|
|
1210
|
+
match="Valid values for `allowed_states`, `skipped_states` and `failed_states` when `external_task_id` or `external_task_ids` or `external_task_group_id` is not `None",
|
|
1211
|
+
):
|
|
1199
1212
|
with dag_maker("test_external_task_sensor_invalid_state"):
|
|
1200
1213
|
ExternalTaskSensor(
|
|
1201
1214
|
task_id="test_external_task_sensor_check",
|