-
Notifications
You must be signed in to change notification settings - Fork 16.7k
Description
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 rangeWhat 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?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct