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 BE717200C29 for ; Tue, 28 Feb 2017 14:38:03 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id BCFC4160B7C; Tue, 28 Feb 2017 13:38:03 +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 13C4A160B6A for ; Tue, 28 Feb 2017 14:38:02 +0100 (CET) Received: (qmail 12285 invoked by uid 500); 28 Feb 2017 13:38:02 -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 12265 invoked by uid 99); 28 Feb 2017 13:38:01 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Feb 2017 13:38:01 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 438EB31B596; Tue, 28 Feb 2017 13:38:01 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============6928733651533389008==" MIME-Version: 1.0 Subject: Re: Review Request 56813: Updated master handlers to use 'AuthenticationContext'. From: Alexander Rojas To: Alexander Rojas , Adam B , Vinod Kone , Till Toenshoff , Jan Schlicht Cc: Greg Mann , mesos Date: Tue, 28 Feb 2017 13:38:01 -0000 Message-ID: <20170228133801.32557.69209@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Alexander Rojas X-ReviewGroup: mesos X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/56813/ X-Sender: Alexander Rojas References: <20170228065626.32557.61428@reviews.apache.org> In-Reply-To: <20170228065626.32557.61428@reviews.apache.org> Reply-To: Alexander Rojas X-ReviewRequest-Repository: mesos archived-at: Tue, 28 Feb 2017 13:38:03 -0000 --===============6928733651533389008== 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/56813/#review167059 ----------------------------------------------------------- src/master/http.cpp (line 115) wasn't metrics process used at all? src/master/http.cpp (lines 805 - 806) This can be merge into one line. src/master/http.cpp (lines 884 - 886) I'm not sure printing the whole `principal` with name and claims is such a good idea. The reason is that you only print `framework->info.principal()`, and to my knowledge, only compare the names. Perhaps is a better idea to only print `principal->name`? src/master/http.cpp (lines 1104 - 1106) This line doesn't need change. src/master/http.cpp (lines 2203 - 2206) This line didn't need modification. However it does raises the issue of the signature of `validation::operation::validate()`. The common pattern in Mesos is to use a default parameter in the declaration, like: ```c++ Option validate( const Offer::Operation::Reserve& reserve, const Option& principal, const Option& frameworkInfo = None()) ``` so that the caller doesn't need to do it. Doing a grep on the srouce code in over a hundred instances of that pattern. Could you quickly fix that? src/master/master.cpp (lines 1070 - 1073) No need for the break and indent. src/master/master.cpp (line 3880) /Option::none()/None()/ src/master/master.cpp (line 3893) /Option::none()/None()/ src/master/master.cpp (line 3919) /Option::none()/None()/ - Alexander Rojas On Feb. 28, 2017, 7:56 a.m., Greg Mann wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/56813/ > ----------------------------------------------------------- > > (Updated Feb. 28, 2017, 7:56 a.m.) > > > Review request for mesos, Adam B, Alexander Rojas, Jan Schlicht, Till Toenshoff, and Vinod Kone. > > > Bugs: MESOS-7003 > https://issues.apache.org/jira/browse/MESOS-7003 > > > Repository: mesos > > > Description > ------- > > This patch updates the HTTP endpoint handlers in the > master process to accept the `Principal` type instead > of an `Option& principal`. > > > Diffs > ----- > > src/master/http.cpp 6e5178eeea6cc6b90ae253840da22be13444b088 > src/master/master.hpp 764adb18ddf09b62529c5c96f8e4dfaf7803483e > src/master/master.cpp 2ef836536784d5fda23c80dc2304239b176a8942 > src/master/quota_handler.cpp 3ad28e4a9363a877d0610b529a6c17fb30ece37a > src/master/registrar.cpp d7134eea34102ab7b24d2f0131363bdd9005cfd3 > src/master/weights_handler.cpp 4f6a4cd29d27b64cbc9ee6d8909f79812313b681 > > Diff: https://reviews.apache.org/r/56813/diff/ > > > Testing > ------- > > Testing details can be found at the end of this review chain. > > > Thanks, > > Greg Mann > > --===============6928733651533389008==--