You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/08/18 13:59:05 UTC

[GitHub] [airflow] raphaelauv opened a new pull request #17683: rename none_failed_or_skipped by none_failed_and_at_least_one_succeed

raphaelauv opened a new pull request #17683:
URL: https://github.com/apache/airflow/pull/17683


   next to this discussion -> https://github.com/apache/airflow/issues/17012
   
   I propose to rename the trigger rule to make it more explicit 


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] raphaelauv commented on a change in pull request #17683: rename none_failed_or_skipped by none_failed_and_at_least_one_succeed

Posted by GitBox <gi...@apache.org>.
raphaelauv commented on a change in pull request #17683:
URL: https://github.com/apache/airflow/pull/17683#discussion_r691505723



##########
File path: airflow/utils/trigger_rule.py
##########
@@ -32,6 +32,7 @@ class TriggerRule:
     NONE_SKIPPED = 'none_skipped'
     DUMMY = 'dummy'
     ALWAYS = 'always'
+    NONE_FAILED_AND_AT_LEAST_ONE_SUCCEED = "none_failed_and_at_least_one_succeed"

Review comment:
       `This is tooooo long` okay , any proposition ?
   
   I'm surprised by your second question , `none_failed` is not the same than `none_failed_or_skipped`, my PR is about renaming `none_failed_or_skipped` nothing else.




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] raphaelauv commented on pull request #17683: rename none_failed_or_skipped by none_failed_and_at_least_one_succeed

Posted by GitBox <gi...@apache.org>.
raphaelauv commented on pull request #17683:
URL: https://github.com/apache/airflow/pull/17683#issuecomment-901768678


   thanks for the review @kaxil , I updated the code


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] kaxil commented on a change in pull request #17683: Rename ``none_failed_or_skipped`` by ``none_failed_min_one_success`` trigger rule

Posted by GitBox <gi...@apache.org>.
kaxil commented on a change in pull request #17683:
URL: https://github.com/apache/airflow/pull/17683#discussion_r692229613



##########
File path: UPDATING.md
##########
@@ -89,6 +89,11 @@ installing Airflow, example for Python 3.8 and Airflow 2.1.2:
 pip install -U "apache-airflow[pandas]==2.1.2" \
   --constraint https://raw.githubusercontent.com/apache/airflow/constraints-2.1.2/constraints-3.8.txt"
 ```
+### `none_failed_or_skipped` trigger rule has been deprecated

Review comment:
       ```suggestion
   
   ### `none_failed_or_skipped` trigger rule has been deprecated
   ```

##########
File path: UPDATING.md
##########
@@ -89,6 +89,11 @@ installing Airflow, example for Python 3.8 and Airflow 2.1.2:
 pip install -U "apache-airflow[pandas]==2.1.2" \
   --constraint https://raw.githubusercontent.com/apache/airflow/constraints-2.1.2/constraints-3.8.txt"
 ```
+### `none_failed_or_skipped` trigger rule has been deprecated

Review comment:
       Should fix failing static check- https://github.com/apache/airflow/pull/17683/checks?check_run_id=3372171479#step:10:242

##########
File path: tests/utils/test_trigger_rule.py
##########
@@ -33,4 +33,5 @@ def test_valid_trigger_rules(self):
         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 len(TriggerRule.all_triggers()) == 10

Review comment:
       ```suggestion
           assert TriggerRule.is_valid(TriggerRule.NONE_FAILED_MIN_ONE_SUCCESS)
           assert len(TriggerRule.all_triggers()) == 11
   ```




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] github-actions[bot] commented on pull request #17683: Rename ``none_failed_or_skipped`` by ``none_failed_min_one_success`` trigger rule

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #17683:
URL: https://github.com/apache/airflow/pull/17683#issuecomment-902023620


   The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] raphaelauv commented on a change in pull request #17683: Rename ``none_failed_or_skipped`` by ``none_failed_min_one_success`` trigger rule

Posted by GitBox <gi...@apache.org>.
raphaelauv commented on a change in pull request #17683:
URL: https://github.com/apache/airflow/pull/17683#discussion_r692251712



##########
File path: tests/utils/test_trigger_rule.py
##########
@@ -33,4 +33,5 @@ def test_valid_trigger_rules(self):
         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 len(TriggerRule.all_triggers()) == 10

Review comment:
       sorry for that :sweat: 




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] kaxil commented on a change in pull request #17683: rename none_failed_or_skipped by none_failed_min_one_success

Posted by GitBox <gi...@apache.org>.
kaxil commented on a change in pull request #17683:
URL: https://github.com/apache/airflow/pull/17683#discussion_r692086228



##########
File path: UPDATING.md
##########
@@ -89,6 +89,11 @@ installing Airflow, example for Python 3.8 and Airflow 2.1.2:
 pip install -U "apache-airflow[pandas]==2.1.2" \
   --constraint https://raw.githubusercontent.com/apache/airflow/constraints-2.1.2/constraints-3.8.txt"
 ```
+### none_failed_or_skipped trigger rule has been deprecated

Review comment:
       ```suggestion
   ### `none_failed_or_skipped` trigger rule has been deprecated
   ```

##########
File path: airflow/models/baseoperator.py
##########
@@ -551,6 +551,15 @@ def __init__(
             )
             trigger_rule = TriggerRule.ALWAYS
 
+        if trigger_rule == "none_failed_or_skipped":
+            warnings.warn(
+                "none_failed_or_skipped Trigger Rule is deprecated. "
+                "Please use `TriggerRule.NONE_FAILED_MIN_ONE_SUCCESS`.",

Review comment:
       ```suggestion
                   "none_failed_or_skipped Trigger Rule is deprecated. "
                   "Please use `none_failed_min_one_success`.",
   ```
   
   or
   
   ```
                   "TriggerRule.NONE_FAILED_OR_SKIPPED Trigger Rule is deprecated. "
                   "Please use `TriggerRule.NONE_FAILED_MIN_ONE_SUCCESS`.",
   ```




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] raphaelauv commented on a change in pull request #17683: rename none_failed_or_skipped by none_failed_and_at_least_one_succeed

Posted by GitBox <gi...@apache.org>.
raphaelauv commented on a change in pull request #17683:
URL: https://github.com/apache/airflow/pull/17683#discussion_r691954797



##########
File path: airflow/utils/trigger_rule.py
##########
@@ -32,6 +32,7 @@ class TriggerRule:
     NONE_SKIPPED = 'none_skipped'
     DUMMY = 'dummy'
     ALWAYS = 'always'
+    NONE_FAILED_AND_AT_LEAST_ONE_SUCCEED = "none_failed_and_at_least_one_succeed"

Review comment:
       I like `none_failed_min_one_success` :+1: 
   
   none_failed_one_success could lead to ambiguity, example :  " if there 2 previous success, does this trigger_rule also work ? " 




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] kaxil merged pull request #17683: Rename ``none_failed_or_skipped`` by ``none_failed_min_one_success`` trigger rule

Posted by GitBox <gi...@apache.org>.
kaxil merged pull request #17683:
URL: https://github.com/apache/airflow/pull/17683


   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] kaxil commented on a change in pull request #17683: rename none_failed_or_skipped by none_failed_and_at_least_one_succeed

Posted by GitBox <gi...@apache.org>.
kaxil commented on a change in pull request #17683:
URL: https://github.com/apache/airflow/pull/17683#discussion_r691682079



##########
File path: airflow/utils/trigger_rule.py
##########
@@ -32,6 +32,7 @@ class TriggerRule:
     NONE_SKIPPED = 'none_skipped'
     DUMMY = 'dummy'
     ALWAYS = 'always'
+    NONE_FAILED_AND_AT_LEAST_ONE_SUCCEED = "none_failed_and_at_least_one_succeed"

Review comment:
       `NONE_FAILED_MIN_ONE_SUCCESS` (`none_failed_min_one_success`) seems a contender




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] github-actions[bot] commented on pull request #17683: rename none_failed_or_skipped by none_failed_min_one_success

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #17683:
URL: https://github.com/apache/airflow/pull/17683#issuecomment-901895571


   The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] raphaelauv commented on a change in pull request #17683: rename none_failed_or_skipped by none_failed_and_at_least_one_succeed

Posted by GitBox <gi...@apache.org>.
raphaelauv commented on a change in pull request #17683:
URL: https://github.com/apache/airflow/pull/17683#discussion_r691505723



##########
File path: airflow/utils/trigger_rule.py
##########
@@ -32,6 +32,7 @@ class TriggerRule:
     NONE_SKIPPED = 'none_skipped'
     DUMMY = 'dummy'
     ALWAYS = 'always'
+    NONE_FAILED_AND_AT_LEAST_ONE_SUCCEED = "none_failed_and_at_least_one_succeed"

Review comment:
       `This is tooooo long` okay , any proposition ?
   
   I'm surprise by your second question , `none_failed` is not the same than `none_failed_or_skipped`, my PR is about renaming `none_failed_or_skipped` nothing else.




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] kaxil commented on a change in pull request #17683: rename none_failed_or_skipped by none_failed_and_at_least_one_succeed

Posted by GitBox <gi...@apache.org>.
kaxil commented on a change in pull request #17683:
URL: https://github.com/apache/airflow/pull/17683#discussion_r691316424



##########
File path: airflow/utils/trigger_rule.py
##########
@@ -32,6 +32,7 @@ class TriggerRule:
     NONE_SKIPPED = 'none_skipped'
     DUMMY = 'dummy'
     ALWAYS = 'always'
+    NONE_FAILED_AND_AT_LEAST_ONE_SUCCEED = "none_failed_and_at_least_one_succeed"

Review comment:
       This is tooooo long. Are you sure you wanted to change the name of `none_failed_or_skipped` and not `none_failed` based on https://github.com/apache/airflow/issues/17012#issuecomment-883089001




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] kaxil commented on a change in pull request #17683: rename none_failed_or_skipped by none_failed_min_one_success

Posted by GitBox <gi...@apache.org>.
kaxil commented on a change in pull request #17683:
URL: https://github.com/apache/airflow/pull/17683#discussion_r692087187



##########
File path: airflow/models/baseoperator.py
##########
@@ -551,6 +551,15 @@ def __init__(
             )
             trigger_rule = TriggerRule.ALWAYS
 
+        if trigger_rule == "none_failed_or_skipped":
+            warnings.warn(
+                "none_failed_or_skipped Trigger Rule is deprecated. "
+                "Please use `TriggerRule.NONE_FAILED_MIN_ONE_SUCCESS`.",

Review comment:
       ```suggestion
                   "none_failed_or_skipped Trigger Rule is deprecated. "
                   "Please use `none_failed_min_one_success`.",
   ```
   
   or
   
   ```suggestion
                   "TriggerRule.NONE_FAILED_OR_SKIPPED Trigger Rule is deprecated. "
                   "Please use `TriggerRule.NONE_FAILED_MIN_ONE_SUCCESS`.",
   ```




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] kaxil commented on a change in pull request #17683: rename none_failed_or_skipped by none_failed_and_at_least_one_succeed

Posted by GitBox <gi...@apache.org>.
kaxil commented on a change in pull request #17683:
URL: https://github.com/apache/airflow/pull/17683#discussion_r691316424



##########
File path: airflow/utils/trigger_rule.py
##########
@@ -32,6 +32,7 @@ class TriggerRule:
     NONE_SKIPPED = 'none_skipped'
     DUMMY = 'dummy'
     ALWAYS = 'always'
+    NONE_FAILED_AND_AT_LEAST_ONE_SUCCEED = "none_failed_and_at_least_one_succeed"

Review comment:
       This is tooooo long. 




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] kaxil commented on a change in pull request #17683: rename none_failed_or_skipped by none_failed_and_at_least_one_succeed

Posted by GitBox <gi...@apache.org>.
kaxil commented on a change in pull request #17683:
URL: https://github.com/apache/airflow/pull/17683#discussion_r691682079



##########
File path: airflow/utils/trigger_rule.py
##########
@@ -32,6 +32,7 @@ class TriggerRule:
     NONE_SKIPPED = 'none_skipped'
     DUMMY = 'dummy'
     ALWAYS = 'always'
+    NONE_FAILED_AND_AT_LEAST_ONE_SUCCEED = "none_failed_and_at_least_one_succeed"

Review comment:
       `NONE_FAILED_MIN_ONE_SUCCESS` (`none_failed_min_one_success`) seems a contender or just `none_failed_one_success` is good too as we have `none_failed` and `one_success` (atleast one task has succeeded)




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] raphaelauv commented on a change in pull request #17683: Rename ``none_failed_or_skipped`` by ``none_failed_min_one_success`` trigger rule

Posted by GitBox <gi...@apache.org>.
raphaelauv commented on a change in pull request #17683:
URL: https://github.com/apache/airflow/pull/17683#discussion_r692223048



##########
File path: airflow/models/baseoperator.py
##########
@@ -551,6 +551,15 @@ def __init__(
             )
             trigger_rule = TriggerRule.ALWAYS
 
+        if trigger_rule == "none_failed_or_skipped":
+            warnings.warn(
+                "none_failed_or_skipped Trigger Rule is deprecated. "
+                "Please use `TriggerRule.NONE_FAILED_MIN_ONE_SUCCESS`.",

Review comment:
       was copying that line https://github.com/apache/airflow/blob/35a6c302772bf5d0bb74646b2da04856c7d7aaac/airflow/models/baseoperator.py#L550  
   
   you remark make sense




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] raphaelauv commented on a change in pull request #17683: rename none_failed_or_skipped by none_failed_and_at_least_one_succeed

Posted by GitBox <gi...@apache.org>.
raphaelauv commented on a change in pull request #17683:
URL: https://github.com/apache/airflow/pull/17683#discussion_r691505723



##########
File path: airflow/utils/trigger_rule.py
##########
@@ -32,6 +32,7 @@ class TriggerRule:
     NONE_SKIPPED = 'none_skipped'
     DUMMY = 'dummy'
     ALWAYS = 'always'
+    NONE_FAILED_AND_AT_LEAST_ONE_SUCCEED = "none_failed_and_at_least_one_succeed"

Review comment:
       `This is tooooo long` okay , any proposition ?
   
   I'm surprise by your second question , none_failed is not the same than none_failed_or_skipped, my MR is about renaming none_failed_or_skipped nothing else.




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] kaxil commented on a change in pull request #17683: rename none_failed_or_skipped by none_failed_and_at_least_one_succeed

Posted by GitBox <gi...@apache.org>.
kaxil commented on a change in pull request #17683:
URL: https://github.com/apache/airflow/pull/17683#discussion_r691316424



##########
File path: airflow/utils/trigger_rule.py
##########
@@ -32,6 +32,7 @@ class TriggerRule:
     NONE_SKIPPED = 'none_skipped'
     DUMMY = 'dummy'
     ALWAYS = 'always'
+    NONE_FAILED_AND_AT_LEAST_ONE_SUCCEED = "none_failed_and_at_least_one_succeed"

Review comment:
       This is tooooo long. Are you sure you wanted to change the name of `none_failed_or_skipped` and not `none_failed` based on https://github.com/apache/airflow/issues/17012#issuecomment-883089001




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org