From c82a76e2e359290d09cf8f518418bdb5f173bf8c Mon Sep 17 00:00:00 2001 From: Shahar Epstein <60007259+shahar1@users.noreply.github.com> Date: Mon, 11 Nov 2024 14:48:15 +0200 Subject: [PATCH] Remove deprecated trigger rule (#43349) --- .pre-commit-config.yaml | 3 ++- airflow/utils/trigger_rule.py | 1 - newsfragments/43368.significant.rst | 5 +++++ tests/utils/test_trigger_rule.py | 3 +-- 4 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 newsfragments/43368.significant.rst diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c25d99fedea4d..2df8f870eb4c7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -667,7 +667,8 @@ repos: ^.*RELEASE_NOTES\.rst$| ^contributing-docs/03_contributors_quick_start.rst$| ^.*\.(png|gif|jp[e]?g|tgz|lock)$| - git + git| + ^newsfragments/43368\.significant\.rst$ - id: check-base-operator-partial-arguments name: Check BaseOperator and partial() arguments language: python diff --git a/airflow/utils/trigger_rule.py b/airflow/utils/trigger_rule.py index 6ec37cba81870..ebd773fa932af 100644 --- a/airflow/utils/trigger_rule.py +++ b/airflow/utils/trigger_rule.py @@ -33,7 +33,6 @@ class TriggerRule(str, Enum): NONE_FAILED = "none_failed" NONE_FAILED_OR_SKIPPED = "none_failed_or_skipped" NONE_SKIPPED = "none_skipped" - DUMMY = "dummy" ALWAYS = "always" NONE_FAILED_MIN_ONE_SUCCESS = "none_failed_min_one_success" ALL_SKIPPED = "all_skipped" diff --git a/newsfragments/43368.significant.rst b/newsfragments/43368.significant.rst new file mode 100644 index 0000000000000..efc6240978e6d --- /dev/null +++ b/newsfragments/43368.significant.rst @@ -0,0 +1,5 @@ +Deprecated trigger rule ``TriggerRule.DUMMY`` removed + +**Breaking Change** + +The trigger rule ``TriggerRule.DUMMY`` was removed. diff --git a/tests/utils/test_trigger_rule.py b/tests/utils/test_trigger_rule.py index f1e4c5990c939..44eea6a8f7d47 100644 --- a/tests/utils/test_trigger_rule.py +++ b/tests/utils/test_trigger_rule.py @@ -34,11 +34,10 @@ def test_valid_trigger_rules(self): assert TriggerRule.is_valid(TriggerRule.NONE_FAILED) assert TriggerRule.is_valid(TriggerRule.NONE_FAILED_OR_SKIPPED) assert TriggerRule.is_valid(TriggerRule.NONE_SKIPPED) - assert TriggerRule.is_valid(TriggerRule.DUMMY) assert TriggerRule.is_valid(TriggerRule.ALWAYS) assert TriggerRule.is_valid(TriggerRule.NONE_FAILED_MIN_ONE_SUCCESS) assert TriggerRule.is_valid(TriggerRule.ALL_DONE_SETUP_SUCCESS) - assert len(TriggerRule.all_triggers()) == 14 + assert len(TriggerRule.all_triggers()) == 13 with pytest.raises(ValueError): TriggerRule("NOT_EXIST_TRIGGER_RULE")