airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bolke de Bruin (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (AIRFLOW-993) Dags should modify the start date and end date of tasks when they are added
Date Sat, 13 May 2017 12:54:04 GMT

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

Bolke de Bruin resolved AIRFLOW-993.
------------------------------------
       Resolution: Fixed
    Fix Version/s:     (was: 1.8.1)
                   1.8.2

Issue resolved by pull request #2157
[https://github.com/apache/incubator-airflow/pull/2157]

> Dags should modify the start date and end date of tasks when they are added
> ---------------------------------------------------------------------------
>
>                 Key: AIRFLOW-993
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-993
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: DAG
>    Affects Versions: 1.8.0
>            Reporter: Jeremiah Lowin
>            Assignee: Jeremiah Lowin
>            Priority: Minor
>             Fix For: 1.8.2
>
>
> When tasks are added to DAGs, the DAG checks if the task has a start_date. If it doesn't,
the DAG sets it to its own start date. This isn't done for end_date, but it should be.
> Otherwise, this simple code leads to a surprising failure as the backfill tries to run
the task every day, even though the DAG clearly has an end date set.
> {code}
> from airflow.models import DAG
> from airflow.operators.dummy_operator import DummyOperator
> import datetime
> dt = datetime.datetime(2017, 1, 1)
> with DAG('test', start_date=dt, end_date=dt) as dag:
>     op = DummyOperator(task_id='dummy')
> op.run()
> {code}
> Furthermore, it may make sense for the task start date to always be the later of the
task start date and the dag start date; similarly for the end date (but using the earlier
date)



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message