massamany commented on pull request #19528:
URL: https://github.com/apache/airflow/pull/19528#issuecomment-977917530


   To make it all simpler, I reproduced the problem with the very simple DAG 
below.
   The start date is static and should be changed to be for instance 10 minutes 
before startup.
   Everything goes on well on Airflow 2.2.0, the scheduling is blocked with 
2.2.2.
   
   test_dag.py :
   ```
   import dateutil.parser
   from airflow import DAG
   from airflow.settings import TIMEZONE
   from airflow.operators.latest_only import LatestOnlyOperator
   from airflow.operators.python import PythonOperator
   
   
   def create_test_dag():
       start_date = 
dateutil.parser.isoparse("2021-11-24T15:00:00+01:00").astimezone(tz=TIMEZONE)
   
       my_test_dag = DAG(
           dag_id="test_dag",
           start_date=start_date,
           schedule_interval="0/2 * * * *",
           is_paused_upon_creation=True,
           catchup=True,
           default_args={'owner': 'airflow', 'start_date': start_date},
       )
   
       latest_task = LatestOnlyOperator(task_id="test_latest_only", 
dag=my_test_dag)
       test_task = PythonOperator(task_id="test_task", dag=my_test_dag, 
python_callable=lambda: print("Hello guys !"))
   
       latest_task >> test_task
   
       return my_test_dag
   
   
   my_test_dag = create_test_dag()
   ```


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