You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Jason Zhou <ja...@gmail.com> on 2024/07/30 14:22:34 UTC
Review Request 75128: [reviewbot] fix reviewbot build error
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/75128/
-----------------------------------------------------------
Review request for mesos and Benjamin Mahler.
Repository: mesos
Description
-------
Currently, reviewbot is failing from a 'control reaches end of non-void
function' error due to a switch case inside a lambda in the device
manager code. We patch it up with a lambda with a default case that can
return an Error
Diffs
-----
src/slave/containerizer/device_manager/device_manager.cpp 9c3e6c00cedff5aeb4e3726adb002a29517b254f
Diff: https://reviews.apache.org/r/75128/diff/1/
Testing
-------
Existing DeviceManager and CGROUPS2 tests pass
Thanks,
Jason Zhou
Re: Review Request 75128: [reviewbot] fix reviewbot build error
Posted by Benjamin Mahler <bm...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/75128/#review226745
-----------------------------------------------------------
src/slave/containerizer/device_manager/device_manager.cpp
Lines 58-59 (patched)
<https://reviews.apache.org/r/75128/#comment315012>
it's unfortunate the compiler isn't understanding that we're returning in all cases here?
a simpler and more idiomatic case here is this one-liner:
```
switch (type) {
case DeviceManager::NonWildcardEntry::Selector::Type::BLOCK:
return Entry::Selector::Type::BLOCK;
case DeviceManager::NonWildcardEntry::Selector::Type::CHARACTER:
return Entry::Selector::Type::CHARACTER;
}
UNREACHABLE();
```
- Benjamin Mahler
On July 30, 2024, 2:22 p.m., Jason Zhou wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/75128/
> -----------------------------------------------------------
>
> (Updated July 30, 2024, 2:22 p.m.)
>
>
> Review request for mesos and Benjamin Mahler.
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Currently, reviewbot is failing from a 'control reaches end of non-void
> function' error due to a switch case inside a lambda in the device
> manager code. We patch it up with a lambda with a default case that can
> return an Error
>
>
> Diffs
> -----
>
> src/slave/containerizer/device_manager/device_manager.cpp 9c3e6c00cedff5aeb4e3726adb002a29517b254f
>
>
> Diff: https://reviews.apache.org/r/75128/diff/1/
>
>
> Testing
> -------
>
> Existing DeviceManager and CGROUPS2 tests pass
>
>
> Thanks,
>
> Jason Zhou
>
>
Re: Review Request 75128: [reviewbot] fix reviewbot build error
Posted by Benjamin Mahler <bm...@apache.org>.
> On July 31, 2024, 8:04 p.m., Benjamin Mahler wrote:
> > Ship It!
will add the needed include for this
- Benjamin
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/75128/#review226747
-----------------------------------------------------------
On July 30, 2024, 3:38 p.m., Jason Zhou wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/75128/
> -----------------------------------------------------------
>
> (Updated July 30, 2024, 3:38 p.m.)
>
>
> Review request for mesos and Benjamin Mahler.
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Currently, reviewbot is failing from a 'control reaches end of non-void
> function' error due to a switch case inside a lambda in the device
> manager code. We use an UNREACHABLE macro to stop this error.
>
>
> Diffs
> -----
>
> src/slave/containerizer/device_manager/device_manager.cpp 9c3e6c00cedff5aeb4e3726adb002a29517b254f
>
>
> Diff: https://reviews.apache.org/r/75128/diff/2/
>
>
> Testing
> -------
>
> Existing DeviceManager and CGROUPS2 tests pass
>
>
> Thanks,
>
> Jason Zhou
>
>
Re: Review Request 75128: [reviewbot] fix reviewbot build error
Posted by Benjamin Mahler <bm...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/75128/#review226747
-----------------------------------------------------------
Ship it!
Ship It!
- Benjamin Mahler
On July 30, 2024, 3:38 p.m., Jason Zhou wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/75128/
> -----------------------------------------------------------
>
> (Updated July 30, 2024, 3:38 p.m.)
>
>
> Review request for mesos and Benjamin Mahler.
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Currently, reviewbot is failing from a 'control reaches end of non-void
> function' error due to a switch case inside a lambda in the device
> manager code. We use an UNREACHABLE macro to stop this error.
>
>
> Diffs
> -----
>
> src/slave/containerizer/device_manager/device_manager.cpp 9c3e6c00cedff5aeb4e3726adb002a29517b254f
>
>
> Diff: https://reviews.apache.org/r/75128/diff/2/
>
>
> Testing
> -------
>
> Existing DeviceManager and CGROUPS2 tests pass
>
>
> Thanks,
>
> Jason Zhou
>
>
Re: Review Request 75128: [reviewbot] fix reviewbot build error
Posted by Jason Zhou <ja...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/75128/
-----------------------------------------------------------
(Updated July 30, 2024, 3:38 p.m.)
Review request for mesos and Benjamin Mahler.
Changes
-------
use UNREACHABLE()
Repository: mesos
Description (updated)
-------
Currently, reviewbot is failing from a 'control reaches end of non-void
function' error due to a switch case inside a lambda in the device
manager code. We use an UNREACHABLE macro to stop this error.
Diffs (updated)
-----
src/slave/containerizer/device_manager/device_manager.cpp 9c3e6c00cedff5aeb4e3726adb002a29517b254f
Diff: https://reviews.apache.org/r/75128/diff/2/
Changes: https://reviews.apache.org/r/75128/diff/1-2/
Testing
-------
Existing DeviceManager and CGROUPS2 tests pass
Thanks,
Jason Zhou