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 53EC4200C2A for ; Wed, 15 Feb 2017 03:22:24 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 5297A160B6A; Wed, 15 Feb 2017 02:22:24 +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 9C354160B5F for ; Wed, 15 Feb 2017 03:22:23 +0100 (CET) Received: (qmail 81417 invoked by uid 500); 15 Feb 2017 02:22:22 -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 81391 invoked by uid 99); 15 Feb 2017 02:22:22 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Feb 2017 02:22:22 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 66C7131EB75; Wed, 15 Feb 2017 02:22:21 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============8380169846220953313==" MIME-Version: 1.0 Subject: Re: Review Request 56645: Added agent capabilities to `/state`(v0) endpoint of agent. From: Jay Guo To: Benjamin Bannier , Benjamin Mahler , Guangya Liu , Michael Park Cc: Jay Guo , mesos Date: Wed, 15 Feb 2017 02:22:21 -0000 Message-ID: <20170215022221.13057.80513@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Jay Guo X-ReviewGroup: mesos X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/56645/ X-Sender: Jay Guo References: <20170214095724.31018.63727@reviews.apache.org> In-Reply-To: <20170214095724.31018.63727@reviews.apache.org> Reply-To: Jay Guo X-ReviewRequest-Repository: mesos archived-at: Wed, 15 Feb 2017 02:22:24 -0000 --===============8380169846220953313== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit > On Feb. 14, 2017, 5:57 p.m., Benjamin Bannier wrote: > > src/slave/http.cpp, lines 1246-1247 > > > > > > I see we have a type `SlaveInfo::Capability` defined, but don't store any values there. Shouldn't we have a repeated field there (similar to what we currently have for e.g., agent attributes, instead of synthetizing something on the spot here? > > Benjamin Bannier wrote: > Per our offline discussion, not storing this information in `SlaveInfo` is deliberate and follows the pattern already in place for version which is also communicated via `RegisterSlaveMessage`s instead of configured in `SlaveInfo`. As hardcoding the same thing in two different places doesn't seem too resilent, do you think it would make sense to at least introduce a constant for agent capabilities that we could reference in both `slave/http`, and agent registration code (the version is already taken from a constant `MESOS_VERSION`)? What do you mean by _two different places_? I think we only store them in slave.capabilities per previous commit, no? - Jay ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/56645/#review165477 ----------------------------------------------------------- On Feb. 14, 2017, 6:19 p.m., Jay Guo wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/56645/ > ----------------------------------------------------------- > > (Updated Feb. 14, 2017, 6:19 p.m.) > > > Review request for mesos, Benjamin Bannier, Benjamin Mahler, Guangya Liu, and Michael Park. > > > Bugs: MESOS-6902 > https://issues.apache.org/jira/browse/MESOS-6902 > > > Repository: mesos > > > Description > ------- > > Added agent capabilities to `/state`(v0) endpoint of agent. > > > Diffs > ----- > > src/common/http.hpp 3d5ab59ddc4dce4d791c1b439f5e1459d1a724a4 > src/common/http.cpp abfbf7248beb2d4068be06b7f5f829d7617f943e > src/master/http.cpp caa1fabb7a709d993ff711cc7803dd05000fa987 > src/slave/http.cpp ccd489d700a605dc41037e00dbd6a7cb3b6edcc6 > src/tests/slave_tests.cpp b6f76824c20c842d8f1d8afb1f9b81668b6741da > > Diff: https://reviews.apache.org/r/56645/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Jay Guo > > --===============8380169846220953313==--