From commits-return-86522-archive-asf-public=cust-asf.ponee.io@airflow.apache.org Sun Jan 5 13:47:15 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 372B018060E for ; Sun, 5 Jan 2020 14:47:15 +0100 (CET) Received: (qmail 74251 invoked by uid 500); 5 Jan 2020 13:47:14 -0000 Mailing-List: contact commits-help@airflow.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airflow.apache.org Delivered-To: mailing list commits@airflow.apache.org Received: (qmail 74242 invoked by uid 99); 5 Jan 2020 13:47:14 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Jan 2020 13:47:14 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 3873318092D for ; Sun, 5 Jan 2020 13:47:13 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -112.19 X-Spam-Level: X-Spam-Status: No, score=-112.19 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, KAM_DMARC_STATUS=0.01, RCVD_IN_DNSWL_HI=-5, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-he-de.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id F0ZE8Yvqby8O for ; Sun, 5 Jan 2020 13:47:11 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=207.244.88.153; helo=mail.apache.org; envelope-from=jira@apache.org; receiver= Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx1-he-de.apache.org (ASF Mail Server at mx1-he-de.apache.org) with SMTP id 3E5897E12F for ; Sun, 5 Jan 2020 13:47:10 +0000 (UTC) Received: (qmail 74220 invoked by uid 99); 5 Jan 2020 13:47:03 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Jan 2020 13:47:03 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 465FCE0F04 for ; Sun, 5 Jan 2020 13:47:00 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 250357806B9 for ; Sun, 5 Jan 2020 13:47:00 +0000 (UTC) Date: Sun, 5 Jan 2020 13:47:00 +0000 (UTC) From: "Kaxil Naik (Jira)" To: commits@airflow.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AIRFLOW-6347) Can't get task logs in webUI when DAG serialization is enabled MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AIRFLOW-6347?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D17= 008333#comment-17008333 ]=20 Kaxil Naik commented on AIRFLOW-6347: ------------------------------------- Will test and update you guys soon > Can't get task logs in webUI when DAG serialization is enabled > -------------------------------------------------------------- > > Key: AIRFLOW-6347 > URL: https://issues.apache.org/jira/browse/AIRFLOW-6347 > Project: Apache Airflow > Issue Type: Bug > Components: DAG, webserver > Affects Versions: 1.10.7 > Reporter: Anton Cherkasov > Priority: Major > Attachments: serialization-disabled.png, serialization_enabled.pn= g > > > When I set next config options in airflow.cfg: > {noformat} > [core] > store_serialized_dags =3D True > min_serialized_dag_update_interval =3D 3{noformat} > =C2=A0 > View with task logs shows infinity Js spinner, while in webserver log I s= ee next error: > {noformat} > [2019-12-25 14:48:57,640] {{app.py:1891}} ERROR - Exception on /get_logs_= with_metadata [GET] > Traceback (most recent call last): > File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 2446, = in wsgi_app > response =3D self.full_dispatch_request() > File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1951, = in full_dispatch_request > rv =3D self.handle_user_exception(e) > File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1820, = in handle_user_exception > reraise(exc_type, exc_value, tb) > File "/usr/local/lib/python3.7/site-packages/flask/_compat.py", line 39= , in reraise > raise value > File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1949, = in full_dispatch_request > rv =3D self.dispatch_request() > File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1935, = in dispatch_request > return self.view_functions[rule.endpoint](**req.view_args) > File "/usr/local/airflow/.local/lib/python3.7/site-packages/airflow/www= _rbac/decorators.py", line 121, in wrapper > return f(self, *args, **kwargs) > File "/usr/local/lib/python3.7/site-packages/flask_appbuilder/security/= decorators.py", line 101, in wraps > return f(self, *args, **kwargs) > File "/usr/local/airflow/.local/lib/python3.7/site-packages/airflow/www= _rbac/decorators.py", line 56, in wrapper > return f(*args, **kwargs) > File "/usr/local/airflow/.local/lib/python3.7/site-packages/airflow/uti= ls/db.py", line 74, in wrapper > return func(*args, **kwargs) > File "/usr/local/airflow/.local/lib/python3.7/site-packages/airflow/www= _rbac/views.py", line 637, in get_logs_with_metadata > logs, metadata =3D _get_logs_with_metadata(try_number, metadata) > File "/usr/local/airflow/.local/lib/python3.7/site-packages/airflow/www= _rbac/views.py", line 628, in _get_logs_with_metadata > logs, metadatas =3D handler.read(ti, try_number, metadata=3Dmetadata) > File "/usr/local/airflow/.local/lib/python3.7/site-packages/airflow/uti= ls/log/file_task_handler.py", line 169, in read > log, metadata =3D self._read(task_instance, try_number_element, metad= ata) > File "/usr/local/airflow/.local/lib/python3.7/site-packages/airflow/uti= ls/log/file_task_handler.py", line 98, in _read > log_relative_path =3D self._render_filename(ti, try_number) > File "/usr/local/airflow/.local/lib/python3.7/site-packages/airflow/uti= ls/log/file_task_handler.py", line 75, in _render_filename > jinja_context =3D ti.get_template_context() > File "/usr/local/airflow/.local/lib/python3.7/site-packages/airflow/uti= ls/db.py", line 74, in wrapper > return func(*args, **kwargs) > File "/usr/local/airflow/.local/lib/python3.7/site-packages/airflow/mod= els/taskinstance.py", line 1149, in get_template_context > if 'tables' in task.params: > TypeError: argument of type 'NoneType' is not iterable{noformat} > After some investigation I found that *task.params* field is _empty dict_= when DAG serialization is disabled and this field became _None object_ aft= er enabling serialization. > Screenshot of _Task Instance Details_ view with *enabled* DAG serializati= on feature: !serialization_enabled.png! > =C2=A0 > Screenshot of _Task Instance Details_ view with *disabled* DAG serializat= ion feature: > =C2=A0 !serialization-disabled.png! > =C2=A0 > See the _params_ field. > h2. Steps to reproduce: > # Install Airflow 1.10.7 or upgrade from previous one > # Upload some DAG and perform tasks. > # Enable DAG serialization in airflow.conf > # Restart airflow scheduler and webserver > # Go to task's log view > # See infinity spinner and errors in webserver logs -- This message was sent by Atlassian Jira (v8.3.4#803005)