sudarshan2906 commented on issue #37842:
URL: https://github.com/apache/airflow/issues/37842#issuecomment-1975168813

   Hi @Taragolis ,
   
   I debugged more on this. catchup_by_default doesn't seems to be the only 
reason. The default timezone + catchup_by_default seems to be an issue here. I 
am using CET timezone. And after that I was able to reproduce this. 
   
   Here is a Dockerfile and docker-compose.yml to reproduce this issue.
   
   Dockerfile:
   ```
   FROM python:3.11-bullseye
   
   ENV AIRFLOW_HOME=/home/airflow \
       AIRFLOW_VERSION=2.8.1
   
   RUN pip install --no-cache-dir \
       --constraint 
"https://raw.githubusercontent.com/apache/airflow/constraints-${AIRFLOW_VERSION}/constraints-3.11.txt";
 \
       apache-airflow[postgres,celery]==${AIRFLOW_VERSION}
   
   # Time zone configuration
   RUN cp /usr/share/zoneinfo/CET /etc/localtime && \
       echo "CET" > /etc/timezone
   
   EXPOSE 8080
   ```
   docker-compose.yml
   ```
   version: '3'
   services:
       webserver:
           platform: linux/amd64
           depends_on:
               - postgres
           build:
               context: .
           ports:
               - "8080:8080"
           environment:
               - 
AIRFLOW__DATABASE__SQL_ALCHEMY_CONN=postgresql+psycopg2://airflow:airflow@postgres:5432/airflow
               - AIRFLOW__CORE__EXECUTOR=CeleryExecutor
               - AIRFLOW__SCHEDULER__CATCHUP_BY_DEFAULT=False
               - AIRFLOW__WEBSERVER__DEFAULT_UI_TIMEZONE=CET
               - AIRFLOW__CORE__DEFAULT_TIMEZONE=CET
           volumes:
               - ./dags:/home/airflow/dags
           entrypoint: airflow webserver
   
       scheduler:
           platform: linux/amd64
           depends_on:
               - postgres
           build:
               context: .
           environment:
               - 
AIRFLOW__DATABASE__SQL_ALCHEMY_CONN=postgresql+psycopg2://airflow:airflow@postgres:5432/airflow
               - AIRFLOW__CORE__EXECUTOR=CeleryExecutor
               - AIRFLOW__SCHEDULER__CATCHUP_BY_DEFAULT=False
               - AIRFLOW__WEBSERVER__DEFAULT_UI_TIMEZONE=CET
               - AIRFLOW__CORE__DEFAULT_TIMEZONE=CET
           volumes:
               - ./dags:/home/airflow/dags
           entrypoint: airflow scheduler
   
       postgres:
           image: postgres:14
           ports:
               - "5432:5432"
           environment:
               - POSTGRES_USER=airflow
               - POSTGRES_PASSWORD=airflow
               - POSTGRES_DB=airflow
           hostname: postgres
   ```


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