From patchwork Tue May 29 02:13:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael-Doyle Hudson X-Patchwork-Id: 9013 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 7644523E57 for ; Tue, 29 May 2012 02:13:16 +0000 (UTC) Received: from mail-yw0-f52.google.com (mail-yw0-f52.google.com [209.85.213.52]) by fiordland.canonical.com (Postfix) with ESMTP id 24D17A18431 for ; Tue, 29 May 2012 02:13:16 +0000 (UTC) Received: by yhpp61 with SMTP id p61so2364666yhp.11 for ; Mon, 28 May 2012 19:13:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf :content-type:mime-version:x-launchpad-project:x-launchpad-branch :x-launchpad-message-rationale:x-launchpad-branch-revision-number :x-launchpad-notification-type:to:from:subject:message-id:date :reply-to:sender:errors-to:precedence:x-generated-by :x-launchpad-hash:x-gm-message-state; bh=fEE+1UBwtTi6XILUvAfsCebd/GxkFXhYz32cj+tf3kk=; b=Ctyh2H79pV0P/FWBMg7EcoEU+8ofSOZNaRPMyWam6q8xHwoYJfhCNEXJL8xwCuvlqf CKOkpWJ2SDfQmFPibv1yOlP6LTRkMMfXBV5I4ApM+gP/bM7JhgKwBCLVwRqTHEoeZGPe /YQhjZRI1LFe8aXEcPQf0SrTVeCmkVkudzPRwQXiH+0XenTxvj26poF2qMcjAN03ZJdo 8ybONFpnP8CVbEWNeGiyjmqVSS1t83LffTYDWlYttlxJ0BbODA0dZPuRT5UOisEJum2v EzzU8b1P5jydY3kn1gAmVPgAVL+WjooJDDiG6efZzIIw+uuj/+iufe4iuEJibzDhTcGf n/5Q== Received: by 10.50.163.99 with SMTP id yh3mr5611455igb.53.1338257595432; Mon, 28 May 2012 19:13:15 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.24.148 with SMTP id v20csp98605ibb; Mon, 28 May 2012 19:13:14 -0700 (PDT) Received: by 10.14.27.136 with SMTP id e8mr3083854eea.157.1338257594040; Mon, 28 May 2012 19:13:14 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id ed9si11806068wib.4.2012.05.28.19.13.13 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 28 May 2012 19:13:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) client-ip=91.189.90.7; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) smtp.mail=bounces@canonical.com Received: from ackee.canonical.com ([91.189.89.26]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1SZBvs-0000BI-TP for ; Tue, 29 May 2012 02:13:12 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id D75C5E028D for ; Tue, 29 May 2012 02:13:12 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: lava-dispatcher X-Launchpad-Branch: ~linaro-validation/lava-dispatcher/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 304 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-dispatcher/trunk] Rev 304: Fix from Le Chi Thu to log a message when submit_results fails Message-Id: <20120529021312.19870.7920.launchpad@ackee.canonical.com> Date: Tue, 29 May 2012 02:13:12 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="15316"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 6c89fbfbe49de5f8337a16b03c64958dfff0a791 X-Gm-Message-State: ALoCoQk8WW+4Rft4H4y0aQ5V6m/K7RwGVpbypEd5QBLOxa4Oo1D+82BqpS8j6UWbnpTIu9YgVMqf Merge authors: Le Chi Thu le.chi.thu@linaro.org Related merge proposals: https://code.launchpad.net/~le-chi-thu/lava-dispatcher/rapport-result-submit-failures/+merge/104353 proposed by: Le Chi Thu (le-chi-thu) review: Approve - Michael Hudson-Doyle (mwhudson) ------------------------------------------------------------ revno: 304 [merge] committer: Michael Hudson-Doyle branch nick: trunk timestamp: Tue 2012-05-29 14:10:58 +1200 message: Fix from Le Chi Thu to log a message when submit_results fails modified: lava_dispatcher/job.py --- lp:lava-dispatcher https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk You are subscribed to branch lp:lava-dispatcher. To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk/+edit-subscription === modified file 'lava_dispatcher/job.py' --- lava_dispatcher/job.py 2012-05-08 22:03:24 +0000 +++ lava_dispatcher/job.py 2012-05-29 02:10:58 +0000 @@ -85,7 +85,7 @@ 'items': {'type': 'string'}, 'optional': True, }, - }, + }, } @@ -143,7 +143,7 @@ if 'device_type' in self.job_data: metadata['target.device_type'] = self.job_data['device_type'] self.context.test_data.add_metadata(metadata) - + self.context.test_data.add_tags(self.tags) try: @@ -190,7 +190,12 @@ params = submit_results.get('parameters', {}) action = lava_commands[submit_results['command']]( self.context) - action.run(**params) + try: + logging.info("Submitting the test result with parameters = %s", params) + action.run(**params) + except Exception as err: + logging.error("Failed to submit the test result. Error = %s", err) + raise def _set_logging_level(self): # set logging level is optional