Return-Path: X-Original-To: apmail-aurora-reviews-archive@minotaur.apache.org Delivered-To: apmail-aurora-reviews-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7573611D00 for ; Mon, 21 Apr 2014 18:08:40 +0000 (UTC) Received: (qmail 14789 invoked by uid 500); 21 Apr 2014 18:08:39 -0000 Delivered-To: apmail-aurora-reviews-archive@aurora.apache.org Received: (qmail 14755 invoked by uid 500); 21 Apr 2014 18:08:39 -0000 Mailing-List: contact reviews-help@aurora.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: reviews@aurora.incubator.apache.org Delivered-To: mailing list reviews@aurora.incubator.apache.org Received: (qmail 14747 invoked by uid 99); 21 Apr 2014 18:08:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Apr 2014 18:08:39 +0000 X-ASF-Spam-Status: No, hits=-1998.5 required=5.0 tests=ALL_TRUSTED,HTML_MESSAGE,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 21 Apr 2014 18:08:37 +0000 Received: (qmail 12998 invoked by uid 99); 21 Apr 2014 18:08:13 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Apr 2014 18:08:12 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 625421C6D08; Mon, 21 Apr 2014 18:08:07 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============1007927680367163485==" MIME-Version: 1.0 Subject: Re: Review Request 20521: Extend the client configuration plugin architecture. From: "Maxim Khutornenko" To: "David Robinson" , "Maxim Khutornenko" Cc: "Aurora" , "Mark Chu-Carroll" Date: Mon, 21 Apr 2014 18:08:07 -0000 Message-ID: <20140421180807.19744.6192@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org Auto-Submitted: auto-generated Sender: "Maxim Khutornenko" X-ReviewGroup: Aurora X-ReviewRequest-URL: https://reviews.apache.org/r/20521/ X-Sender: "Maxim Khutornenko" References: <20140421174502.19702.62870@reviews.apache.org> In-Reply-To: <20140421174502.19702.62870@reviews.apache.org> Reply-To: "Maxim Khutornenko" X-ReviewRequest-Repository: aurora X-Virus-Checked: Checked by ClamAV on apache.org --===============1007927680367163485== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit > On April 21, 2014, 5:45 p.m., Mark Chu-Carroll wrote: > > src/main/python/apache/aurora/client/cli/__init__.py, line 337 > > > > > > The reason for this is because these errors are not intended to be handled. They're fatal, and all that they're supposed to do is stop, and print out an informative error message about what went wrong. > > > > Essentially, they're just a non-local return statement, that returns an exit code and an error message. > > > > The only thing that using a Plugin.Error would change is that the exception handling code in the except clause would need to catch two kinds of exceptions instead of just one. It wouldn't add anything. > > Right, it would not add anything now but would not lock us out from a possibility of a customized error handling once this contract is out and multiple plugins are written. Things like client logging to collect failure stats/reasons or plugin code troubleshooting would be easier with a special error type. - Maxim ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/20521/#review40894 ----------------------------------------------------------- On April 21, 2014, 4:53 p.m., Mark Chu-Carroll wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/20521/ > ----------------------------------------------------------- > > (Updated April 21, 2014, 4:53 p.m.) > > > Review request for Aurora, David Robinson and Maxim Khutornenko. > > > Bugs: aurora-332 > https://issues.apache.org/jira/browse/aurora-332 > > > Repository: aurora > > > Description > ------- > > Extend the client configuration plugin architecture. > > Plugins can now run code at three key points: > - Before arguments are processed and execution is dispatched to a command. > - After argument processing and dispatch, but before execution. > - After execution. > > This allows plugins to perform initialization required for argument processing, > and for post-execution cleanups and synchronizations. > > > Diffs > ----- > > src/main/python/apache/aurora/client/cli/__init__.py f1165a05c7c66d7a06f4733eb65ae4a7de6fad76 > src/test/python/apache/aurora/client/cli/test_plugins.py 7cacb02ffda05fdf87a9334ed1de2092efb39f8b > > Diff: https://reviews.apache.org/r/20521/diff/ > > > Testing > ------- > > [sun-wukong incubator-aurora (plugin_with_cleanup)]$ ./pants src/test/python/apache/aurora/client/cli:all > Build operating on targets: OrderedSet([PythonTestSuite(src/test/python/apache/aurora/client/cli/BUILD:all)]) > ============================================== test session starts =============================================== > platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2 > collected 4 items > > src/test/python/apache/aurora/client/cli/test_bridge.py .... > > ============================================ 4 passed in 0.02 seconds ============================================ > ============================================== test session starts =============================================== > platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2 > collected 5 items > > src/test/python/apache/aurora/client/cli/test_help.py ..... > > ============================================ 5 passed in 0.76 seconds ============================================ > ============================================== test session starts =============================================== > platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2 > collected 36 items > > src/test/python/apache/aurora/client/cli/test_cancel_update.py .. > src/test/python/apache/aurora/client/cli/test_create.py .... > src/test/python/apache/aurora/client/cli/test_diff.py ... > src/test/python/apache/aurora/client/cli/test_kill.py ......... > src/test/python/apache/aurora/client/cli/test_open.py ..... > src/test/python/apache/aurora/client/cli/test_restart.py ... > src/test/python/apache/aurora/client/cli/test_status.py ....... > src/test/python/apache/aurora/client/cli/test_update.py ... > > =========================================== 36 passed in 2.02 seconds ============================================ > ============================================== test session starts =============================================== > platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2 > collected 1 items > > src/test/python/apache/aurora/client/cli/test_logging.py . > > ============================================ 1 passed in 0.68 seconds ============================================ > ============================================== test session starts =============================================== > platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2 > collected 2 items > > src/test/python/apache/aurora/client/cli/test_plugins.py .. > > ============================================ 2 passed in 0.63 seconds ============================================ > ============================================== test session starts =============================================== > platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2 > collected 4 items > > src/test/python/apache/aurora/client/cli/test_quota.py .... > > ============================================ 4 passed in 0.61 seconds ============================================ > ============================================== test session starts =============================================== > platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2 > collected 5 items > > src/test/python/apache/aurora/client/cli/test_sla.py ..... > > ============================================ 5 passed in 0.59 seconds ============================================ > ============================================== test session starts =============================================== > platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2 > collected 2 items > > src/test/python/apache/aurora/client/cli/test_task_run.py .. > > ============================================ 2 passed in 0.59 seconds ============================================ > src.test.python.apache.aurora.client.cli.bridge ..... SUCCESS > src.test.python.apache.aurora.client.cli.help ..... SUCCESS > src.test.python.apache.aurora.client.cli.job ..... SUCCESS > src.test.python.apache.aurora.client.cli.logging ..... SUCCESS > src.test.python.apache.aurora.client.cli.plugins ..... SUCCESS > src.test.python.apache.aurora.client.cli.quota ..... SUCCESS > src.test.python.apache.aurora.client.cli.sla ..... SUCCESS > src.test.python.apache.aurora.client.cli.task ..... SUCCESS > [sun-wukong incubator-aurora (plugin_with_cleanup)]$ > > > Thanks, > > Mark Chu-Carroll > > --===============1007927680367163485==--