Skip to content

Clarify distinction between FAILURE and ERROR in CallbackReturn#3115

Open
Saigirish23 wants to merge 1 commit intoros2:rollingfrom
Saigirish23:clean-branch
Open

Clarify distinction between FAILURE and ERROR in CallbackReturn#3115
Saigirish23 wants to merge 1 commit intoros2:rollingfrom
Saigirish23:clean-branch

Conversation

@Saigirish23
Copy link

Description

This PR clarifies the distinction between FAILURE and ERROR in CallbackReturn within 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.hpp to better explain lifecycle transition outcomes and reduce ambiguity between FAILURE and ERROR.

@Saigirish23 Saigirish23 force-pushed the clean-branch branch 3 times, most recently from ab11ffd to bc0b58b Compare March 25, 2026 18:35
@jmachowinski
Copy link
Collaborator

you commit is full of artifacts and garbage...

Comment on lines +56 to +72
/// 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
};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Signed-off-by: Saigirish23 <185754693+Saigirish23@users.noreply.github.com>
@Saigirish23
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clarify differences between FAILURE and ERROR for CallbackReturn

4 participants