Apache Airflow version
3.1.8
If "Other Airflow 3 version" selected, which one?
No response
What happened?
I followed https://airflow.apache.org/docs/apache-airflow/stable/howto/docker-compose/index.html, start airflow by docker compose.
And the version is 3.1.8, curl -LfO 'https://airflow.apache.org/docs/apache-airflow/3.1.8/docker-compose.yaml'. I set AIRFLOW__CORE__DEFAULT_TIMEZONE to 'Asia/Shanghai'.
Two dags have import error, example_outlet_event_extra.py and example_inlet_event_extra.py.
The errors are the same:
Traceback (most recent call last):
File "/home/airflow/.local/lib/python3.12/site-packages/airflow/sdk/_shared/timezones/timezone.py", line 94, in convert_to_utc
return pendulum.instance(value.astimezone(utc))
^^^^^^^^^^^^^^^^^^^^^
File "/home/airflow/.local/lib/python3.12/site-packages/pendulum/datetime.py", line 1276, in astimezone
dt = super().astimezone(tz)
^^^^^^^^^^^^^^^^^^^^^^
OverflowError: date value out of range
What you think should happen instead?
|
start_date=datetime.datetime.min, |
We set start_date to min, then pendulum can't support it, and it's timezone bug, cuz I set tz to 'Asia/Shanghai', no error when use default tz utc.
start_date should be datetime.datetime.min.replace(tzinfo=datetime.timezone.utc) or datetime.datetime(1970, 1, 1, tzinfo=datetime.timezone.utc), to avoid tz covert overflow error?
How to reproduce
docker compose up -d, then open ui, import error like:
Operating System
docker
Versions of Apache Airflow Providers
No response
Deployment
Docker-Compose
Deployment details
No response
Anything else?
No response
Are you willing to submit PR?
Code of Conduct
Apache Airflow version
3.1.8
If "Other Airflow 3 version" selected, which one?
No response
What happened?
I followed https://airflow.apache.org/docs/apache-airflow/stable/howto/docker-compose/index.html, start airflow by docker compose.
And the version is 3.1.8,
curl -LfO 'https://airflow.apache.org/docs/apache-airflow/3.1.8/docker-compose.yaml'. I set AIRFLOW__CORE__DEFAULT_TIMEZONE to 'Asia/Shanghai'.Two dags have import error,
example_outlet_event_extra.pyandexample_inlet_event_extra.py.The errors are the same:
What you think should happen instead?
airflow/airflow-core/src/airflow/example_dags/example_inlet_event_extra.py
Line 36 in 32f3fcc
We set start_date to min, then pendulum can't support it, and it's timezone bug, cuz I set tz to 'Asia/Shanghai', no error when use default tz utc.
start_dateshould bedatetime.datetime.min.replace(tzinfo=datetime.timezone.utc)ordatetime.datetime(1970, 1, 1, tzinfo=datetime.timezone.utc), to avoid tz covert overflow error?How to reproduce
docker compose up -d, then open ui, import error like:Operating System
docker
Versions of Apache Airflow Providers
No response
Deployment
Docker-Compose
Deployment details
No response
Anything else?
No response
Are you willing to submit PR?
Code of Conduct