airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AIRFLOW-586) Importing dags/test_dag.py fails between 0 and 3 o'clock
Date Thu, 27 Oct 2016 02:48:58 GMT

    [ https://issues.apache.org/jira/browse/AIRFLOW-586?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15610436#comment-15610436
] 

ASF subversion and git services commented on AIRFLOW-586:
---------------------------------------------------------

Commit 46236fa70702de1d25253c8972f9843e247ddc7a in incubator-airflow's branch refs/heads/master
from [~sekikn]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-airflow.git;h=46236fa ]

[AIRFLOW-586] test_dag_v1 fails from 0 to 3 a.m.

dags/test_dag.py tries to set START_DATE to 3
hours before using
datetime.replace, but it doesn't support minus
value as argument.
So we have to use timedelta instead of simple
numeric subtraction.

Closes #1852 from sekikn/AIRFLOW-586


> Importing dags/test_dag.py fails between 0 and 3 o'clock
> --------------------------------------------------------
>
>                 Key: AIRFLOW-586
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-586
>             Project: Apache Airflow
>          Issue Type: Bug
>            Reporter: Kengo Seki
>            Assignee: Kengo Seki
>
> It raises the following error:
> {code}
> $ airflow webserver
> (snip)
> [2016-10-23 00:07:30,613] [28693] {models.py:266} ERROR - Failed to import: /home/sekikn/airflow/dags/test_dag.py
> Traceback (most recent call last):
>   File "/home/sekikn/incubator-airflow/airflow/models.py", line 263, in process_file
>     m = imp.load_source(mod_name, filepath)
>   File "/home/sekikn/airflow/dags/test_dag.py", line 20, in <module>
>     now_to_the_hour = now.replace(hour=now.time().hour-3 , minute=0, second=0, microsecond=0)
> ValueError: hour must be in 0..23
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message