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 C3AE2200D53 for ; Tue, 5 Dec 2017 23:34:46 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id C2392160C1B; Tue, 5 Dec 2017 22:34:46 +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 1076D160BF1 for ; Tue, 5 Dec 2017 23:34:45 +0100 (CET) Received: (qmail 66732 invoked by uid 500); 5 Dec 2017 22:34:45 -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 66719 invoked by uid 99); 5 Dec 2017 22:34:44 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Dec 2017 22:34:44 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id E93061A10C5 for ; Tue, 5 Dec 2017 22:34:43 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.901 X-Spam-Level: X-Spam-Status: No, score=-0.901 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_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.8, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id EzxCUF4m96pb for ; Tue, 5 Dec 2017 22:34:41 +0000 (UTC) Received: from mail-io0-f175.google.com (mail-io0-f175.google.com [209.85.223.175]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 4625F5F396 for ; Tue, 5 Dec 2017 22:34:41 +0000 (UTC) Received: by mail-io0-f175.google.com with SMTP id d14so488831ioc.5 for ; Tue, 05 Dec 2017 14:34:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=Fs8Pku+/XuDNiyuaK9OfHRZ6vVV0w7jsDvbcrVTz+XU=; b=huhrAXY5R3MTvWAd9m8ad0ZLoJIUU3LDSQP7gnHsNnkTv9mDKrFExItwdxFyVNLPSy JdMSuatG53nTTzu2d7Bc95fPOJyxrN5eUgU9dAPnlyR4otTErcenBZxtTNQKgPfyy6nf ErjxDpb0OEZQk8msic69/9Wpe+1WDLN8NyRRXkNJqV0HRZ8cmOnOj3wQlp5Tlc+LATYq s4t+kDz6cLLQCJ5iKUm9NO0weZ8OL/IuxxG4ta89cshd70rl5U3/9ogxBP/ML1Lqs1+b H/CaTE6YXlqZFyxXGd5L7lQOrXmNFvTKdFPa6AU6vhRDwYqilOGMTuC5C+zDKsj429sN 6hyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=Fs8Pku+/XuDNiyuaK9OfHRZ6vVV0w7jsDvbcrVTz+XU=; b=e9x8bIO70/0PTrzQVkmUFQyc6vBB4A3CUGBvj9Bo9CV1jdGU8rsVIKv+u8YmBpvAUM v4j2OZu2fgpGZGTBjpo6R4Pake+KC9qlZrwLUGElarag0PIcuX5ilLa4S6EAA8Er0Pmq ydJUJlWiLToJopNWQ/ddl9JPlyGbX1qFSLD6zYFiodP+6LBwRFw4sUM83Svxqgd/PJv0 gDbNVTakJc69bQqR1rT0o2OfGmYjJvfF6yW8XLApAhcVuDZHfgblvZ/GHDmvXA5unncH 12ndecxQwJOh2OfaU0uYlXtmvW3yv5Nt6cYCo2W5fcprDuG8kZKuFIkvdweZdYoZlaSb b6lg== X-Gm-Message-State: AJaThX7c2jzTa4hGB96wVb3j21G6HKLo0FAtAHO+X6K2ICDbHdO3HeQF AEeX3kCaAPGQl3+yGcr8JrYvHCB+7fnsw1vjKYfi/Q== X-Google-Smtp-Source: AGs4zMZfIOoT6cmhuEbXtFB6SfuwAi+WEGBtgIglbHCjNZhUJD4yPtE94yB9rUnoC/bGEY+p7BZUBCmrVFeLfuXGF8o= X-Received: by 10.107.150.77 with SMTP id y74mr30294832iod.119.1512513273948; Tue, 05 Dec 2017 14:34:33 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.69.15 with HTTP; Tue, 5 Dec 2017 14:34:33 -0800 (PST) In-Reply-To: References: From: Alek Storm Date: Tue, 5 Dec 2017 16:34:33 -0600 Message-ID: Subject: Re: DAG Factory Issues To: dev@airflow.incubator.apache.org Content-Type: multipart/alternative; boundary="001a1140417c696fde055f9f707a" archived-at: Tue, 05 Dec 2017 22:34:47 -0000 --001a1140417c696fde055f9f707a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sorry I wasn=E2=80=99t clear; I just meant that it seems more useful for fi= leloc to reflect the file in the dags folder that the scheduler processed to yield the DAG . Actually, the full_filepath attribute is already exactly this, so I suppose I=E2=80=99m advocating using full_filepath instead of fileloc in all cases. Alek =E2=80=8B On Tue, Dec 5, 2017 at 1:12 PM, Bolke de Bruin wrote: > I dont see how the scheduler would know. DAGs can come from any location, > any module, and import is dependent on the python interpreter. > > If you know a way the suits every kind of structure please provide a pr. > > Cheers > Bolke > > Verstuurd vanaf mijn iPad > > > Op 5 dec. 2017 om 19:05 heeft Alek Storm het > volgende geschreven: > > > > We solved this (hackily) by setting the fileloc field on the generated > DAG > > object to inspect.getsourcefile(inspect.stack()[1][0]), as the DAG > > constructor itself does. I agree a more general solution is needed; > > presumably the scheduler knows which Python file in the dags folder it > was > > processing when it found the DAG object. > > > > Alek > > =E2=80=8B > > > >> On Tue, Dec 5, 2017 at 12:00 PM, Michael Erdely > wrote: > >> > >> Hi, > >> > >> In order to support multiple environments with different DAG settings > per > >> environment, we created a DAG factory to create the DAG operator where > each > >> DAG has different params (eg schedule, catchup, etc). > >> > >> Unfortunately, we noticed that the webserver code view shows the facto= ry > >> code versus the actual Python code in the dagbag file. I also assume > that > >> the factory file modified date will be used versus the DAG file to > >> determine if the scheduler should reload. > >> > >> I see this issue has already been reported here > >> https://issues.apache.org/jira/browse/AIRFLOW-1108. > >> > >> Any ideas if this will be patched soon or have better suggestions on > >> handling this? > >> > >> -Michael > >> > --001a1140417c696fde055f9f707a--