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 BD56F10B43 for ; Thu, 13 Mar 2014 18:17:40 +0000 (UTC) Received: (qmail 37081 invoked by uid 500); 13 Mar 2014 18:17:39 -0000 Delivered-To: apmail-aurora-reviews-archive@aurora.apache.org Received: (qmail 37050 invoked by uid 500); 13 Mar 2014 18:17:38 -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 36961 invoked by uid 99); 13 Mar 2014 18:17:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Mar 2014 18:17:29 +0000 X-ASF-Spam-Status: No, hits=-1997.8 required=5.0 tests=ALL_TRUSTED,HTML_MESSAGE,T_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; Thu, 13 Mar 2014 18:17:25 +0000 Received: (qmail 35464 invoked by uid 99); 13 Mar 2014 18:17:04 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Mar 2014 18:17:04 +0000 Received: from localhost (HELO mail-pa0-f44.google.com) (127.0.0.1) (smtp-auth username mchucarroll, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Mar 2014 18:17:04 +0000 Received: by mail-pa0-f44.google.com with SMTP id bj1so1488489pad.3 for ; Thu, 13 Mar 2014 11:17:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=9fEuWWdhdJsFong/4KWqkHuyGS3pwuuXDtR8yODXZ6Q=; b=UNVtarMdLL7ZEviEPmaO0bqXGYSn6JJZnYbE5rVp/e5OxYLZyO0NSi4WKHHWDfPa7Q TE4EgyQQdcEt5ehajNmq/7IH3lxz2UFjidjSDi+rfOQ85mZIYhXYrRDLzyGTCXW9/SY7 Lje3Rac5RdqUBMHRjuWW9gV33EP2SP3f1qAE9TWvoabxwZ1mSQbw/PI6RY05xOkUCWnC 1oWuUwxBq1rMczQdoDrzn5jOZfycmaZPVPxKPrCh5nD5MXD3w+FKztxHL0DIAXVuSv9Q xYt7ceezwMH6P7mjLrCV4/EWXXgdkGVIctXqWAuU4ht1WOgTbWsNyfO1zvx4QZcTRS74 f3DA== X-Gm-Message-State: ALoCoQlZHcT2qQ1cCwp1Yv87Y+IhQyQjrhESYKAj7oa7997WFMee6cKfRFDUGM85oKavkW8dOwb8 MIME-Version: 1.0 X-Received: by 10.68.200.74 with SMTP id jq10mr4044254pbc.169.1394734623913; Thu, 13 Mar 2014 11:17:03 -0700 (PDT) Received: by 10.66.7.234 with HTTP; Thu, 13 Mar 2014 11:17:03 -0700 (PDT) In-Reply-To: References: <20140312222509.19462.40647@reviews.apache.org> <20140313170711.32376.89969@reviews.apache.org> <7A8C5E1B-CA63-406C-A6AA-5B54E3F46F5C@apache.org> Date: Thu, 13 Mar 2014 11:17:03 -0700 Message-ID: Subject: Re: Review Request 19159: Add killall. From: Mark Chu-Carroll To: Maxim Khutornenko Cc: Mark Chu-Carroll , Kevin Sweeney , Bill Farner , Aurora Content-Type: multipart/alternative; boundary=047d7b10d1edd0906a04f480f531 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b10d1edd0906a04f480f531 Content-Type: text/plain; charset=ISO-8859-1 But in some sense, this isn't a standard command. This is a dangerous command, and we want it to be out of the ordinary. We want to be sure that it's not done accidentally, and making its flag behavior be strange is arguably good. -Mark On Thu, Mar 13, 2014 at 11:14 AM, Maxim Khutornenko wrote: > What looks odd though is a command that is unusable without the --force > flag. The standard optional semantic of that flag feels violated here. > > > On Thu, Mar 13, 2014 at 11:10 AM, Maxim Khutornenko wrote: > >> What looks odd though is a command that is unusable without the --force >> flag. The standard optional semantic of that flag is violated here. >> >> On Mar 13, 2014, at 11:07 AM, Mark Chu-Carroll >> wrote: >> >> I think making a reasonable effort to make it harder to accidentally do >> this is worthwhile - there's no harm in it, and it might just help. >> >> -Mark >> >> >> On Thu, Mar 13, 2014 at 10:07 AM, Kevin Sweeney wrote: >> >>> This is an automatically generated e-mail. To reply, visit: >>> https://reviews.apache.org/r/19159/ >>> >>> On March 12th, 2014, 3:25 p.m. PDT, *Mark Chu-Carroll* wrote: >>> >>> src/main/python/apache/aurora/client/commands/core.py (Diff >>> revision 1) >>> >>> def show_job_pretty(job): >>> >>> 397 >>> >>> @app.command_option('--force', default=False, action='store_true', >>> >>> This is deliberate: the "kill" command doesn't have a "force" option. So this ensures that there's more than a search-and-replace killall for kill: you need to deliberately use the killall command, and specify the force option. >>> >>> The require --shards is also in this change - see the change above in kill. >>> >>> On March 12th, 2014, 3:29 p.m. PDT, *Maxim Khutornenko* wrote: >>> >>> Missed the --shards part, thanks. >>> >>> If someone is going to search-and-replace kill with killall without wanting to do that I'm not sure we can stop them from shooting themselves in the foot. Up to you but I'm in favor of dropping this required option. >>> >>> >>> - Kevin >>> >>> On March 12th, 2014, 3:11 p.m. PDT, Mark Chu-Carroll wrote: >>> Review request for Aurora, Kevin Sweeney and Bill Farner. >>> By Mark Chu-Carroll. >>> >>> *Updated March 12, 2014, 3:11 p.m.* >>> *Bugs: * aurora-260 >>> *Repository: * aurora >>> Description >>> >>> Add killall. >>> >>> - the kill command now requires a shards parameter. >>> - the new killall command only works when run with "--force". >>> - killall generates a scary warning message, and pauses to give >>> the user a chance to abort. >>> >>> Testing >>> >>> Modified the existing kill command's test suite, adding new tests of the new functionality. All pass. >>> >>> [sun-wukong incubator-aurora (killall)]$ ./pants src/test/python/apache/aurora/client/commands:core >>> Build operating on targets: OrderedSet([PythonTests(src/test/python/apache/aurora/client/commands/BUILD:core)]) >>> ============================= test session starts ============================= >>> platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2 >>> collected 26 items >>> >>> src/test/python/apache/aurora/client/commands/test_cancel_update.py .. >>> src/test/python/apache/aurora/client/commands/test_create.py ...... >>> src/test/python/apache/aurora/client/commands/test_diff.py ... >>> src/test/python/apache/aurora/client/commands/test_kill.py ..... >>> src/test/python/apache/aurora/client/commands/test_listjobs.py .. >>> src/test/python/apache/aurora/client/commands/test_restart.py ... >>> src/test/python/apache/aurora/client/commands/test_status.py .. >>> src/test/python/apache/aurora/client/commands/test_update.py ... >>> >>> ========================= 26 passed in 11.34 seconds ========================== >>> src.test.python.apache.aurora.client.commands.core ..... SUCCESS >>> >>> Diffs >>> >>> - src/main/python/apache/aurora/client/commands/core.py >>> (ff0f1f8668c8c405fa3a41b70cae32004034e223) >>> - src/test/python/apache/aurora/client/commands/test_kill.py >>> (7639dc98bfea0663461d15e3d46f1aedd13b124f) >>> >>> View Diff >>> >> >> >> > --047d7b10d1edd0906a04f480f531--