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 C0C27200B94 for ; Sun, 2 Oct 2016 08:44:25 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id BF47E160AD8; Sun, 2 Oct 2016 06:44:25 +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 10F43160AC3 for ; Sun, 2 Oct 2016 08:44:24 +0200 (CEST) Received: (qmail 73152 invoked by uid 500); 2 Oct 2016 06:44:24 -0000 Mailing-List: contact commits-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 commits@airflow.incubator.apache.org Received: (qmail 73142 invoked by uid 99); 2 Oct 2016 06:44:24 -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; Sun, 02 Oct 2016 06:44:24 +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 BFE4D1A0461 for ; Sun, 2 Oct 2016 06:44:23 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -7.019 X-Spam-Level: X-Spam-Status: No, score=-7.019 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 9w9JEBLF7cAP for ; Sun, 2 Oct 2016 06:44:21 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with SMTP id 59A4C5FCB7 for ; Sun, 2 Oct 2016 06:44:21 +0000 (UTC) Received: (qmail 72791 invoked by uid 99); 2 Oct 2016 06:44:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 Oct 2016 06:44:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 9740C2C2A67 for ; Sun, 2 Oct 2016 06:44:20 +0000 (UTC) Date: Sun, 2 Oct 2016 06:44:20 +0000 (UTC) From: "Siddharth Anand (JIRA)" To: commits@airflow.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (AIRFLOW-333) Plugins containing objects without __name__ are broken MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sun, 02 Oct 2016 06:44:25 -0000 [ https://issues.apache.org/jira/browse/AIRFLOW-333?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Siddharth Anand resolved AIRFLOW-333. ------------------------------------- Resolution: Fixed Issue resolved by pull request #1738 [https://github.com/apache/incubator-airflow/pull/1738] > Plugins containing objects without __name__ are broken > ------------------------------------------------------ > > Key: AIRFLOW-333 > URL: https://issues.apache.org/jira/browse/AIRFLOW-333 > Project: Apache Airflow > Issue Type: Bug > Components: core, plugins > Affects Versions: Airflow 1.8 > Reporter: George Leslie-Waksman > Assignee: George Leslie-Waksman > > Using the sample plugin from the documentation: https://pythonhosted.org/airflow/plugins.html > And running against master, results in: > {noformat} > [2016-07-13 16:35:01,662] {__init__.py:50} INFO - Using executor SequentialExecutor > Traceback (most recent call last): > File "/Users/waksman/.pyenv/versions/3.5.1/bin/airflow", line 17, in > from airflow import configuration > File "/Users/waksman/.pyenv/versions/3.5.1/lib/python3.5/site-packages/airflow/__init__.py", line 82, in > operators._integrate_plugins() > File "/Users/waksman/.pyenv/versions/3.5.1/lib/python3.5/site-packages/airflow/operators/__init__.py", line 103, in _integrate_plugins > from airflow.plugins_manager import operators as _operators > File "/Users/waksman/.pyenv/versions/3.5.1/lib/python3.5/site-packages/airflow/plugins_manager.py", line 109, in > make_module('airflow.www.admin_views' + p.name, p.admin_views)) > File "/Users/waksman/.pyenv/versions/3.5.1/lib/python3.5/site-packages/airflow/plugins_manager.py", line 97, in make_module > module.__dict__.update((o.__name__, o) for o in objects) > File "/Users/waksman/.pyenv/versions/3.5.1/lib/python3.5/site-packages/airflow/plugins_manager.py", line 97, in > module.__dict__.update((o.__name__, o) for o in objects) > AttributeError: 'TestView' object has no attribute '__name__' > {noformat} > The issue seems to be because of: https://github.com/apache/incubator-airflow/blob/master/airflow/plugins_manager.py#L97 > This line requires that all objects in a plugin module have a '__name__' attribute. This works just fine for operators, hooks, and executors, which are all classes (and have a __name__) but fails for views, blueprints, and links, which are instances (and do not have __name__). > This appears to have been introduced in https://github.com/apache/incubator-airflow/commit/851adc5547597ec51743be4bc47d634c77d6dc17 -- This message was sent by Atlassian JIRA (v6.3.4#6332)