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 DD56C181B4 for ; Fri, 16 Oct 2015 17:32:28 +0000 (UTC) Received: (qmail 65109 invoked by uid 500); 16 Oct 2015 17:32:28 -0000 Delivered-To: apmail-aurora-reviews-archive@aurora.apache.org Received: (qmail 65052 invoked by uid 500); 16 Oct 2015 17:32:28 -0000 Mailing-List: contact reviews-help@aurora.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: reviews@aurora.apache.org Delivered-To: mailing list reviews@aurora.apache.org Received: (qmail 65025 invoked by uid 99); 16 Oct 2015 17:32:28 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Oct 2015 17:32:28 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 731D82A3B4A; Fri, 16 Oct 2015 17:32:26 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============0481325258487598308==" MIME-Version: 1.0 Subject: Re: Review Request 39366: Adding job update diff details into "aurora job diff" command. From: "Maxim Khutornenko" To: "Joshua Cohen" , "Bill Farner" Cc: "Maxim Khutornenko" , "Aurora" Date: Fri, 16 Oct 2015 17:32:26 -0000 Message-ID: <20151016173226.28636.81778@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: "Maxim Khutornenko" X-ReviewGroup: Aurora X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/39366/ X-Sender: "Maxim Khutornenko" References: <20151016171947.1509.88912@reviews.apache.org> In-Reply-To: <20151016171947.1509.88912@reviews.apache.org> Reply-To: "Maxim Khutornenko" X-ReviewRequest-Repository: aurora --===============0481325258487598308== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit > On Oct. 16, 2015, 5:19 p.m., Joshua Cohen wrote: > > Without digging into the code, just based on the output in the testing done section, would it be possible to collapse the output into instance ranges? So instead of [100, 101, 102, ... 119], we just get [100-119]? Using ranges was my first thought but I decided in favor of expanded ranges for two reasons: 1. easier to grep a particular instance from the cli output. 2. easier to grasp the scope of the upcoming change. The latter is particularly important. It's easy to miss or misjudge a collapsed range like [0,199] under "removed" and kill the entire service. Whereas an expanded range like [0,1,2...198,199] would be virtually impossible to miss. Does the above make sense? Am I exaggerating the benefits here? - Maxim ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/39366/#review102934 ----------------------------------------------------------- On Oct. 16, 2015, 12:25 a.m., Maxim Khutornenko wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/39366/ > ----------------------------------------------------------- > > (Updated Oct. 16, 2015, 12:25 a.m.) > > > Review request for Aurora, Joshua Cohen and Bill Farner. > > > Bugs: AURORA-1516 > https://issues.apache.org/jira/browse/AURORA-1516 > > > Repository: aurora > > > Description > ------- > > "aurora job diff" now prints update sequence along with diff details when applicable (updated instances). > > > Diffs > ----- > > src/main/python/apache/aurora/client/api/__init__.py 4b9c48e84bc203fc7b28d7efd0b2e6b8a6f18302 > src/main/python/apache/aurora/client/cli/jobs.py 6d15f1e8558f9df5f00994d20949f19b0de1ad32 > src/test/python/apache/aurora/client/api/test_api.py b56e35265b1e32d61a13fe72734cae824737278d > src/test/python/apache/aurora/client/cli/test_diff.py 753a0417caf29249cbc2fca5a9fc41b1ce535c92 > src/test/python/apache/aurora/client/cli/util.py b03148b4edaa334620a72bee1937c8c16e19f23e > > Diff: https://reviews.apache.org/r/39366/diff/ > > > Testing > ------- > > ./pants test.pytest --no-fast src/test/python:: > > Also tested manually in vagrant: > > Upscale and update: > ``` > $ aurora job diff devcluster/www-data/prod/hello aurora/examples/jobs/hello_world.aurora > INFO] Starting update for: hello > A job update with this config will: > ----> add instances: [100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119] > ----> update instances: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [21, 22, 23, 24, 25, 26, 27, 28, 29], [41, 42, 43, 44], [61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99] > with diff: > 64c64 > < "cpu": 2.0, > --- > > "cpu": 3.0, > 75c75 > < 'numCpus': 2.0, > --- > > 'numCpus': 3.0, > ----> update instances: [30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40], [45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60] > with diff: > 64c64 > < "cpu": 4.0, > --- > > "cpu": 3.0, > 75c75 > < 'numCpus': 4.0, > --- > > 'numCpus': 3.0, > ----> not change instances: [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20] > ``` > > Diff with instance spec: > ``` > $ aurora job diff devcluster/www-data/prod/hello/0-10 aurora/examples/jobs/hello_world.aurora > INFO] Starting update for: hello > A job update with this config will: > ----> update instances: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] > with diff: > 64c64 > < "cpu": 2.0, > --- > > "cpu": 3.0, > 75c75 > < 'numCpus': 2.0, > --- > > 'numCpus': 3.0, > ----> not change instances: [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], [21, 22, 23, 24, 25, 26, 27, 28, 29], [30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40], [41, 42, 43, 44], [45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60], [61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99] > ``` > > Downscale and update: > ``` > $ aurora job diff devcluster/www-data/prod/hello aurora/examples/jobs/hello_world.aurora > INFO] Starting update for: hello > A job update with this config will: > ----> remove instances: [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], [21, 22, 23, 24, 25, 26, 27, 28, 29], [30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40], [41, 42, 43, 44], [45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60], [61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99] > ----> update instances: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] > with diff: > 64c64 > < "cpu": 2.0, > --- > > "cpu": 3.0, > 75c75 > < 'numCpus': 2.0, > --- > > 'numCpus': 3.0, > ``` > > Update non-existent job: > ``` > $ aurora job diff devcluster/www-data/prod/hello1 aurora/examples/jobs/hello_world.aurora > INFO] Starting update for: hello1 > A job update with this config will: > ----> add instances: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] > ``` > > > Thanks, > > Maxim Khutornenko > > --===============0481325258487598308==--