This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 02ba205cf4 Refactor BashOperator and Bash decorator for consistency
and simplicity (#39871)
02ba205cf4 is described below
commit 02ba205cf44ac9b5da471a8c343f57237f633041
Author: Nick de Vries <[email protected]>
AuthorDate: Tue May 28 06:13:22 2024 +0200
Refactor BashOperator and Bash decorator for consistency and simplicity
(#39871)
* Refactor example_bash_operator command for simplicity
* Refactor example_bash_decorator for consistency with the operator
counterpart
---
airflow/example_dags/example_bash_decorator.py | 2 +-
airflow/example_dags/example_bash_operator.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/airflow/example_dags/example_bash_decorator.py
b/airflow/example_dags/example_bash_decorator.py
index ee8151f337..85548ef6fd 100644
--- a/airflow/example_dags/example_bash_decorator.py
+++ b/airflow/example_dags/example_bash_decorator.py
@@ -38,7 +38,7 @@ def example_bash_decorator():
# [START howto_decorator_bash]
@task.bash
def run_after_loop() -> str:
- return "echo 1"
+ return "echo https://airflow.apache.org/"
run_this = run_after_loop()
# [END howto_decorator_bash]
diff --git a/airflow/example_dags/example_bash_operator.py
b/airflow/example_dags/example_bash_operator.py
index 4d45d9114f..b08d31c993 100644
--- a/airflow/example_dags/example_bash_operator.py
+++ b/airflow/example_dags/example_bash_operator.py
@@ -43,7 +43,7 @@ with DAG(
# [START howto_operator_bash]
run_this = BashOperator(
task_id="run_after_loop",
- bash_command="ls -alh --color=always / && echo
https://airflow.apache.org/ && echo 'some <code>html</code>'",
+ bash_command="echo https://airflow.apache.org/",
)
# [END howto_operator_bash]