You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Sergio Kef (Jira)" <ji...@apache.org> on 2019/09/28 18:34:00 UTC

[jira] [Commented] (AIRFLOW-372) DAGs can run before start_date time

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

Sergio Kef commented on AIRFLOW-372:
------------------------------------

As stated in wiki, airflow is not designed to handle changes of start_date. [https://cwiki.apache.org/confluence/display/AIRFLOW/Common+Pitfalls]

Let's close this, unless one wants to come with an enhancement proposal.

> DAGs can run before start_date time
> -----------------------------------
>
>                 Key: AIRFLOW-372
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-372
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: ui
>    Affects Versions: 1.7.1.2
>            Reporter: Isaac Steele
>            Priority: Major
>
> If you turn off a DAG in the UI, there seemingly is no way to prevent "missed" runs to schedule after the DAG is turned back on. I thought the workaround for this, since it is not a parameterized option to prevent, would be to update the start_date in the DAG code before turning the DAG back on. This does not work, and therefore the scheduler is running dag_runs *before* the listed start_date.
> To reproduce:
> # Create a DAG with a schedule_interval
> # Let the DAG run at least once
> # Turn off the DAG in the UI
> # Allow the schedule_interval to pass at least twice
> # Update the start_date in the DAG to be be after the two interval time
> # (I then removed the compiled python file and restarted airflow/scheduler just to make sure)
> # Turn DAG back on in UI
> Result: All dag_runs that were "missed" while the DAG was turned off run, despite the start_date being later.
> Ideally the start_date would always be honored. And also there would be a parameter to just not run any "missed" dag_runs.
>  



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