ephraimbuddy commented on PR #26518:
URL: https://github.com/apache/airflow/pull/26518#issuecomment-1253322489

   Here's how you can reproduce this bug in main:
   Run the below dag
   Reduce the range to 3
   Then clear it to rerun and you will see it deadlock:
   
   ```python
   
   from datetime import datetime
   from airflow.decorators import dag, task
   
   @dag(
       'bug_test',
       schedule='@once',
       start_date=datetime(2022,1,1),
       max_active_runs=1
   )
   def test_scheduler_bug():
       @task
       def do_something(i):
           return 6
   
       @task
       def do_something_else(i):
           import logging
           log = logging.getLogger('airflow.task')
           log.info("I'll never run")
       # After the run, reduce this range to 2
       nums = do_something.expand(i=[i+1 for i in range(5)])
       do_something_else.expand(i=nums)
   
   TEST_DAG = test_scheduler_bug()
   ```
   
   


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