airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kaxil Naik (Jira)" <j...@apache.org>
Subject [jira] [Reopened] (AIRFLOW-5808) DAG timezones given as datetime.timezone cause odd errors.
Date Fri, 13 Dec 2019 00:38:00 GMT

     [ https://issues.apache.org/jira/browse/AIRFLOW-5808?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Kaxil Naik reopened AIRFLOW-5808:
---------------------------------

> DAG timezones given as datetime.timezone cause odd errors.
> ----------------------------------------------------------
>
>                 Key: AIRFLOW-5808
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-5808
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: DAG
>    Affects Versions: 1.10.5
>            Reporter: Ash Berlin-Taylor
>            Priority: Minor
>             Fix For: 1.10.7
>
>
> The airflow docs mention that you should use Pendulum timezones, but we don't enforce
this, and the stdlib timezone is mostly, but not entirely API compatible with this.
> For instance if you create your DAG like this:
> {code:python}
> from airflow import DAG
> from datetime import datetime, timedelta, timezone
> dag = DAG('my_dag', start_date=datetime(2019, 2, 6, hour=0, tzinfo=timezone(timedelta(0),
name='UTC'))
> {code}
> It will _mostly_ work, except this will break the Tooltip generation in the graph page
as it expects a pendulm.timezone.
> To make everything predictable in Airflow the DAG constructor should convert non-pendulum
timezones when it encounters them.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message