> On Aug. 15, 2018, 1:43 a.m., Chun-Hung Hsiao wrote: > > src/resource_provider/manager.cpp > > Lines 801-802 (patched) > > <https://reviews.apache.org/r/68143/diff/1/?file=2065817#file2065817line801> > > > > Alternatively we could do the following, as the same as what we > > construct `updateState`: > > ``` > > ResourceProviderMessage::Subscribe subscribe{resourceProvider->info}; > > ``` > > > > No strong preference though.
Done. > On Aug. 15, 2018, 1:43 a.m., Chun-Hung Hsiao wrote: > > src/resource_provider/message.hpp > > Line 63 (original), 71 (patched) > > <https://reviews.apache.org/r/68143/diff/1/?file=2065818#file2065818line71> > > > > It seems to me that once we process `SUBSCRIBE` in the agent, we could > > consider changing `UpdateState::info` to `UpdateState::resourceProviderId`. https://reviews.apache.org/r/68362/ > On Aug. 15, 2018, 1:43 a.m., Chun-Hung Hsiao wrote: > > src/tests/resource_provider_manager_tests.cpp > > Lines 260-264 (patched) > > <https://reviews.apache.org/r/68143/diff/1/?file=2065820#file2065820line260> > > > > Let's move this downwards to keep the the http-related assertions at > > the same place, and keep > > ``` > > EXPECT_FALSE(resourceProviderId->value().empty()); > > ``` I deliberately did not check the format of the returned ID here since its details are not relevant for this test. Let's leave that part as is? - Benjamin ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/68143/#review207266 ----------------------------------------------------------- On Aug. 15, 2018, 3:52 p.m., Benjamin Bannier wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/68143/ > ----------------------------------------------------------- > > (Updated Aug. 15, 2018, 3:52 p.m.) > > > Review request for mesos, Chun-Hung Hsiao and Jan Schlicht. > > > Bugs: MESOS-8403 > https://issues.apache.org/jira/browse/MESOS-8403 > > > Repository: mesos > > > Description > ------- > > This patch adds a `SUBSCRIBE` resource provider message which is > emitted by the resource provider manager when a resource provider > subscribes. This event can e.g., be used to detect subscriptions when > theresource provider never updates any resources. > > We currently do not expose this event from the agent outwards. > > > Diffs > ----- > > src/resource_provider/manager.cpp abd7e38e5517ea600f9fc9b8a96c7d0d26df0620 > src/resource_provider/message.hpp 9307f8859035dfafe0952e9026b078b44121537e > src/slave/slave.cpp 78e8666f402be58af5b6e20a715da4998af2615c > src/tests/resource_provider_manager_tests.cpp > 0b9e985cf3b4ded8590615b418e52a2a11f1c1aa > > > Diff: https://reviews.apache.org/r/68143/diff/2/ > > > Testing > ------- > > `make check` > > Additional testing with the test case added in > https://reviews.apache.org/r/68147/. > > > Thanks, > > Benjamin Bannier > >
