-
Notifications
You must be signed in to change notification settings - Fork 63
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
fix(nebula_hw_interfaces): handling http get post request exception #264
Conversation
Thank you for the PR! Also, this change would just ignore the error, without any error handling, which would not be safe for production. Ultimately, we should probably have a retry mechanism for temporary network failures, and graceful degradation (working, but possibly without some features) in case we cannot fix the issue by retrying. What do you think? |
Thank you for your suggestion.
Thank you, I will fix them.
That makes sense to me. I will submit modified code tonight. |
Signed-off-by: Shumpei Wakabayashi <[email protected]>
Signed-off-by: Shumpei Wakabayashi <[email protected]>
Signed-off-by: Shumpei Wakabayashi <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #264 +/- ##
==========================================
- Coverage 28.89% 28.11% -0.78%
==========================================
Files 105 109 +4
Lines 9465 9506 +41
Branches 3115 2617 -498
==========================================
- Hits 2735 2673 -62
- Misses 6240 6360 +120
+ Partials 490 473 -17
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Sorry to keep you waiting.
Thanks for implementing the retry logic, it looks good to me.
I left two requests for changes, mainly targeted at maintainability/ code deduplication 🙇
nebula_hw_interfaces/src/nebula_velodyne_hw_interfaces/velodyne_hw_interface.cpp
Outdated
Show resolved
Hide resolved
nebula_hw_interfaces/src/nebula_velodyne_hw_interfaces/velodyne_hw_interface.cpp
Outdated
Show resolved
Hide resolved
Signed-off-by: Shumpei Wakabayashi <[email protected]>
Signed-off-by: Shumpei Wakabayashi <[email protected]>
Signed-off-by: Shumpei Wakabayashi <[email protected]>
Signed-off-by: Shumpei Wakabayashi <[email protected]>
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.
Thank you for your changes! I've changed the other places that directly return HTTP_CONNECTION_ERROR
to rt.error()
as well for consistency 🙇
nebula_hw_interfaces/src/nebula_velodyne_hw_interfaces/velodyne_hw_interface.cpp
Outdated
Show resolved
Hide resolved
nebula_hw_interfaces/src/nebula_velodyne_hw_interfaces/velodyne_hw_interface.cpp
Outdated
Show resolved
Hide resolved
nebula_hw_interfaces/src/nebula_velodyne_hw_interfaces/velodyne_hw_interface.cpp
Outdated
Show resolved
Hide resolved
nebula_hw_interfaces/src/nebula_velodyne_hw_interfaces/velodyne_hw_interface.cpp
Outdated
Show resolved
Hide resolved
nebula_hw_interfaces/src/nebula_velodyne_hw_interfaces/velodyne_hw_interface.cpp
Outdated
Show resolved
Hide resolved
nebula_hw_interfaces/src/nebula_velodyne_hw_interfaces/velodyne_hw_interface.cpp
Outdated
Show resolved
Hide resolved
nebula_hw_interfaces/src/nebula_velodyne_hw_interfaces/velodyne_hw_interface.cpp
Outdated
Show resolved
Hide resolved
nebula_hw_interfaces/src/nebula_velodyne_hw_interfaces/velodyne_hw_interface.cpp
Outdated
Show resolved
Hide resolved
nebula_hw_interfaces/src/nebula_velodyne_hw_interfaces/velodyne_hw_interface.cpp
Outdated
Show resolved
Hide resolved
nebula_hw_interfaces/src/nebula_velodyne_hw_interfaces/velodyne_hw_interface.cpp
Outdated
Show resolved
Hide resolved
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.
Missed a couple of spots 🙇
...erfaces/include/nebula_hw_interfaces/nebula_hw_interfaces_velodyne/velodyne_hw_interface.hpp
Outdated
Show resolved
Hide resolved
...erfaces/include/nebula_hw_interfaces/nebula_hw_interfaces_velodyne/velodyne_hw_interface.hpp
Outdated
Show resolved
Hide resolved
...erfaces/include/nebula_hw_interfaces/nebula_hw_interfaces_velodyne/velodyne_hw_interface.hpp
Outdated
Show resolved
Hide resolved
...erfaces/include/nebula_hw_interfaces/nebula_hw_interfaces_velodyne/velodyne_hw_interface.hpp
Outdated
Show resolved
Hide resolved
...erfaces/include/nebula_hw_interfaces/nebula_hw_interfaces_velodyne/velodyne_hw_interface.hpp
Outdated
Show resolved
Hide resolved
nebula_hw_interfaces/src/nebula_velodyne_hw_interfaces/velodyne_hw_interface.cpp
Outdated
Show resolved
Hide resolved
nebula_hw_interfaces/src/nebula_velodyne_hw_interfaces/velodyne_hw_interface.cpp
Outdated
Show resolved
Hide resolved
nebula_hw_interfaces/src/nebula_velodyne_hw_interfaces/velodyne_hw_interface.cpp
Outdated
Show resolved
Hide resolved
nebula_hw_interfaces/src/nebula_velodyne_hw_interfaces/velodyne_hw_interface.cpp
Outdated
Show resolved
Hide resolved
nebula_hw_interfaces/src/nebula_velodyne_hw_interfaces/velodyne_hw_interface.cpp
Outdated
Show resolved
Hide resolved
@mojomex Thank you for everything 🙏 |
PR Type
Related Links
Bug found slack thread:
https://star4.slack.com/archives/CEV8XMJBV/p1739142264251479?thread_ts=1739139390.099319&cid=CEV8XMJBV
Description
Added error handling for HTTP GET/POST requests in VelodyneHwInterface to address system crashes caused by unhandled exceptions during HTTP communication.
The system would crash with "Interrupted system call" errors when exceptions occurred during HTTP requests to the Velodyne sensor:
Review Procedure
Remarks
I'm not sure if returning
Status::HTTP_CONNECTION_ERROR
is ok for the exception.Please confirm 🙏 @mojomex
Pre-Review Checklist for the PR Author
PR Author should check the checkboxes below when creating the PR.
Checklist for the PR Reviewer
Reviewers should check the checkboxes below before approval.
Post-Review Checklist for the PR Author
PR Author should check the checkboxes below before merging.
CI Checks