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 2022/09/03 21:15:42 UTC

[GitHub] [airflow] pankajastro opened a new pull request, #26146: [WIP] Add one_done trigger rule

pankajastro opened a new pull request, #26146:
URL: https://github.com/apache/airflow/pull/26146

   <!--
   Thank you for contributing! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   In case of an existing issue, reference it using one of the following:
   
   closes: #ISSUE
   related: #ISSUE
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   
   ---
   **^ Add meaningful description above**
   
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
   In case of fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in a newsfragment file, named `{pr_number}.significant.rst` or `{issue_number}.significant.rst`, in [newsfragments](https://github.com/apache/airflow/tree/main/newsfragments).
   


-- 
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] pankajastro commented on a diff in pull request #26146: Add one_done trigger rule

Posted by GitBox <gi...@apache.org>.
pankajastro commented on code in PR #26146:
URL: https://github.com/apache/airflow/pull/26146#discussion_r967082359


##########
tests/ti_deps/deps/test_trigger_rule_dep.py:
##########
@@ -151,7 +151,7 @@ def test_one_failure_tr_success(self, get_task_instance):
         dep_statuses = tuple(
             TriggerRuleDep()._evaluate_trigger_rule(
                 ti=ti,
-                successes=0,
+                successes=1,

Review Comment:
   I think by mistake I made this change. I have reverted it. thanks for pointing it out.



-- 
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 #26146: [WIP] Add one_done trigger rule

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

   `one_done` -> `at_least_one_done`
   
   cause `one_done` mean one and only one upstream task must be done 
   
   wdyt ?


-- 
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] pankajastro commented on a diff in pull request #26146: Add one_done trigger rule

Posted by GitBox <gi...@apache.org>.
pankajastro commented on code in PR #26146:
URL: https://github.com/apache/airflow/pull/26146#discussion_r967081167


##########
tests/ti_deps/deps/test_trigger_rule_dep.py:
##########
@@ -163,6 +163,26 @@ def test_one_failure_tr_success(self, get_task_instance):
         )
         assert len(dep_statuses) == 0
 
+    def test_one_done_tr_success(self, get_task_instance):

Review Comment:
   Added



##########
tests/ti_deps/deps/test_trigger_rule_dep.py:
##########
@@ -163,6 +163,26 @@ def test_one_failure_tr_success(self, get_task_instance):
         )
         assert len(dep_statuses) == 0
 
+    def test_one_done_tr_success(self, get_task_instance):

Review Comment:
   Added more tests



-- 
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] uranusjr commented on pull request #26146: [WIP] Add one_done trigger rule

Posted by GitBox <gi...@apache.org>.
uranusjr commented on PR #26146:
URL: https://github.com/apache/airflow/pull/26146#issuecomment-1237838461

   We already have `one_success` and `one_failed`, IMO `one_done` fits better.


-- 
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 #26146: Add one_done trigger rule

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


-- 
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] potiuk commented on pull request #26146: Add one_done trigger rule

Posted by GitBox <gi...@apache.org>.
potiuk commented on PR #26146:
URL: https://github.com/apache/airflow/pull/26146#issuecomment-1250376657

   Can someone more involved in trigger rules take a look at this one? @uranusjr @ashb  - seems good to me in general, but maybe it can be done simpler :)


-- 
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] eladkal commented on a diff in pull request #26146: Add one_done trigger rule

Posted by GitBox <gi...@apache.org>.
eladkal commented on code in PR #26146:
URL: https://github.com/apache/airflow/pull/26146#discussion_r965949271


##########
tests/ti_deps/deps/test_trigger_rule_dep.py:
##########
@@ -151,7 +151,7 @@ def test_one_failure_tr_success(self, get_task_instance):
         dep_statuses = tuple(
             TriggerRuleDep()._evaluate_trigger_rule(
                 ti=ti,
-                successes=0,
+                successes=1,

Review Comment:
   Why do we need to change test of another trigger rule?



##########
tests/ti_deps/deps/test_trigger_rule_dep.py:
##########
@@ -163,6 +163,26 @@ def test_one_failure_tr_success(self, get_task_instance):
         )
         assert len(dep_statuses) == 0
 
+    def test_one_done_tr_success(self, get_task_instance):

Review Comment:
   Can we have more tests to cover the full functionality of the trigger rule?
   We have here 1 test for success..
   We need also 1 for skip, 1 for upstream failed I think?



-- 
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