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 8D0B6200CA9 for ; Fri, 2 Jun 2017 01:36:29 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 8B90E160BDF; Thu, 1 Jun 2017 23:36:29 +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 D25CB160BC4 for ; Fri, 2 Jun 2017 01:36:28 +0200 (CEST) Received: (qmail 70115 invoked by uid 500); 1 Jun 2017 23:36:27 -0000 Mailing-List: contact reviews-help@mesos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: reviews@mesos.apache.org Delivered-To: mailing list reviews@mesos.apache.org Received: (qmail 70104 invoked by uid 99); 1 Jun 2017 23:36:27 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Jun 2017 23:36:27 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id E34FE180314; Thu, 1 Jun 2017 23:36:26 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 5.747 X-Spam-Level: ***** X-Spam-Status: No, score=5.747 tagged_above=-999 required=6.31 tests=[HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, KAM_LOTSOFHASH=0.25, RP_MATCHES_RCVD=-0.001, SUSPICIOUS_RECIPS=2.497] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id dBFKlyDHXipq; Thu, 1 Jun 2017 23:36:24 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 813315FDBB; Thu, 1 Jun 2017 23:36:23 +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 2CA82E0051; Thu, 1 Jun 2017 23:36:23 +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 E74E2C402DA; Thu, 1 Jun 2017 23:36:22 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============0188157598673203856==" MIME-Version: 1.0 Subject: Re: Review Request 59099: Enabled authorization for v1 API call UPDATE_MAINTENANCE_SCHEDULE. From: Greg Mann To: Adam B , Till Toenshoff , Greg Mann Cc: mesos , Alexander Rojas Date: Thu, 01 Jun 2017 23:36:22 -0000 Message-ID: <20170601233622.32377.57418@reviews-vm2.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Greg Mann X-ReviewGroup: mesos X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/59099/ X-Sender: Greg Mann References: <20170601145708.14309.98415@reviews-vm2.apache.org> In-Reply-To: <20170601145708.14309.98415@reviews-vm2.apache.org> Reply-To: Greg Mann X-ReviewRequest-Repository: mesos archived-at: Thu, 01 Jun 2017 23:36:29 -0000 --===============0188157598673203856== 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/59099/#review176701 ----------------------------------------------------------- src/master/http.cpp Lines 4096-4169 (original), 4113-4205 (patched) +1 to Till's comment here. I could imagine doing this with either one or two additional member function continuations. i.e., you could defer to a new `__updateMaintenanceSchedule` at L4113, and then to a new `___updateMaintenanceSchedule` at L4131. Or, it also seems reasonable to me to add just one new continuation at L4131, since the lambda starting at L4113 is short and only performs a bit of validation. src/tests/api_tests.cpp Lines 1205-1218 (patched) I understand that you were just following an existing pattern here, but it does seem pretty inconsistent with the rest of our test code. I would prefer Till's suggestion as well. Perhaps you could create a ticket to update all the tests here which use this `.then` continuation approach, to make them more consistent with the rest of the codebase, and add a TODO in this file with a link to the ticket? Could go in a separate review. - Greg Mann On June 1, 2017, 2:57 p.m., Alexander Rojas wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/59099/ > ----------------------------------------------------------- > > (Updated June 1, 2017, 2:57 p.m.) > > > Review request for mesos, Adam B, Greg Mann, and Till Toenshoff. > > > Bugs: MESOS-7415 > https://issues.apache.org/jira/browse/MESOS-7415 > > > Repository: mesos > > > Description > ------- > > Enables the use of authorization for the `UPDATE_MAINTENANCE_SCHEDULE` > v1 API call, using the ACL `UpdateMaintenanceSchedule` and the action > of the same name as the API call. > > It also updates the ApiTests to take into account the authorization > case. > > > Diffs > ----- > > src/master/http.cpp 1dcfe6ef00b0e3984deb79a511e665f638661323 > src/master/master.hpp 89d0790fd5fea59e74276f462581fe0073594732 > src/tests/api_tests.cpp 91b3473452b8e65cab9f2e873837d64a0edf4b54 > > > Diff: https://reviews.apache.org/r/59099/diff/5/ > > > Testing > ------- > > make check > > > Thanks, > > Alexander Rojas > > --===============0188157598673203856==--