Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 7094B200C63 for ; Thu, 27 Apr 2017 02:04:14 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 6F42B160BB4; Thu, 27 Apr 2017 00:04:14 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B648E160BA8 for ; Thu, 27 Apr 2017 02:04:13 +0200 (CEST) Received: (qmail 99279 invoked by uid 500); 27 Apr 2017 00:04:13 -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 99268 invoked by uid 99); 27 Apr 2017 00:04:12 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Apr 2017 00:04:12 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 515B2C0DB2; Thu, 27 Apr 2017 00:04:12 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.249 X-Spam-Level: *** X-Spam-Status: No, score=3.249 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, KAM_LOTSOFHASH=0.25, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id vT6KW3ux33zI; Thu, 27 Apr 2017 00:04:11 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 4A0535F4EE; Thu, 27 Apr 2017 00:04:10 +0000 (UTC) Received: from reviews.apache.org (unknown [10.41.0.12]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id AE593E00B4; Thu, 27 Apr 2017 00:04:09 +0000 (UTC) Received: from reviews-vm2.apache.org (localhost [IPv6:::1]) by reviews.apache.org (ASF Mail Server at reviews-vm2.apache.org) with ESMTP id 85383C40B43; Thu, 27 Apr 2017 00:04:09 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============6100946301578957561==" MIME-Version: 1.0 Subject: Re: Review Request 58768: AURORA-1924 Aurora client should reconcile idempotent job creations From: Mehrdad Nurolahzade To: David McLaughlin , Stephan Erb , Zameer Manji Cc: Aurora , Mehrdad Nurolahzade Date: Thu, 27 Apr 2017 00:04:09 -0000 Message-ID: <20170427000409.64641.30364@reviews-vm2.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Mehrdad Nurolahzade X-ReviewGroup: Aurora X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/58768/ X-Sender: Mehrdad Nurolahzade References: <20170426235703.64641.97672@reviews-vm2.apache.org> In-Reply-To: <20170426235703.64641.97672@reviews-vm2.apache.org> Reply-To: Mehrdad Nurolahzade X-ReviewRequest-Repository: aurora archived-at: Thu, 27 Apr 2017 00:04:14 -0000 --===============6100946301578957561== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/58768/#review173134 ----------------------------------------------------------- api/src/main/thrift/org/apache/aurora/gen/api.thrift Lines 960-962 (patched) Personally, I don't like the obsecure contract that I have introduced here using this superflous struct. Should we rather introduce a new `ResponseCode` for idempotency? - Mehrdad Nurolahzade On April 26, 2017, 4:57 p.m., Mehrdad Nurolahzade wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/58768/ > ----------------------------------------------------------- > > (Updated April 26, 2017, 4:57 p.m.) > > > Review request for Aurora, David McLaughlin, Stephan Erb, and Zameer Manji. > > > Bugs: AURORA-1924 > https://issues.apache.org/jira/browse/AURORA-1924 > > > Repository: aurora > > > Description > ------- > > Aurora scheduler rejects a request to create a job if a job with the same key already exists. Aurora client exits with an error once it receives a response with `ResponseCode.INVALID_REQUEST` from scheduler in this case. > > However, an attempt to create a job with the exact same configuration and number of instances is essentially idempotent. Scheduler can detect this situation, ignore it, and signal client to treat operation as successful; client warns user about existing job but does not fail the operation. > > > Diffs > ----- > > api/src/main/thrift/org/apache/aurora/gen/api.thrift 3749531b5412d7ca217736aa85eed8e6606225ad > src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java 059fbb86a575f5b3d78a63c9a7b5a9eebb6cb3ae > src/main/python/apache/aurora/client/cli/jobs.py b79ae56bee0e5692cacf1e66f4a4126b06aaffdc > src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java 016859ca3bf83f64d2576b4c7109729770f9e25c > src/test/python/apache/aurora/client/cli/test_create.py 3b09bb25e919bac2795ccd56bd98657b1f98690b > > > Diff: https://reviews.apache.org/r/58768/diff/1/ > > > Testing > ------- > > - Manually under Vagrant > - End to end test script > > > Thanks, > > Mehrdad Nurolahzade > > --===============6100946301578957561==--