Skip to content

Commit

Permalink
Remove deprecated trigger rule (apache#43349)
Browse files Browse the repository at this point in the history
  • Loading branch information
shahar1 authored Nov 11, 2024
1 parent 084e29e commit c82a76e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion airflow/utils/trigger_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 5 additions & 0 deletions newsfragments/43368.significant.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Deprecated trigger rule ``TriggerRule.DUMMY`` removed

**Breaking Change**

The trigger rule ``TriggerRule.DUMMY`` was removed.
3 changes: 1 addition & 2 deletions tests/utils/test_trigger_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

0 comments on commit c82a76e

Please sign in to comment.