morooshka opened a new issue, #28500:
URL: https://github.com/apache/airflow/issues/28500

   ### Apache Airflow version
   
   2.5.0
   
   ### What happened
   
   Operator with NONE_FAILED_MIN_ONE_SUCCESS trigger rule being wrongly skipped 
after the first parent operator had been skipped with its parent 
ShortCircuitOperator but some other parent operators are still being working. 
The same is reproducing with ONE_SUCCESS trigger rule
   
   ### What you think should happen instead
   
   The operator with NONE_FAILED_MIN_ONE_SUCCESS (ONE_SUCCESS) trigger rule 
should wait for all parents (one success parent) operators
   
   ### How to reproduce
   
   Please find the DAG example:
   
   ```
   from datetime import datetime
   from time import sleep
   from airflow import DAG
   from airflow.utils.trigger_rule import TriggerRule
   from airflow.operators.dummy import DummyOperator
   from airflow.operators.python import PythonOperator
   from airflow.operators.python import ShortCircuitOperator
   
   
   def do_sleep() -> bool:
       sleep(1)
       return True
   
   
   with DAG(
       dag_id="wrong_skip",
       description='Wrong skip',
       schedule_interval=None,
       start_date=datetime(2022, 11, 29),
       default_args={},
       max_active_runs=1,
       catchup=False,
       params={},
       is_paused_upon_creation=True,
       tags=['sandbox']
   ) as dag:
       task_switcher = ShortCircuitOperator(task_id="switcher", 
python_callable=lambda: False)
       task_skipped = PythonOperator(task_id="skipped", python_callable=lambda: 
True)
       task_executed = PythonOperator(task_id="executed", 
python_callable=do_sleep)
       task_end = DummyOperator(task_id='problem', 
trigger_rule=TriggerRule.NONE_FAILED_MIN_ONE_SUCCESS)
   
       task_switcher >> task_skipped >> task_end
       task_executed >> task_end
   
   ```
   
   The result of execution:
   
![image](https://user-images.githubusercontent.com/72786791/208738725-8c8f1b58-7020-4938-a272-c53a33d5efb4.png)
   
   
   ### Operating System
   
   CentOS Linux 7 (Core)
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Virtualenv installation
   
   ### Deployment details
   
   _No response_
   
   ### Anything else
   
   The problem reproduces every time
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to