-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fail creation of entities if qos contains unknown settings #494
Conversation
///============================================================================= | ||
bool QoS::is_supported(const rmw_qos_profile_t & qos_profile) | ||
{ | ||
if (qos_profile.history == RMW_QOS_POLICY_HISTORY_UNKNOWN || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bool QoS::is_supported(const rmw_qos_profile_t & qos_profile)
{
return (qos_profile.history != RMW_QOS_POLICY_HISTORY_UNKNOWN &&
qos_profile.reliability != RMW_QOS_POLICY_RELIABILITY_UNKNOWN &&
qos_profile.durability != RMW_QOS_POLICY_DURABILITY_UNKNOWN &&
qos_profile.liveliness != RMW_QOS_POLICY_LIVELINESS_UNKNOWN)
}
This is a strange way of inverting a condition:
if (condition)
{
return false;
}
return true;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if there is an objective "right way" here. I could argue that the current implementation is more readable or that I could add a debug log statement inside the braces 🤷🏼♂️
It's probably worth spending our efforts on outstanding items like #493, #391 to get rmw_zenoh
ready for kilted
instead :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't mind much though. I just triggered on the logic flip 😃
…pported Signed-off-by: Yadunund <[email protected]>
Signed-off-by: Yadunund <[email protected]>
Signed-off-by: Yadunund <[email protected]>
Co-authored-by: Alejandro Hernández Cordero <[email protected]> Signed-off-by: yadunund <[email protected]>
640c741
to
f812b59
Compare
I made this release to fix CI ros/rosdistro#44667 |
From source is compiling properly, merging |
https://github.com/Mergifyio backport jazzy |
✅ Backports have been created
|
Signed-off-by: Yadunund <[email protected]> Co-authored-by: Alejandro Hernández Cordero <[email protected]> (cherry picked from commit 1fbdc74)
Signed-off-by: Yadunund <[email protected]> Co-authored-by: Alejandro Hernández Cordero <[email protected]> (cherry picked from commit 1fbdc74) Co-authored-by: yadunund <[email protected]>
Partially addresses some of the failing tests in #481, Specifically those that expect creation of pub/sub/client/service to fail if the qos profile has unknown settings. The changes here make test_service__rmw_zenoh_cpp pass.
This works because QoS::get().best_available_qos() is invoked within all make() functions of these entities which will now return nullptr if qos_profile contains unknown settings.