----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/70854/#review215887 -----------------------------------------------------------
How about we simplify and just require the `FrameworkInfo.id` to be set? We already require it to be set during driver construction if the framework had one assigned, so it would be nice to require it on `updateFramework()` too. I doubt that will be a problem for users, and it lets us simplify the code and tests. src/sched/sched.cpp Lines 2342-2348 (original), 2347-2369 (patched) <https://reviews.apache.org/r/70854/#comment302827> I think we want to put most of this type of logic into the SchedulerProcess rather than the MesosSchedulerDriver. It's already where we do the ID assignment. The filling in of hostname/user seems ok to leave in the scheduler driver since that's where it's done during initialization. src/sched/sched.cpp Line 2351 (original), 2376 (patched) <https://reviews.apache.org/r/70854/#comment302826> // We fill in missing hostname and user fields if absent since // they're filled in by the driver during initialization and // we need to keep them consistent. The caller may not know // which values were filled in (as we don't pass back the // filled in FrameworkInfo at any point). - Benjamin Mahler On June 13, 2019, 7:04 p.m., Andrei Sekretenko wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/70854/ > ----------------------------------------------------------- > > (Updated June 13, 2019, 7:04 p.m.) > > > Review request for mesos and Benjamin Mahler. > > > Repository: mesos > > > Description > ------- > > This patch allows the caller to fill `FrameworkInfo.id` passed into > MesosSchedulerDriver::updateFramework() with the FrameworkID provided > by the scheduler driver. Previously the caller was required to keep > this field empty. > > > Diffs > ----- > > include/mesos/scheduler.hpp c5e61d4fd7aae5067d8c7d8dec878dc82c86e4ec > src/sched/sched.cpp 281236bb53e1c6ed77b69bf954e27705595ffb2a > > > Diff: https://reviews.apache.org/r/70854/diff/1/ > > > Testing > ------- > > > Thanks, > > Andrei Sekretenko > >
