From dev-return-2960-archive-asf-public=cust-asf.ponee.io@openwhisk.apache.org Wed Dec 19 22:47:11 2018 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 [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 6ECAD180670 for ; Wed, 19 Dec 2018 22:47:10 +0100 (CET) Received: (qmail 75281 invoked by uid 500); 19 Dec 2018 21:47:09 -0000 Mailing-List: contact dev-help@openwhisk.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openwhisk.apache.org Delivered-To: mailing list dev@openwhisk.apache.org Received: (qmail 75268 invoked by uid 99); 19 Dec 2018 21:47:08 -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; Wed, 19 Dec 2018 21:47:08 +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 5EC7CC05F4 for ; Wed, 19 Dec 2018 21:47:08 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.702 X-Spam-Level: X-Spam-Status: No, score=-0.702 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=messagingengine.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 1iWUgMYq6Oug for ; Wed, 19 Dec 2018 21:47:07 +0000 (UTC) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id C6C3860DDC for ; Wed, 19 Dec 2018 21:47:06 +0000 (UTC) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 8E6B422281 for ; Wed, 19 Dec 2018 16:47:06 -0500 (EST) Received: from web6 ([10.202.2.216]) by compute2.internal (MEProxy); Wed, 19 Dec 2018 16:47:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=GIFYN52GD90/nDfkdopRScOhjdt1+aVcZfjfQ45RQ 6U=; b=NePIWNDRc5Uw9uU7BHZvCIaeB2j9mBcghHM1GHO4BgmaZqvV6x5BFi+0p tDzh2FwWLeTZtzwvpd0l0ALEATRmomVFCTz5RIqAoRUzUoOxAu5WnbfjjNq6Zu2W 0LmYhLsh47w9zxu3DkDr5nqxZpC/59phjpg0UgUrbNLNvphyBEg9i2ewivUxU6HO 0lOvSE5e5X+gpE2JJ72o6k5A5RQf36x5OemMvKE4+WEAKiI+ZuzPYooSLHZGD1nk 15BETc4qHIm4qzKkKLSGUtHsnTcPEpbjGygz1l1dzVWX9aOn0+wo7oeAWBtb6RO0 att81ofEJWrzTJdsuH5ANIZI3Dg7g== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtkedrudejtddgudehgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfhuthenuceurghilhhouhhtmecu fedttdenucenucfjughrpefkhffvggfgtgfojghfufffsehtjeertdertdejnecuhfhroh hmpefoihgthhgvlhgvucfutghirggsrghrrhgruceomhhitghhvghlvgesshgtihgrsggr rhhrrgdrtghomheqnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgvlhgvsehstg hirggsrghrrhgrrdgtohhmnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 99) id 9FDCE4140; Wed, 19 Dec 2018 16:47:05 -0500 (EST) Message-Id: <1545256025.2853615.1613917664.28ACF33A@webmail.messagingengine.com> From: Michele Sciabarra To: dev@openwhisk.apache.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-2f590f9a In-Reply-To: References: <1545165746.3388599.1612851984.2047BD85@webmail.messagingengine.com> Subject: Re: Are changes to the ActionLoop required to implement the Pyhton runtime? Date: Wed, 19 Dec 2018 22:47:05 +0100 The proxy is able to report those errors but it reports then in the answer to the init NOT in the log. For example, this: it should "report error if zip-encoded action does not include required file" I changed the test adding a flag errorsAreLogged that defaults to true. With my changes the test now looks like: --- val (out, err) = withActionContainer() { c => val (initCode, initRes) = c.init(initPayload(code, main = "echo")) initCode should be(502) if(!errorsAreLogged) initRes.get.fields.get("error").get.toString() should include("Zip file does not include") } if(errorsAreLogged) checkStreams(out, err, { case (o, e) => o shouldBe empty e should include("Zip file does not include") }) --- Let me know if it is acceptable. If it is, I will fix tests to support the different error reporting semantics. I am not going to change any runtime semantic though. -- Michele Sciabarra michele@sciabarra.com ----- Original message ----- From: Rodric Rabbah To: dev@openwhisk.apache.org Subject: Re: Are changes to the ActionLoop required to implement the Pyhton runtime? Date: Wed, 19 Dec 2018 15:35:26 +0000 Can you give some examples Michele? The errors checked in the test are to give the user some indication of what failed (parse error, missing variable definition, ...) - is the proxy you're working on able to report these errors? i dont think the exact wording matters but the nature of the content is what's important and how it can help the end user figure out what went wrong. -r On Tue, Dec 18, 2018 at 8:49 PM Michele Sciabarra wrote: > Hello all, > > I am implementing an action loop based runtime for Python. So far I > managed to have everything working and I have a runtime that passes all the > mandatory tests. However, I am trying to run it against the existing tests > for the Python runtime and I am hitting the head against the expected > behavior for reporting compilation errors. > > Looks like the current runtime tests expects (and checks) that certain > errors are reported in stdout/stderr and produces output guards also for > the init action, something novel for me. > > Currently, ActionLoop expects a compiler either is silent if there are no > errors OR reports errors in stdout/stderr. However, the output of the > compiler is captured and returned as part of the answer to the init > (either {"ok":true} or {"error":"output-of-the-compiler"}. In particular, > ActionLoop at init time does not produce any guard nor any output in the > log. > > What I should do? To pass those tests I should change the current > ActionLoop behavior, but I do not know if is it important. I am trying to > make it compatible a pass all the tests for expected output but I think I > can instead change the test at least for those behaviors related to error > reporting at init time. > > Please advise. > > -- > Michele Sciabarra > michele@sciabarra.com >