Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
d229669
move bash operator to standard provider
romsharon98 Aug 18, 2024
e8ca295
add source-date-epoch
romsharon98 Aug 19, 2024
7145726
change core to essentials
romsharon98 Aug 19, 2024
c251c00
revert external task sensor location
romsharon98 Aug 19, 2024
a5f5a57
add provider to airflow_providers_bug_report list
romsharon98 Aug 21, 2024
963a6aa
change new provider name to standard
romsharon98 Aug 25, 2024
01592e0
add integration
romsharon98 Aug 25, 2024
2fce0ff
revert hatch_build
romsharon98 Aug 25, 2024
8d961a3
move examples back to airflow core
romsharon98 Aug 25, 2024
40e07f1
change sensors example dags paths
romsharon98 Aug 26, 2024
dd596a4
remove init
romsharon98 Aug 26, 2024
540a714
revert howto docs
romsharon98 Aug 26, 2024
5ca8772
change provider as not-ready
romsharon98 Sep 7, 2024
8cd7442
add changelog
romsharon98 Sep 15, 2024
e577f57
move bash operator and sensor to standard provider
gopidesupavan Sep 16, 2024
1480721
updated airflow version and resolved rebasing failures
gopidesupavan Sep 18, 2024
6cad91e
fix selective check tests for bash
gopidesupavan Sep 18, 2024
079c4bb
Added BashOperator in compat.py to work with old imports
gopidesupavan Sep 19, 2024
eeac347
import bash operator with old module
gopidesupavan Sep 19, 2024
a5d4551
update selective checks and imports in test_utils
gopidesupavan Sep 19, 2024
e444409
fix 2.8.4 compat tests
gopidesupavan Sep 19, 2024
ef21111
add bashoperator import from compat to miscellaneous_test_dag
gopidesupavan Sep 19, 2024
4fae08c
fix openlineage test utils test
gopidesupavan Sep 19, 2024
1aa32b5
revert pre-commit removed imports
gopidesupavan Sep 19, 2024
4439931
remove example_branch_datetime_operator from exclusions in pre-commit…
gopidesupavan Sep 19, 2024
1496477
import bashoperator using test utils compat in views/utils
gopidesupavan Sep 19, 2024
a66b2dd
fix openlineage tests for compat and selective checks
gopidesupavan Sep 20, 2024
5f987f7
add standard provider package build in basic-tests.yml to test python…
gopidesupavan Sep 20, 2024
d0dec46
copy the standard provider package into the k8s image build to enable…
gopidesupavan Sep 20, 2024
eda4101
remove standard provider copy command from kubernetes commands
gopidesupavan Sep 21, 2024
78fb004
remove core folder from standard provider
gopidesupavan Sep 21, 2024
d2c1c39
remove core folder from standard provider tests
gopidesupavan Sep 22, 2024
167fc72
updating pre-commit hook to allow standard provider imports in core e…
gopidesupavan Sep 22, 2024
2c9bfce
adding standard provider to hatch_build pre_installed_provider
gopidesupavan Sep 23, 2024
ea25162
skipping k8s tests and adding empty operator example to use temporary…
gopidesupavan Sep 24, 2024
f9aa11f
skipping docker test test_trigger_dag_and_wait_for_result temporarily
gopidesupavan Sep 24, 2024
70a3bf2
remove skipif from k8s and docker tests
gopidesupavan Oct 3, 2024
e06b84f
update missing provider in hatch_build
gopidesupavan Oct 3, 2024
46f7f4a
fix rebase issues: adding typechecking
gopidesupavan Oct 3, 2024
d2328ec
fix rebase issues: remove extra imports from test_views_tasks
gopidesupavan Oct 3, 2024
1912463
fix rebase issues: remove example_datasets
gopidesupavan Oct 3, 2024
9f99690
fix imports in example_assets
gopidesupavan Oct 3, 2024
0372b03
update standard version to PRE_INSTALLED_PROVIDERS
gopidesupavan Oct 4, 2024
2797a58
updating prod-image-build file to install standard provider inside co…
gopidesupavan Oct 4, 2024
f6c6bf8
update standard provider in prod_image_installed_providers
gopidesupavan Oct 4, 2024
13d80c2
adding standard provider to CHICKEN_EGG_PROVIDERS in global constants
gopidesupavan Oct 4, 2024
76442b7
remove version from hatch build
gopidesupavan Oct 4, 2024
726518b
add missing standard provider in prod_image_installed_providers
gopidesupavan Oct 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/basic-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,11 @@ jobs:
breeze release-management prepare-provider-packages fab --package-format wheel --skip-tag-check
- name: "Install Airflow with fab for webserver tests"
run: pip install . dist/apache_airflow_providers_fab-*.whl
- name: "Prepare Standard provider packages: wheel"
run: >
breeze release-management prepare-provider-packages standard --package-format wheel --skip-tag-check
- name: "Install Airflow with standard provider for webserver tests"
run: pip install . dist/apache_airflow_providers_standard-*.whl
- name: "Install Python client"
run: pip install ./dist/apache_airflow_client-*.whl
- name: "Initialize Airflow DB and start webserver"
Expand Down
14 changes: 3 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -550,17 +550,9 @@ repos:
- id: check-no-providers-in-core-examples
language: pygrep
name: No providers imports in core example DAGs
description: The core example DAGs have no dependencies other than core Airflow
entry: "^\\s*from airflow\\.providers.*"
description: The core example DAGs have no dependencies other than standard provider or core Airflow
entry: "^\\s*from airflow\\.providers.(?!standard.)"
pass_filenames: true
exclude: >
(?x)
^airflow/example_dags/example_branch_datetime_operator.py|
^airflow/example_dags/example_branch_day_of_week_operator.py|
^airflow/example_dags/example_sensors.py|
^airflow/example_dags/example_sensors.py|
^airflow/example_dags/example_sensors.py|
^airflow/example_dags/example_time_delta_sensor_async.py
files: ^airflow/example_dags/.*\.py$
- id: check-no-airflow-deprecation-in-providers
language: pygrep
Expand Down Expand Up @@ -717,7 +709,7 @@ repos:
files: >
(?x)
^airflow/providers/.*\.py$
exclude: ^.*/.*_vendor/
exclude: ^.*/.*_vendor/|airflow/providers/standard/operators/bash.py
- id: check-get-lineage-collector-providers
language: python
name: Check providers import hook lineage code from compat
Expand Down
2 changes: 1 addition & 1 deletion airflow/decorators/bash.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from typing import Any, Callable, Collection, Mapping, Sequence

from airflow.decorators.base import DecoratedOperator, TaskDecorator, task_decorator_factory
from airflow.operators.bash import BashOperator
from airflow.providers.standard.operators.bash import BashOperator
from airflow.utils.context import Context, context_merge
from airflow.utils.operator_helpers import determine_kwargs
from airflow.utils.types import NOTSET
Expand Down
2 changes: 1 addition & 1 deletion airflow/example_dags/example_assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@

from airflow.assets import Asset
from airflow.models.dag import DAG
from airflow.operators.bash import BashOperator
from airflow.providers.standard.operators.bash import BashOperator
from airflow.timetables.assets import AssetOrTimeSchedule
from airflow.timetables.trigger import CronTriggerTimetable

Expand Down
2 changes: 1 addition & 1 deletion airflow/example_dags/example_bash_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
import pendulum

from airflow.models.dag import DAG
from airflow.operators.bash import BashOperator
from airflow.operators.empty import EmptyOperator
from airflow.providers.standard.operators.bash import BashOperator

with DAG(
dag_id="example_bash_operator",
Expand Down
2 changes: 1 addition & 1 deletion airflow/example_dags/example_complex.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

from airflow.models.baseoperator import chain
from airflow.models.dag import DAG
from airflow.operators.bash import BashOperator
from airflow.providers.standard.operators.bash import BashOperator

with DAG(
dag_id="example_complex",
Expand Down
2 changes: 1 addition & 1 deletion airflow/example_dags/example_inlet_event_extra.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from airflow.assets import Asset
from airflow.decorators import task
from airflow.models.dag import DAG
from airflow.operators.bash import BashOperator
from airflow.providers.standard.operators.bash import BashOperator

asset = Asset("s3://output/1.txt")

Expand Down
2 changes: 1 addition & 1 deletion airflow/example_dags/example_outlet_event_extra.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from airflow.assets.metadata import Metadata
from airflow.decorators import task
from airflow.models.dag import DAG
from airflow.operators.bash import BashOperator
from airflow.providers.standard.operators.bash import BashOperator

ds = Asset("s3://output/1.txt")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

from airflow.decorators import task
from airflow.models.dag import DAG
from airflow.operators.bash import BashOperator
from airflow.providers.standard.operators.bash import BashOperator


@task(task_id="run_this")
Expand Down
4 changes: 2 additions & 2 deletions airflow/example_dags/example_sensors.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
import pendulum

from airflow.models.dag import DAG
from airflow.operators.bash import BashOperator
from airflow.providers.standard.operators.bash import BashOperator
from airflow.providers.standard.sensors.bash import BashSensor
from airflow.providers.standard.sensors.time import TimeSensor, TimeSensorAsync
from airflow.providers.standard.sensors.time_delta import TimeDeltaSensor, TimeDeltaSensorAsync
from airflow.providers.standard.sensors.weekday import DayOfWeekSensor
from airflow.sensors.bash import BashSensor
from airflow.sensors.filesystem import FileSensor
from airflow.sensors.python import PythonSensor
from airflow.utils.trigger_rule import TriggerRule
Expand Down
2 changes: 1 addition & 1 deletion airflow/example_dags/example_setup_teardown.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import pendulum

from airflow.models.dag import DAG
from airflow.operators.bash import BashOperator
from airflow.providers.standard.operators.bash import BashOperator
from airflow.utils.task_group import TaskGroup

with DAG(
Expand Down
2 changes: 1 addition & 1 deletion airflow/example_dags/example_task_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
import pendulum

from airflow.models.dag import DAG
from airflow.operators.bash import BashOperator
from airflow.operators.empty import EmptyOperator
from airflow.providers.standard.operators.bash import BashOperator
from airflow.utils.task_group import TaskGroup

# [START howto_task_group]
Expand Down
2 changes: 1 addition & 1 deletion airflow/example_dags/example_trigger_target_dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

from airflow.decorators import task
from airflow.models.dag import DAG
from airflow.operators.bash import BashOperator
from airflow.providers.standard.operators.bash import BashOperator


@task(task_id="run_this")
Expand Down
2 changes: 1 addition & 1 deletion airflow/example_dags/example_xcom.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from airflow.decorators import task
from airflow.models.dag import DAG
from airflow.models.xcom_arg import XComArg
from airflow.operators.bash import BashOperator
from airflow.providers.standard.operators.bash import BashOperator

value_1 = [1, 2, 3]
value_2 = {"a": "b"}
Expand Down
2 changes: 1 addition & 1 deletion airflow/example_dags/example_xcomargs.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

from airflow.decorators import task
from airflow.models.dag import DAG
from airflow.operators.bash import BashOperator
from airflow.providers.standard.operators.bash import BashOperator

log = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion airflow/example_dags/tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
from airflow.models.dag import DAG

# Operators; we need this to operate!
from airflow.operators.bash import BashOperator
from airflow.providers.standard.operators.bash import BashOperator

# [END import_module]

Expand Down
8 changes: 6 additions & 2 deletions airflow/providers/celery/executors/celery_executor_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,12 @@ def on_celery_import_modules(*args, **kwargs):

import airflow.jobs.local_task_job_runner
import airflow.macros
import airflow.operators.bash
import airflow.operators.python # noqa: F401
import airflow.operators.python

try:
import airflow.providers.standard.operators.bash
except ImportError:
import airflow.operators.bash # noqa: F401

with contextlib.suppress(ImportError):
import numpy # noqa: F401
Expand Down
6 changes: 5 additions & 1 deletion airflow/providers/edge/example_dags/integration_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,14 @@
from airflow.models.dag import DAG
from airflow.models.param import Param
from airflow.models.variable import Variable
from airflow.operators.bash import BashOperator
from airflow.operators.empty import EmptyOperator
from airflow.operators.python import PythonOperator

try:
from airflow.providers.standard.operators.bash import BashOperator
except ImportError:
from airflow.operators.bash import BashOperator # type: ignore[no-redef,attr-defined]

with DAG(
dag_id="integration_test",
dag_display_name="Integration Test",
Expand Down
3 changes: 2 additions & 1 deletion airflow/providers/openlineage/provider.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ config:
Exclude some Operators from emitting OpenLineage events by passing a string of semicolon separated
full import paths of Operators to disable.
type: string
example: "airflow.operators.bash.BashOperator;airflow.operators.python.PythonOperator"
example: "airflow.providers.standard.operators.bash.BashOperator;
airflow.operators.python.PythonOperator"
default: ""
version_added: 1.1.0
selective_enable:
Expand Down
File renamed without changes.
2 changes: 2 additions & 0 deletions airflow/providers/standard/provider.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ operators:
python-modules:
- airflow.providers.standard.operators.datetime
- airflow.providers.standard.operators.weekday
- airflow.providers.standard.operators.bash

sensors:
- integration-name: Standard
Expand All @@ -50,3 +51,4 @@ sensors:
- airflow.providers.standard.sensors.time_delta
- airflow.providers.standard.sensors.time
- airflow.providers.standard.sensors.weekday
- airflow.providers.standard.sensors.bash
File renamed without changes.
14 changes: 7 additions & 7 deletions dev/breeze/tests/test_selective_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -703,9 +703,9 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
id="Only Always and common providers tests should run when only common.io and tests/always changed",
),
pytest.param(
("airflow/operators/bash.py",),
("airflow/providers/standard/operators/bash.py",),
{
"affected-providers-list-as-string": None,
"affected-providers-list-as-string": "celery edge standard",
"all-python-versions": "['3.9']",
"all-python-versions-list-as-string": "3.9",
"python-versions": "['3.9']",
Expand All @@ -717,14 +717,14 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
"run-amazon-tests": "false",
"docs-build": "true",
"run-kubernetes-tests": "false",
"skip-pre-commits": "check-provider-yaml-valid,identity,lint-helm-chart,mypy-airflow,mypy-dev,mypy-docs,mypy-providers,"
"skip-pre-commits": "identity,lint-helm-chart,mypy-airflow,mypy-dev,mypy-docs,mypy-providers,"
"ts-compile-format-lint-ui,ts-compile-format-lint-www",
"upgrade-to-newer-dependencies": "false",
"parallel-test-types-list-as-string": "Always Core Operators Serialization",
"parallel-test-types-list-as-string": "Always Core Providers[celery,edge,standard] Serialization",
"needs-mypy": "true",
"mypy-folders": "['airflow']",
"mypy-folders": "['providers']",
},
id="Force Core and Serialization tests to run when airflow bash.py changed",
id="Providers standard tests and Serialization tests to run when airflow bash.py changed",
),
pytest.param(
("tests/operators/bash.py",),
Expand Down Expand Up @@ -1720,7 +1720,7 @@ def test_upgrade_to_newer_dependencies(
),
pytest.param(
("airflow/providers/celery/file.py",),
{"docs-list-as-string": "apache-airflow celery cncf.kubernetes"},
{"docs-list-as-string": "apache-airflow celery cncf.kubernetes standard"},
id="Celery python files changed",
),
pytest.param(
Expand Down
2 changes: 1 addition & 1 deletion dev/perf/dags/elastic_dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

from airflow.models.baseoperator import chain
from airflow.models.dag import DAG
from airflow.operators.bash import BashOperator
from airflow.providers.standard.operators.bash import BashOperator

# DAG File used in performance tests. Its shape can be configured by environment variables.
RE_TIME_DELTA = re.compile(
Expand Down
2 changes: 1 addition & 1 deletion dev/perf/dags/perf_dag_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import datetime

from airflow.models.dag import DAG
from airflow.operators.bash import BashOperator
from airflow.providers.standard.operators.bash import BashOperator

args = {
"owner": "airflow",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Example Code:

from datetime import datetime
from airflow import DAG
from airflow.operators.bash import BashOperator
from airflow.providers.standard.operators.bash import BashOperator
from airflow.providers.amazon.aws.notifications.chime import send_chime_notification

with DAG(
Expand Down
2 changes: 1 addition & 1 deletion docs/apache-airflow-providers-amazon/notifications/sns.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Example Code:

from datetime import datetime
from airflow import DAG
from airflow.operators.bash import BashOperator
from airflow.providers.standard.operators.bash import BashOperator
from airflow.providers.amazon.aws.notifications.sns import send_sns_notification

dag_failure_sns_notification = send_sns_notification(
Expand Down
2 changes: 1 addition & 1 deletion docs/apache-airflow-providers-amazon/notifications/sqs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Example Code:

from datetime import datetime, timezone
from airflow import DAG
from airflow.operators.bash import BashOperator
from airflow.providers.standard.operators.bash import BashOperator
from airflow.providers.amazon.aws.notifications.sqs import send_sqs_notification

dag_failure_sqs_notification = send_sqs_notification(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Example Code:

from datetime import datetime
from airflow import DAG
from airflow.operators.bash import BashOperator
from airflow.providers.standard.operators.bash import BashOperator
from airflow.providers.apprise.notifications.apprise import send_apprise_notification
from apprise import NotifyType

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Example Code

from datetime import datetime
from airflow import DAG
from airflow.operators.bash import BashOperator
from airflow.providers.standard.operators.bash import BashOperator
from airflow.providers.atlassian.jira.notifications.jira import send_jira_notification

with DAG(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ instead.
You can use :ref:`Jinja templating <concepts:jinja-templating>` with the ``project_id`` and ``model``
fields to dynamically determine their values. The result are saved to :ref:`XCom <concepts:xcom>`,
allowing them to be used by other operators. In this case, the
:class:`~airflow.operators.bash.BashOperator` is used to print the model information.
:class:`~airflow.providers.standard.operators.bash.BashOperator` is used to print the model information.

.. exampleinclude:: /../../tests/system/providers/google/cloud/ml_engine/example_mlengine.py
:language: python
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ Also for this action you can use sensor in the deferrable mode:
:start-after: [START howto_operator_gcp_pubsub_pull_message_with_operator]
:end-before: [END howto_operator_gcp_pubsub_pull_message_with_operator]

To pull messages from XCom use the :class:`~airflow.operators.bash.BashOperator`.
To pull messages from XCom use the :class:`~airflow.providers.standard.operators.bash.BashOperator`.

.. exampleinclude:: /../../tests/system/providers/google/cloud/pubsub/example_pubsub.py
:language: python
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ An Operator inside the Airflow DAG can be annotated with inlets and outlets like
import pendulum

from airflow import DAG
from airflow.operators.bash import BashOperator
from airflow.providers.standard.operators.bash import BashOperator
from airflow.lineage.entities import Table, File, Column, User


Expand Down
4 changes: 2 additions & 2 deletions docs/apache-airflow-providers-openlineage/guides/user.rst
Original file line number Diff line number Diff line change
Expand Up @@ -257,13 +257,13 @@ full import paths of Airflow Operators to disable as ``disabled_for_operators``

[openlineage]
transport = {"type": "http", "url": "http://example.com:5000", "endpoint": "api/v1/lineage"}
disabled_for_operators = 'airflow.operators.bash.BashOperator;airflow.operators.python.PythonOperator'
disabled_for_operators = 'airflow.providers.standard.operators.bash.BashOperator;airflow.operators.python.PythonOperator'

``AIRFLOW__OPENLINEAGE__DISABLED_FOR_OPERATORS`` environment variable is an equivalent.

.. code-block:: ini

AIRFLOW__OPENLINEAGE__DISABLED_FOR_OPERATORS='airflow.operators.bash.BashOperator;airflow.operators.python.PythonOperator'
AIRFLOW__OPENLINEAGE__DISABLED_FOR_OPERATORS='airflow.providers.standard.operators.bash.BashOperator;airflow.operators.python.PythonOperator'

Full Task Info
^^^^^^^^^^^^^^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Example Code:

from datetime import datetime
from airflow import DAG
from airflow.operators.bash import BashOperator
from airflow.providers.standard.operators.bash import BashOperator
from airflow.providers.pagerduty.notifications.pagerduty import send_pagerduty_notification

with DAG(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Example Code:

from datetime import datetime
from airflow import DAG
from airflow.operators.bash import BashOperator
from airflow.providers.standard.operators.bash import BashOperator
from airflow.providers.slack.notifications.slack import send_slack_notification

with DAG(
Expand Down
Loading