From commits-return-73369-archive-asf-public=cust-asf.ponee.io@airflow.apache.org Thu Oct 31 09:06:34 2019 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 5B911180629 for ; Thu, 31 Oct 2019 10:06:34 +0100 (CET) Received: (qmail 39106 invoked by uid 500); 31 Oct 2019 09:06:33 -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 39096 invoked by uid 99); 31 Oct 2019 09:06:33 -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; Thu, 31 Oct 2019 09:06:33 +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 15AB6C1E2A for ; Thu, 31 Oct 2019 09:06:33 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -112.199 X-Spam-Level: X-Spam-Status: No, score=-112.199 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_HI=-5, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-ec2-va.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 2BcjKLryRuAc for ; Thu, 31 Oct 2019 09:06:31 +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-ec2-va.apache.org (ASF Mail Server at mx1-ec2-va.apache.org) with SMTP id 80F25BC5E0 for ; Thu, 31 Oct 2019 08:49:02 +0000 (UTC) Received: (qmail 3893 invoked by uid 99); 31 Oct 2019 08:49:02 -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; Thu, 31 Oct 2019 08:49:02 +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 A0403E3149 for ; Thu, 31 Oct 2019 08:49:01 +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 4BD37780876 for ; Thu, 31 Oct 2019 08:49:00 +0000 (UTC) Date: Thu, 31 Oct 2019 08:49:00 +0000 (UTC) From: =?utf-8?Q?Mariusz_G=C3=B3rski_=28Jira=29?= To: commits@airflow.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AIRFLOW-5774) PapermillOperator fails to render parameters 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-5774?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D16= 963774#comment-16963774 ]=20 Mariusz G=C3=B3rski commented on AIRFLOW-5774: ----------------------------------------- [~playermanny2]=C2=A0updated the link, it's already on master but not a par= t of latest release.=C2=A0 Please see:=C2=A0[https://github.com/apache/airf= low/commit/a6daeb544e815fe350a96d24ae3bb14aee4079a7#diff-5fe5f93b69bf5129e9= c10232ee13be30] > PapermillOperator fails to render parameters > -------------------------------------------- > > Key: AIRFLOW-5774 > URL: https://issues.apache.org/jira/browse/AIRFLOW-5774 > Project: Apache Airflow > Issue Type: Bug > Components: utils > Affects Versions: 1.10.4 > Reporter: Mariusz G=C3=B3rski > Priority: Minor > Labels: bug > > *Problem* > When running sample PapermillOperator described in docs, it fails with > {code:java} > //[2019-10-27 10:48:53,134] {{taskinstance.py:1047}} ERROR - Can't compil= e non template nodes > Traceback (most recent call last): > File "/usr/local/lib/python3.7/site-packages/airflow/models/taskinstanc= e.py", line 922, in _run_raw_task > result =3D task_copy.execute(context=3Dcontext) > File "/usr/local/lib/python3.7/site-packages/airflow/operators/papermil= l_operator.py", line 71, in execute > logging.info(inlet.as_dict()) > File "/usr/local/lib/python3.7/site-packages/airflow/lineage/datasets.p= y", line 85, in as_dict > attributes[key] =3D env.from_string(value).render(**self.context) > File "/usr/local/lib/python3.7/site-packages/jinja2/environment.py", li= ne 880, in from_string > return cls.from_code(self, self.compile(source), globals, None) > File "/usr/local/lib/python3.7/site-packages/jinja2/environment.py", li= ne 581, in compile > defer_init=3Ddefer_init) > File "/usr/local/lib/python3.7/site-packages/jinja2/environment.py", li= ne 543, in _generate > optimized=3Dself.optimized) > File "/usr/local/lib/python3.7/site-packages/jinja2/compiler.py", line = 78, in generate > raise TypeError('Can\'t compile non template nodes') > TypeError: Can't compile non template nodes > {code} > *Reason* > It's because:=C2=A0_class=C2=A0NoteBook(DataSet)_ expects _parameters_=C2= =A0to be _strings_, while papermill _execute_notebook_=C2=A0function requir= es _parameters_=C2=A0to be _dicts_. When we pass dict to _NoteBook.paramete= rs_, then jinja templating fails when dict is passed to _env.from_string(va= lue).render(**context)_=C2=A0call.=C2=A0 > *Solution:* > Handling of nested structs in DataSet class > =C2=A0 -- This message was sent by Atlassian Jira (v8.3.4#803005)