From reviews-return-92569-apmail-mesos-reviews-archive=mesos.apache.org@mesos.apache.org Thu Sep 10 00:03:30 2020 Return-Path: X-Original-To: apmail-mesos-reviews-archive@locus.apache.org Delivered-To: apmail-mesos-reviews-archive@locus.apache.org Received: from mailroute1-lw-us.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by minotaur.apache.org (Postfix) with ESMTP id 30A05197DE for ; Thu, 10 Sep 2020 00:03:30 +0000 (UTC) Received: from mail.apache.org (localhost [127.0.0.1]) by mailroute1-lw-us.apache.org (ASF Mail Server at mailroute1-lw-us.apache.org) with SMTP id D71911221AA for ; Thu, 10 Sep 2020 00:03:29 +0000 (UTC) Received: (qmail 56828 invoked by uid 500); 10 Sep 2020 00:03:29 -0000 Delivered-To: apmail-mesos-reviews-archive@mesos.apache.org Received: (qmail 56808 invoked by uid 500); 10 Sep 2020 00:03:29 -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 56795 invoked by uid 99); 10 Sep 2020 00:03:29 -0000 Received: from spamproc1-he-fi.apache.org (HELO spamproc1-he-fi.apache.org) (95.217.134.168) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Sep 2020 00:03:29 +0000 Received: from localhost (localhost [127.0.0.1]) by spamproc1-he-fi.apache.org (ASF Mail Server at spamproc1-he-fi.apache.org) with ESMTP id 4D6BEC0477 for ; Thu, 10 Sep 2020 00:03:28 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamproc1-he-fi.apache.org X-Spam-Flag: NO X-Spam-Score: 1.611 X-Spam-Level: * X-Spam-Status: No, score=1.611 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=0.2, KAM_DMARC_STATUS=0.01, KAM_LAZY_DOMAIN_SECURITY=1, KHOP_HELO_FCRDNS=0.4, SPF_NONE=0.001] autolearn=disabled Received: from mx1-he-de.apache.org ([209.188.14.141]) by localhost (spamproc1-he-fi.apache.org [95.217.134.168]) (amavisd-new, port 10024) with ESMTP id e1yi6eJjo1vD for ; Thu, 10 Sep 2020 00:03:27 +0000 (UTC) Received-SPF: None (mailfrom) identity=mailfrom; client-ip=95.217.165.199; helo=reviews-vm-he-fi.apache.org; envelope-from=noreply@reviews.apache.org; receiver= Received: from reviews-vm-he-fi.apache.org (static.199.165.217.95.clients.your-server.de [95.217.165.199]) by mx1-he-de.apache.org (ASF Mail Server at mx1-he-de.apache.org) with ESMTP id 0013E7F5C7 for ; Thu, 10 Sep 2020 00:03:25 +0000 (UTC) Received: from reviews-vm-he-fi.apache.org (reviews-vm-he-fi.apache.org [127.0.0.1]) by reviews-vm-he-fi.apache.org (Postfix) with ESMTP id 813391603E3; Thu, 10 Sep 2020 00:03:25 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============3465804741802965308==" MIME-Version: 1.0 Subject: Re: Review Request 72840: Exposed offer constraints via the `/state` and `/frameworks` endpoints. From: Benjamin Mahler To: Benjamin Mahler Cc: Andrei Sekretenko , mesos Date: Thu, 10 Sep 2020 00:03:25 -0000 Message-ID: <20200910000325.13941.53424@reviews-vm-he-fi.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Benjamin Mahler X-ReviewGroup: mesos X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/72840/ X-Sender: Benjamin Mahler X-ReviewBoard-ShipIt: 1 References: <20200907152719.13941.12462@reviews-vm-he-fi.apache.org> In-Reply-To: <20200907152719.13941.12462@reviews-vm-he-fi.apache.org> Reply-To: Benjamin Mahler X-ReviewRequest-Repository: mesos --===============3465804741802965308== 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/72840/#review221837 ----------------------------------------------------------- Fix it, then Ship it! src/tests/master/update_framework_tests.cpp Lines 914 (patched) Remove this? and consider putting it on the assertion instead? E.g. ``` ASSERT_SOME_EQ(JSON::protobuf(updatedConstraints), reportedConstraints) << "Expected: " << ... "\n vs actual: " << ...; ``` Is this not printing out the two correctly upon failure? src/tests/master/update_framework_tests.cpp Lines 919 (patched) It's a little hard to see what it's supposed to look like based on this, seems preferrable to me to check the expected json in some fashion? E.g. ``` JSON::Value expected = ... "offer_constraints: { ... }" ``` Like we do in other tests, that way, you can read the test and know what the API response is supposed to look like? src/tests/master/update_framework_tests.cpp Lines 921 (patched) Any reason not to just implement the check? - Benjamin Mahler On Sept. 7, 2020, 3:27 p.m., Andrei Sekretenko wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/72840/ > ----------------------------------------------------------- > > (Updated Sept. 7, 2020, 3:27 p.m.) > > > Review request for mesos and Benjamin Mahler. > > > Bugs: MESOS-10179 > https://issues.apache.org/jira/browse/MESOS-10179 > > > Repository: mesos > > > Description > ------- > > Exposed offer constraints via the `/state` and `/frameworks` endpoints. > > > Diffs > ----- > > src/master/readonly_handler.cpp b1336f9aa849e826a78c3fe4bb83e3efeb186a31 > src/tests/master/update_framework_tests.cpp 87bc3c7d23ea76118473d9a4ec3c77e7a9d5a97e > > > Diff: https://reviews.apache.org/r/72840/diff/1/ > > > Testing > ------- > > > Thanks, > > Andrei Sekretenko > > --===============3465804741802965308==--