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 7E2F4200C2C for ; Fri, 3 Mar 2017 23:52:08 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 7CBD8160B6D; Fri, 3 Mar 2017 22:52:08 +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 9F54E160B5E for ; Fri, 3 Mar 2017 23:52:07 +0100 (CET) Received: (qmail 38668 invoked by uid 500); 3 Mar 2017 22:51:56 -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 38635 invoked by uid 99); 3 Mar 2017 22:51:56 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Mar 2017 22:51:56 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id F2C22C0262 for ; Fri, 3 Mar 2017 22:51:48 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.651 X-Spam-Level: X-Spam-Status: No, score=0.651 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_NEUTRAL=0.652] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id aVlwzOYWWFpF for ; Fri, 3 Mar 2017 22:51:47 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 3774A5F1C2 for ; Fri, 3 Mar 2017 22:51:47 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 09235E08DE for ; Fri, 3 Mar 2017 22:51:46 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 5E21C24164 for ; Fri, 3 Mar 2017 22:51:45 +0000 (UTC) Date: Fri, 3 Mar 2017 22:51:45 +0000 (UTC) From: "Dan Davydov (JIRA)" To: commits@airflow.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (AIRFLOW-940) Failing to unencrypt one variable shouldn't break the admin/variable page MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 03 Mar 2017 22:52:08 -0000 Dan Davydov created AIRFLOW-940: ----------------------------------- Summary: Failing to unencrypt one variable shouldn't break the admin/variable page Key: AIRFLOW-940 URL: https://issues.apache.org/jira/browse/AIRFLOW-940 Project: Apache Airflow Issue Type: Bug Components: webserver Reporter: Dan Davydov At the moment failing to decrypt one of the airflow variables in the database using the fernet key will cause the admin/variable page to crash. Instead there should be an error message for only the broken variables at the top of the page, and the other ones should still be loaded and displayed. This is what the trace on admin/variable currently looks like: {code} Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1817, in wsgi_app response = self.full_dispatch_request() File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1477, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1381, in handle_user_exception reraise(exc_type, exc_value, tb) File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1475, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1461, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/usr/local/lib/python2.7/dist-packages/flask_admin/base.py", line 68, in inner return self._run_view(f, *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/flask_admin/base.py", line 367, in _run_view return fn(self, *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/flask_admin/model/base.py", line 1814, in index_view return_url=self._get_list_url(view_args), File "/usr/local/lib/python2.7/dist-packages/flask_admin/base.py", line 307, in render return render_template(template, **kwargs) File "/usr/local/lib/python2.7/dist-packages/flask/templating.py", line 128, in render_template context, ctx.app) File "/usr/local/lib/python2.7/dist-packages/flask/templating.py", line 110, in _render rv = template.render(context) File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 989, in render return self.environment.handle_exception(exc_info, True) File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 754, in handle_exception reraise(exc_type, exc_value, tb) File "/usr/local/lib/python2.7/dist-packages/airflow/www/templates/airflow/variable_list.html", line 18, in top-level template code {% extends 'admin/model/list.html' %} File "/usr/local/lib/python2.7/dist-packages/flask_admin/templates/bootstrap3/admin/model/list.html", line 5, in top-level template code {% import 'admin/actions.html' as actionlib with context %} File "/usr/local/lib/python2.7/dist-packages/airflow/www/templates/admin/master.html", line 18, in top-level template code {% extends 'admin/base.html' %} File "/usr/local/lib/python2.7/dist-packages/flask_admin/templates/bootstrap3/admin/base.html", line 30, in top-level template code {% block page_body %} File "/usr/local/lib/python2.7/dist-packages/airflow/www/templates/admin/master.html", line 96, in block "page_body" {% block body %} File "/usr/local/lib/python2.7/dist-packages/flask_admin/templates/bootstrap3/admin/model/list.html", line 62, in block "body" {% block model_list_table %} File "/usr/local/lib/python2.7/dist-packages/flask_admin/templates/bootstrap3/admin/model/list.html", line 110, in block "model_list_table" {% block list_row scoped %} File "/usr/local/lib/python2.7/dist-packages/flask_admin/templates/bootstrap3/admin/model/list.html", line 165, in block "list_row" {{ get_value(row, c) }} File "/usr/local/lib/python2.7/dist-packages/flask_admin/model/base.py", line 1666, in get_list_value self.column_type_formatters, File "/usr/local/lib/python2.7/dist-packages/flask_admin/model/base.py", line 1631, in _get_list_value value = column_fmt(self, context, model, name) File "/usr/local/lib/python2.7/dist-packages/airflow/www/views.py", line 2146, in hidden_field_formatter return getattr(model, name) File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/attributes.py", line 293, in __get__ return self.descriptor.__get__(instance, owner) File "/usr/local/lib/python2.7/dist-packages/airflow/models.py", line 3487, in get_val return FERNET.decrypt(bytes(self._val, 'utf-8')).decode() File "/usr/local/lib/python2.7/dist-packages/cryptography/fernet.py", line 82, in decrypt raise InvalidToken InvalidToken {quote} -- This message was sent by Atlassian JIRA (v6.3.15#6346)