Clarify distinction between FAILURE and ERROR in CallbackReturn#3115
Clarify distinction between FAILURE and ERROR in CallbackReturn#3115Saigirish23 wants to merge 1 commit intoros2:rollingfrom
Conversation
ab11ffd to
bc0b58b
Compare
|
you commit is full of artifacts and garbage... |
| /// Return values for lifecycle transition callbacks. | ||
| /// | ||
| /// These values determine how the lifecycle node proceeds after a transition callback: | ||
| /// | ||
| /// - SUCCESS: The transition completed successfully and the node will proceed normally. | ||
| /// | ||
| /// - FAILURE: The transition failed in a recoverable way. The node remains in its current state, | ||
| /// and the transition may be retried or handled gracefully. | ||
| /// | ||
| /// - ERROR: The transition encountered a critical, unrecoverable error. This will trigger the | ||
| /// error handling mechanism (on_error callback), potentially leading to shutdown. | ||
| enum class CallbackReturn : uint8_t | ||
| { | ||
| SUCCESS = lifecycle_msgs::msg::Transition::TRANSITION_CALLBACK_SUCCESS, | ||
| FAILURE = lifecycle_msgs::msg::Transition::TRANSITION_CALLBACK_FAILURE, | ||
| ERROR = lifecycle_msgs::msg::Transition::TRANSITION_CALLBACK_ERROR | ||
| }; |
There was a problem hiding this comment.
kinda redundant with https://github.com/ros2/rcl_interfaces/blob/rolling/lifecycle_msgs/msg/Transition.msg? besides that, indent is off.
There was a problem hiding this comment.
Thanks for the feedback! I’ll tidy up the commit, fix the indentation, and simplify the comment to avoid duplicating what’s already in Transition.msg.
bc0b58b to
3678343
Compare
|
It looks like the failure is coming from missing builtin_interfaces target in CI (ubuntu_noble job), and not related to this change since it only updates comments. Please let me know if I should rebase or if this is a transient CI issue. |
There was a problem hiding this comment.
there is no need to increment package versions; we do it separately whenever we create a new release
| FAILURE = lifecycle_msgs::msg::Transition::TRANSITION_CALLBACK_FAILURE, | ||
| ERROR = lifecycle_msgs::msg::Transition::TRANSITION_CALLBACK_ERROR | ||
| }; | ||
|
|
There was a problem hiding this comment.
no need to remove this line
Description
This PR clarifies the distinction between
FAILUREandERRORinCallbackReturnwithin the lifecycle node interface.FAILURE: represents a recoverable failure where the node remains in its current state and the transition may be retried or handled gracefully.ERROR: represents a critical, unrecoverable failure that triggers the error handling mechanism (on_error), potentially leading to shutdown.This improves clarity for developers working with lifecycle nodes and aligns documentation with actual behavior.
Fixes #3086
Is this user-facing behavior change?
No. This change only improves documentation and does not modify runtime behavior.
Did you use Generative AI?
Yes. Generative AI (ChatGPT) was used to help draft and refine the documentation wording.
Additional Information
This change updates comments in
lifecycle_node_interface.hppto better explain lifecycle transition outcomes and reduce ambiguity betweenFAILUREandERROR.