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 7C662116E0 for ; Wed, 18 Jun 2014 15:26:44 +0000 (UTC) Received: (qmail 68963 invoked by uid 500); 18 Jun 2014 15:26:44 -0000 Delivered-To: apmail-aurora-reviews-archive@aurora.apache.org Received: (qmail 68923 invoked by uid 500); 18 Jun 2014 15:26:44 -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 68912 invoked by uid 99); 18 Jun 2014 15:26:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Jun 2014 15:26:43 +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; Wed, 18 Jun 2014 15:26:43 +0000 Received: (qmail 68654 invoked by uid 99); 18 Jun 2014 15:26:18 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Jun 2014 15:26:18 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id F344F1D9CBF; Wed, 18 Jun 2014 15:26:07 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============8419260889259848746==" MIME-Version: 1.0 Subject: Re: Review Request 22457: Improve aurora "job diff" command. From: "Maxim Khutornenko" To: "Brian Wickman" , "David McLaughlin" Cc: "Aurora" , "Maxim Khutornenko" , "Mark Chu-Carroll" Date: Wed, 18 Jun 2014 15:26:07 -0000 Message-ID: <20140618152607.13794.75567@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/22457/ X-Sender: "Maxim Khutornenko" References: <20140616214538.13794.74165@reviews.apache.org> In-Reply-To: <20140616214538.13794.74165@reviews.apache.org> Reply-To: "Maxim Khutornenko" X-ReviewRequest-Repository: aurora X-Virus-Checked: Checked by ClamAV on apache.org --===============8419260889259848746== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit > On June 16, 2014, 9:45 p.m., Maxim Khutornenko wrote: > > src/main/python/apache/aurora/client/cli/jobs.py, lines 181-182 > > > > > > I don't think it's enough to json-serialize a thrift task. This is bound to set/dict serialization sorting problem we have battled with in updater.py. Specifically this block: https://github.com/apache/incubator-aurora/blob/master/src/main/python/apache/aurora/client/api/updater.py#L200-L223 > > > > Without sorting, the diff will only work 99% of the time. This has been demonstrated in a few real-life job updates. > > Mark Chu-Carroll wrote: > This isn't a new thing in this updated diff system - this is the current behavior. > > If you use the new json-tree-diff, you won't have this problem; but for people who rely on the current diff > behavior, I'd rather not change that. > | If you use the new json-tree-diff, you won't have this problem; Perhaps I am missing something but how would the new approach ensure equivalence of these two structs? { 'set1': { ['k1':'v1', 'k2':'v2']} } { 'set2': { ['k2':'v2', 'k1':'v1']} } It's "normal" to see element re-ordering like this during thrift struct serialization. - Maxim ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/22457/#review45835 ----------------------------------------------------------- On June 18, 2014, 2:59 p.m., Mark Chu-Carroll wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/22457/ > ----------------------------------------------------------- > > (Updated June 18, 2014, 2:59 p.m.) > > > Review request for Aurora, David McLaughlin and Brian Wickman. > > > Bugs: aurora-520 > https://issues.apache.org/jira/browse/aurora-520 > > > Repository: aurora > > > Description > ------- > > Add a new diff method, which uses field-by-field comparison of JSON trees for comparing running job configurations to potentially updated configs. > > - Allow exclusion of semantically irrelevant fields. > - Provide a clearer list of the differences between configs. > - Provide a scripting-friendly alternative JSON syntax for diffs. > > The old diff behavior is still available under the "--use-shell-diff" option. > > > Diffs > ----- > > src/main/python/apache/aurora/client/cli/BUILD ebe681a0d1735b7cc695dc3b7a14c4292d87ae32 > src/main/python/apache/aurora/client/cli/jobs.py 4fa03a6c9919651551238b0dc211ed69a8dfe565 > src/main/python/apache/aurora/client/cli/json_tree_diff.py PRE-CREATION > src/test/python/apache/aurora/client/cli/BUILD 3c88ed7cf9f654bbbd80d1d44aa1dd1c8655e378 > src/test/python/apache/aurora/client/cli/test_diff.py 38629b63c082cf81cb891dace2a70d9e8f418e18 > src/test/python/apache/aurora/client/cli/test_json_diff.py PRE-CREATION > > Diff: https://reviews.apache.org/r/22457/diff/ > > > Testing > ------- > > New unit tests of the JSON tree diff code, plus a bunch of new "job diff" tests of the new functionality. > All tests pass. > > > Thanks, > > Mark Chu-Carroll > > --===============8419260889259848746==--