From reviews-return-76553-apmail-mesos-reviews-archive=mesos.apache.org@mesos.apache.org Sat Apr 21 00:13:46 2018 Return-Path: X-Original-To: apmail-mesos-reviews-archive@minotaur.apache.org Delivered-To: apmail-mesos-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 5574518216 for ; Sat, 21 Apr 2018 00:13:46 +0000 (UTC) Received: (qmail 22764 invoked by uid 500); 21 Apr 2018 00:13:46 -0000 Delivered-To: apmail-mesos-reviews-archive@mesos.apache.org Received: (qmail 22743 invoked by uid 500); 21 Apr 2018 00:13:46 -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 22731 invoked by uid 99); 21 Apr 2018 00:13:45 -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; Sat, 21 Apr 2018 00:13:45 +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 24F6D1807BC; Sat, 21 Apr 2018 00:13:45 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.189 X-Spam-Level: * X-Spam-Status: No, score=1.189 tagged_above=-999 required=6.31 tests=[HEADER_FROM_DIFFERENT_DOMAINS=0.249, HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, KAM_LOTSOFHASH=0.25, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01] 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 MWVwm5ralNuA; Sat, 21 Apr 2018 00:13:43 +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 9C9965F238; Sat, 21 Apr 2018 00:13:43 +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 3EF85E00CC; Sat, 21 Apr 2018 00:13:43 +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 0EAFAC40659; Sat, 21 Apr 2018 00:13:43 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============5553382076139864938==" MIME-Version: 1.0 Subject: Re: Review Request 66460: Added a `call()` method to the v1 scheduler library. From: Gaston Kleiman To: Greg Mann , Vinod Kone Cc: Gaston Kleiman , mesos Date: Sat, 21 Apr 2018 00:13:43 -0000 Message-ID: <20180421001343.25941.10512@reviews-vm2.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Gaston Kleiman X-ReviewGroup: mesos X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/66460/ X-Sender: Gaston Kleiman References: <20180421000357.25940.95802@reviews-vm2.apache.org> In-Reply-To: <20180421000357.25940.95802@reviews-vm2.apache.org> Reply-To: Gaston Kleiman X-ReviewRequest-Repository: mesos --===============5553382076139864938== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/66460/#review201673 ----------------------------------------------------------- Changed the return type to the following proto message: ``` /** * This message is used ty the C++ Scheduler HTTP API library as the return * type of the `call()` method. The message includes the HTTP status code with * which the master responded, and optionally a `scheduler::Response` message. * * There are three cases to consider depending on the HTTP response status code: * * (1) '202 ACCEPTED': Indicates the call was accepted for processing and * neither `response` nor `error` will be set. * * (2) '200 OK': Indicates the call completed successfully, and the `response` * field will be set if the `scheduler::Call::Type` has a corresponding * `scheduler::Response::Type`; `error` will not be set. * * (3) For all other HTTP status codes, the `response` field will not be set * and the `error` field may be set to provide more information. * * NOTE: This message is used by the C++ Scheduler HTTP API library and not part * of the API specification. */ message APIResult { // HTTP status code with which the master responded. required uint32 status_code = 1; // This field will only be set if the call completed successfully and the // master responded with `200 OK` and a non-empty body. optional Response response = 2; // This field will only be set if the call did not complete successfully and // the master responded with a status other than `202 Accepted` or `200 OK`, // and with a non-empty body. optional string error = 3; } ``` I tried to reply to BenM's issue, but Review Board doesn't let me publish the draft ¯_(?)_/¯. - Gaston Kleiman On April 20, 2018, 5:03 p.m., Gaston Kleiman wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/66460/ > ----------------------------------------------------------- > > (Updated April 20, 2018, 5:03 p.m.) > > > Review request for mesos, Greg Mann and Vinod Kone. > > > Bugs: MESOS-8192 > https://issues.apache.org/jira/browse/MESOS-8192 > > > Repository: mesos > > > Description > ------- > > This patch adds a `call()` method to the scheduler library that allows > clients to send a `v1::scheduler::Call` to the master and receive a > `v1::scheduler::Response`. > > It is going to be used to test operation state reconciliation. > > > Diffs > ----- > > include/mesos/v1/scheduler.hpp d56e08861d5190ef66992d383dc5710d8f6ce661 > include/mesos/v1/scheduler/scheduler.proto 25ebcfcb07cb4fb928dcfdc242bb6509c9080491 > src/java/jni/org_apache_mesos_v1_scheduler_V0Mesos.cpp 60b17b9be74132c81532d22eba681feb899b22a3 > src/scheduler/scheduler.cpp ecef916ffd0797a13552525ff2cda0f99ca57e74 > > > Diff: https://reviews.apache.org/r/66460/diff/4/ > > > Testing > ------- > > `sudo bin/mesos-tests` on GNU/Linux > > > Thanks, > > Gaston Kleiman > > --===============5553382076139864938==--