Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 2FA64200B5E for ; Wed, 10 Aug 2016 21:38:45 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 2E413160AA4; Wed, 10 Aug 2016 19:38:45 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 4DAE4160A8F for ; Wed, 10 Aug 2016 21:38:44 +0200 (CEST) Received: (qmail 46006 invoked by uid 500); 10 Aug 2016 19:38:43 -0000 Mailing-List: contact dev-help@airflow.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airflow.incubator.apache.org Delivered-To: mailing list dev@airflow.incubator.apache.org Received: (qmail 45994 invoked by uid 99); 10 Aug 2016 19:38:43 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Aug 2016 19:38:43 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id B5BAFC0455 for ; Wed, 10 Aug 2016 19:38:42 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.18 X-Spam-Level: * X-Spam-Status: No, score=1.18 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id XkD1cV7pCgu7 for ; Wed, 10 Aug 2016 19:38:40 +0000 (UTC) Received: from mail-it0-f50.google.com (mail-it0-f50.google.com [209.85.214.50]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 6AFD55F256 for ; Wed, 10 Aug 2016 19:38:40 +0000 (UTC) Received: by mail-it0-f50.google.com with SMTP id u186so47165817ita.0 for ; Wed, 10 Aug 2016 12:38:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=FsaZhQmpjjAZiUkk0KkCKVp2VTekx0Od8O4y4s9oCMM=; b=tssRugtilFsJ/07jWViuop4VpTvzuSOJzDU+8094x0MYygFzn4BsNekUT/xWbyeVle WpjZoGCNNoOj5njouk/YJPTd5t9TE2mVyRdySvn3pGeiGyfIMtBN4pxK+90nhkXH7Oy0 VwOn/Mm7rDRm8C5qJ3dgb7UUKpFIVMcuCYpGiYOasVaIowxkm6Q5CEXmiSgf0rcMmn6n 1srxuHF8sE2NsyGs9dnjJU0HTxIKWRAdIO8L36zDo4LhLfp9ucOroek4eOG4gAOhDTsy kB6NhW+k3A0R+YyAKG01CSgWLzQu8zdN5njvMnRIqON3wp9tl9SiYfD9yZB6pZewx/80 BBLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=FsaZhQmpjjAZiUkk0KkCKVp2VTekx0Od8O4y4s9oCMM=; b=LNYO+oJarZSD7YOyEghtLGh6iRz9fuwZ4N0OQzFaQnHt7gLbDS3k9Niootj3QxD9QT X1JBy3JA7+SAQuudQ/NhCSSnj/eP3zTbhXnEbLeHIky2FS49kv2mE+PaFCs+/b2Dmm1J ktua0AOQcwGeLgj7BHSukGtnP/HehGE9sHDwsVrmogPToD3359N45IozrRs61I6fHWus 2haNyxp3shuVNdostPUIKQDNA6XmYnC6hGqJlDBhecIVIOQNEuJm8BRO6Bgok8s3yjgW G/ydhpsas/U3D70tXRbZSuNud4KF0vaSb8glQtHirA1d11czd6r0QWlHAa1fkIhkzfy0 HqPQ== X-Gm-Message-State: AEkoouta2qcZsQeFg56tr99AY8fJXcwEdPaTJeJd4WWenNgsV9jjZzND7eHtxPpI7mYYOwXekK18fzRMyPidcw== X-Received: by 10.36.13.203 with SMTP id 194mr5173669itx.79.1470857919113; Wed, 10 Aug 2016 12:38:39 -0700 (PDT) MIME-Version: 1.0 Received: by 10.79.137.195 with HTTP; Wed, 10 Aug 2016 12:38:38 -0700 (PDT) In-Reply-To: References: From: Maxime Beauchemin Date: Wed, 10 Aug 2016 12:38:38 -0700 Message-ID: Subject: Re: problem to update 'start_date' of DAG To: dev@airflow.incubator.apache.org Content-Type: multipart/alternative; boundary=001a11404b24c8be9d0539bccbd8 archived-at: Wed, 10 Aug 2016 19:38:45 -0000 --001a11404b24c8be9d0539bccbd8 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, What do you mean by "discarding", what is the outcome you are after? If what you want is a DagRun that matches your start_date you can do that from the UI (create a new DagRun that matches your desired start_date, that essentially "re-seeds" the point from which the future DagRuns will get created). You may also want to deactivate older `running` DagRuns as well, which you can also do from the UI. Max On Tue, Aug 9, 2016 at 9:24 PM, =D7=94=D7=99=D7=9C=D7=94 =D7=95=D7=99=D7=96= =D7=9F wrote: > Hi Maxime, > > Thanks for the clarifications. > I've already read this page while trying to find a solution to my problem= . > > But I still have the question - is there any way to discard the previous > definitions? (for example the 'start_date' of a DAG) > > Thanks > > On Wed, Aug 10, 2016 at 1:37 AM, Maxime Beauchemin < > maximebeauchemin@gmail.com> wrote: > > > From http://pythonhosted.org/airflow/faq.html: > > > > *What=E2=80=99s the deal with ``start_date``?* > > > > start_date is partly legacy from the pre-DagRun era, but it is still > > relevant in many ways. When creating a new DAG, you probably want to se= t > a > > global start_date for your tasks usingdefault_args. The first DagRun to > be > > created will be based on the min(start_date) for all your task. From th= at > > point on, the scheduler creates new DagRuns based on your > > schedule_interval and > > the corresponding task instances run as your dependencies are met. When > > introducing new tasks to your DAG, you need to pay special attention to > > start_date, and may want to reactivate inactive DagRuns to get the new > task > > to get onboarded properly. > > > > We recommend against using dynamic values as start_date, especially > > datetime.now() as it can be quite confusing. The task is triggered once > the > > period closes, and in theory an @hourly DAG would never get to an hour > > after now as now() moves along. > > > > Previously we also recommended using rounded start_date in relation to > your > > schedule_interval. This meant an @hourly would be at 00:00 > minutes:seconds, > > a @daily job at midnight, a @monthlyjob on the first of the month. This > is > > no longer required. Airflow will not auto align the start_dateand the > > schedule_interval, by using the start_date as the moment to start > looking. > > > > You can use any sensor or a TimeDeltaSensor to delay the execution of > tasks > > within the schedule interval. While schedule_interval does allow > specifying > > a datetime.timedelta object, we recommend using the macros or cron > > expressions instead, as it enforces this idea of rounded schedules. > > > > When using depends_on_past=3DTrue it=E2=80=99s important to pay special= attention > to > > start_date as the past dependency is not enforced only on the specific > > schedule of the start_date specified for the task. It=E2=80=99 also imp= ortant to > > watch DagRun activity status in time when introducing new > > depends_on_past=3DTrue, unless you are planning on running a backfill f= or > the > > new task(s). > > > > Also important to note is that the tasks start_date, in the context of = a > > backfill CLI command, get overridden by the backfill=E2=80=99s command > start_date. > > This allows for a backfill on tasks that havedepends_on_past=3DTrue to > > actually start, if it wasn=E2=80=99t the case, the backfill just wouldn= =E2=80=99t start. > > > > On Tue, Aug 9, 2016 at 7:44 AM, =D7=94=D7=99=D7=9C=D7=94 =D7=95=D7=99= =D7=96=D7=9F wrote: > > > > > Hi, > > > > > > We're experiencing a strange problem with the start_date configuratio= n > in > > > Airflow. > > > > > > When we first ran the DAGs, we defined the start_date as > > 'datetime.now()', > > > which at the time was 01/08/2016. This worked fine. A week afterwards= , > we > > > changed the DAGs to a specific newer date - 08/08/2016, and reset all > of > > > the tasks. After resetting the Airflow and all of the DAGs *we are > still > > > seeing the tasks running from original date (01/08)*. Why is this > > > happening? > > > > > > We don't understand why the tasks are still using the old date. Is > there > > a > > > cache/DB/persistent file that the DAG reads on startup that overrides > our > > > definition? Is it maybe Celery? We really would appreciate your input > > > because we are totally stuck. > > > > > > We use airflow version 1.7.1.3 with postgress as the backend DB. > > > In addition, we run in CeleryExecutor mode with rabbitMQ as Celery > > backend. > > > > > > Thank you, > > > Hila > > > > > > --001a11404b24c8be9d0539bccbd8--