guan404ming commented on issue #54157:
URL: https://github.com/apache/airflow/issues/54157#issuecomment-3187766907
Reproduced by using this example below and fixed by #54462
```py
from __future__ import annotations
import datetime
from textwrap import dedent
import pendulum
from airflow.providers.standard.operators.bash import BashOperator
from airflow.providers.standard.operators.empty import EmptyOperator
from airflow.sdk import DAG
with DAG(
dag_id="error_185",
schedule="0 0 * * *",
start_date=pendulum.datetime(2021, 1, 1, tz="UTC"),
catchup=False,
dagrun_timeout=datetime.timedelta(minutes=60),
tags=[
"example",
"example2",
"example3",
"example4",
"example5",
"example6",
"example7",
"example8",
],
params={"example_key": "example_value"},
) as dag:
run_this_last = EmptyOperator(
task_id="run_this_last",
)
# [START howto_operator_bash]
run_this = BashOperator(
task_id="run_after_loop",
bash_command=dedent("""
echo "Running the starting task"
for i in {1..5000}; do
echo "ERROR: Dummy message $i"
done
exit 1
"""),
)
# [END howto_operator_bash]
run_this >> run_this_last
for i in range(3):
task = BashOperator(
task_id=f"runme_{i}",
bash_command='echo "https://www.google.com/"',
)
task >> run_this
# [START howto_operator_bash_template]
also_run_this = BashOperator(
task_id="also_run_this",
bash_command='echo "ti_key={{ task_instance_key_str }}"',
)
# [END howto_operator_bash_template]
also_run_this >> run_this_last
# [START howto_operator_bash_skip]
this_will_skip = BashOperator(
task_id="this_will_skip",
bash_command='echo "hello world"; exit 99;',
dag=dag,
)
# [END howto_operator_bash_skip]
this_will_skip >> run_this_last
```
https://github.com/user-attachments/assets/0ced05ce-f516-4a70-b5c6-5c639ad1a8fe
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]