Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RENAMED fail_stop to fail_fast #45484

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
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
18 changes: 9 additions & 9 deletions tests/models/test_baseoperator.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,24 +71,24 @@ class TestBaseOperator:
def test_trigger_rule_validation(self):
from airflow.models.abstractoperator import DEFAULT_TRIGGER_RULE

fail_stop_dag = DAG(
fail_fast_dag = DAG(
dag_id="test_dag_trigger_rule_validation",
schedule=None,
start_date=DEFAULT_DATE,
fail_stop=True,
fail_fast_dag=True,
)
non_fail_stop_dag = DAG(
non_fail_fast_dag = DAG(
dag_id="test_dag_trigger_rule_validation",
schedule=None,
start_date=DEFAULT_DATE,
fail_stop=False,
fail_fast_dag=False,
)

# An operator with default trigger rule and a fail-stop dag should be allowed
BaseOperator(task_id="test_valid_trigger_rule", dag=fail_stop_dag, trigger_rule=DEFAULT_TRIGGER_RULE)
BaseOperator(task_id="test_valid_trigger_rule", dag=fail_fast_dag, trigger_rule=DEFAULT_TRIGGER_RULE)
# An operator with non default trigger rule and a non fail-stop dag should be allowed
BaseOperator(
task_id="test_valid_trigger_rule", dag=non_fail_stop_dag, trigger_rule=TriggerRule.ALWAYS
task_id="test_valid_trigger_rule", dag=non_fail_fast_dag, trigger_rule=TriggerRule.ALWAYS
)

def test_cross_downstream(self):
Expand Down Expand Up @@ -454,13 +454,13 @@ def get_states(dr):


@pytest.mark.db_test
def test_teardown_and_fail_stop(dag_maker):
def test_teardown_and_fail_fast(dag_maker):
"""
when fail_stop enabled, teardowns should run according to their setups.
when fail_fast enabled, teardowns should run according to their setups.
in this case, the second teardown skips because its setup skips.
"""

with dag_maker(fail_stop=True) as dag:
with dag_maker(fail_fast=True) as dag:
for num in (1, 2):
with TaskGroup(f"tg_{num}"):

Expand Down
Loading