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

   ### Apache Airflow version
   
   2.7.2
   
   ### What happened
   
   When running a DAG with a timezone set to `Europe/Brussels` we noticed it 
stopped being scheduled around the 29th, this is right around summer/winter 
time change. The scheduled logs show:
   ```
   test-airflow-scheduler-1  | [2023-10-30T12:49:52.330+0000] {dag.py:3722} 
INFO - Setting next_dagrun for time-zone-issue to 2023-10-29T04:00:00+00:00, 
run_after=2023-10-29T05:00:00+00:00
   test-airflow-scheduler-1  | [2023-10-30T12:49:53.474+0000] {dag.py:3722} 
INFO - Setting next_dagrun for time-zone-issue to 2023-10-28T21:45:00+00:00, 
run_after=2023-10-29T04:00:00+00:00
   test-airflow-scheduler-1  | [2023-10-30T12:49:54.569+0000] {dag.py:3722} 
INFO - Setting next_dagrun for time-zone-issue to 2023-10-29T04:00:00+00:00, 
run_after=2023-10-29T05:00:00+00:00
   test-airflow-scheduler-1  | [2023-10-30T12:49:55.665+0000] {dag.py:3722} 
INFO - Setting next_dagrun for time-zone-issue to 2023-10-28T21:45:00+00:00, 
run_after=2023-10-29T04:00:00+00:00
   test-airflow-scheduler-1  | [2023-10-30T12:49:56.031+0000] {dag.py:3722} 
INFO - Setting next_dagrun for time-zone-issue to 2023-10-29T04:00:00+00:00, 
run_after=2023-10-29T05:00:00+00:00
   test-airflow-scheduler-1  | [2023-10-30T12:49:57.133+0000] {dag.py:3722} 
INFO - Setting next_dagrun for time-zone-issue to 2023-10-28T21:45:00+00:00, 
run_after=2023-10-29T04:00:00+00:00
   test-airflow-scheduler-1  | [2023-10-30T12:49:57.454+0000] {dag.py:3722} 
INFO - Setting next_dagrun for time-zone-issue to 2023-10-29T04:00:00+00:00, 
run_after=2023-10-29T05:00:00+00:00
   test-airflow-scheduler-1  | [2023-10-30T12:49:58.584+0000] {dag.py:3722} 
INFO - Setting next_dagrun for time-zone-issue to 2023-10-28T21:45:00+00:00, 
run_after=2023-10-29T04:00:00+00:00
   test-airflow-scheduler-1  | <jemalloc>: MADV_DONTNEED does not work (memset 
will be used instead)
   test-airflow-scheduler-1  | <jemalloc>: (This is the expected behaviour if 
you are running under QEMU)
   test-airflow-scheduler-1  | [2023-10-30T12:49:59.553+0000] {dag.py:3722} 
INFO - Setting next_dagrun for time-zone-issue to 2023-10-29T04:00:00+00:00, 
run_after=2023-10-29T05:00:00+00:00
   test-airflow-scheduler-1  | [2023-10-30T12:50:00.667+0000] {dag.py:3722} 
INFO - Setting next_dagrun for time-zone-issue to 2023-10-28T21:45:00+00:00, 
run_after=2023-10-29T04:00:00+00:00
   test-airflow-scheduler-1  | [2023-10-30T12:50:01.774+0000] {dag.py:3722} 
INFO - Setting next_dagrun for time-zone-issue to 2023-10-29T04:00:00+00:00, 
run_after=2023-10-29T05:00:00+00:00
   test-airflow-scheduler-1  | [2023-10-30T12:50:02.580+0000] {dag.py:3722} 
INFO - Setting next_dagrun for time-zone-issue to 2023-10-28T21:45:00+00:00, 
run_after=2023-10-29T04:00:00+00:00
   test-airflow-scheduler-1  | [2023-10-30T12:50:02.956+0000] {dag.py:3722} 
INFO - Setting next_dagrun for time-zone-issue to 2023-10-29T04:00:00+00:00, 
run_after=2023-10-29T05:00:00+00:00
   test-airflow-webserver-1  | 127.0.0.1 - - [30/Oct/2023:12:50:03 +0000] "GET 
/health HTTP/1.1" 200 318 "-" "curl/7.74.0"
   test-airflow-scheduler-1  | [2023-10-30T12:50:04.063+0000] {dag.py:3722} 
INFO - Setting next_dagrun for time-zone-issue to 2023-10-28T21:45:00+00:00, 
run_after=2023-10-29T04:00:00+00:00
   test-airflow-scheduler-1  | [2023-10-30T12:50:05.167+0000] {dag.py:3722} 
INFO - Setting next_dagrun for time-zone-issue to 2023-10-29T04:00:00+00:00, 
run_after=2023-10-29T05:00:00+00:00
   test-airflow-scheduler-1  | [2023-10-30T12:50:06.271+0000] {dag.py:3722} 
INFO - Setting next_dagrun for time-zone-issue to 2023-10-28T21:45:00+00:00, 
run_after=2023-10-29T04:00:00+00:00
   test-airflow-scheduler-1  | [2023-10-30T12:50:07.382+0000] {dag.py:3722} 
INFO - Setting next_dagrun for time-zone-issue to 2023-10-29T04:00:00+00:00, 
run_after=2023-10-29T05:00:00+00:00
   test-airflow-scheduler-1  | [2023-10-30T12:50:07.702+0000] {dag.py:3722} 
INFO - Setting next_dagrun for time-zone-issue to 2023-10-28T21:45:00+00:00, 
run_after=2023-10-29T04:00:00+00:00
   test-airflow-scheduler-1  | [2023-10-30T12:50:08.811+0000] {dag.py:3722} 
INFO - Setting next_dagrun for time-zone-issue to 2023-10-29T04:00:00+00:00, 
run_after=2023-10-29T05:00:00+00:00
   test-airflow-scheduler-1  | [2023-10-30T12:50:09.671+0000] {dag.py:3722} 
INFO - Setting next_dagrun for time-zone-issue to 2023-10-28T21:45:00+00:00, 
run_after=2023-10-29T04:00:00+00:00
   test-airflow-scheduler-1  | [2023-10-30T12:50:10.793+0000] {dag.py:3722} 
INFO - Setting next_dagrun for time-zone-issue to 2023-10-29T04:00:00+00:00, 
run_after=2023-10-29T05:00:00+00:00
   test-airflow-scheduler-1  | [2023-10-30T12:50:11.894+0000] {dag.py:3722} 
INFO - Setting next_dagrun for time-zone-issue to 2023-10-28T21:45:00+00:00, 
run_after=2023-10-29T04:00:00+00:00
   test-airflow-scheduler-1  | [2023-10-30T12:50:12.813+0000] {dag.py:3722} 
INFO - Setting next_dagrun for time-zone-issue to 2023-10-29T04:00:00+00:00, 
run_after=2023-10-29T05:00:00+00:00
   ```
   
   ### What you think should happen instead
   
   The dag should continue to be scheduled
   
   ### How to reproduce
   
   Run the DAG attached below, I reproduced this case using the docker-compose 
setup from the 
[docs](https://airflow.apache.org/docs/apache-airflow/stable/howto/docker-compose/index.html).
   
   ```python
   from airflow.decorators import task
   
   import pendulum
   from airflow.models import DAG
   from datetime import timedelta
   
   default_args = {
       "depends_on_past": False,
       "start_date": pendulum.datetime(year=2023, month=10, day=28, 
tz="Europe/Brussels"),
       "email": [],
       "email_on_failure": False,
       "email_on_retry": False,
       "retries": 3,
       "retry_delay": timedelta(minutes=5),
   }
   
   with DAG(
           "time-zone-issue",
           default_args=default_args,
           max_active_runs=1,
           schedule_interval="0,15,30,45 6-22 * * *",
   ) as dag:
       @task(task_id="print_the_context")
       def print_context(ds=None, **kwargs):
           """Print the Airflow context and ds variable from the context."""
           print(ds)
           return "finished!"
   
       run_this = print_context()
   
   ```
   
   ### Operating System
   
   MAC OS, also linux
   
   ### Versions of Apache Airflow Providers
   
   Default ones included in docker-compose setup
   
   ### Deployment
   
   Docker-Compose
   
   ### Deployment details
   
   It also happens on a kubernetes cluster, the installation does not matter
   
   ### Anything else
   
   At one point the DAG started scheduling again, but I can still reproduce the 
case.
   
   I am willing to create a PR but don't know where to start looking for this
   
   ### 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: commits-unsubscr...@airflow.apache.org.apache.org

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

Reply via email to