Skip to content

Trigger shutdown transition in destructor (backport #1979) #2142

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

Merged
merged 2 commits into from
Mar 27, 2025

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Mar 26, 2025

Since ros2/rclcpp#2562 we get lots of warnings in the test logs like

[WARN] [1735845337.264023881] [rclcpp_lifecycle]: LifecycleNode is not shut down: Node still in state(1) in destructor

I think we can just trigger the shutdown transition in the destructor of the base class.

We still had some warnings in tests of this repo when rclcpp::shutdown() is called before the node is destructed, and the context is invalid. The transition then would fail without the rclcpp::ok() check.


This is an automatic backport of pull request #1979 done by Mergify.

Copy link
Contributor Author

mergify bot commented Mar 26, 2025

Cherry-pick of b329679 has failed:

On branch mergify/bp/humble/pr-1979
Your branch is up to date with 'origin/humble'.

You are currently cherry-picking commit b329679.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   controller_interface/src/controller_interface_base.cpp

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   controller_interface/include/controller_interface/controller_interface_base.hpp
	both modified:   controller_interface/test/test_controller_interface.cpp
	both modified:   controller_interface/test/test_controller_with_options.cpp
	both modified:   joint_limits/test/joint_limits_rosparam_test.cpp

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

Copy link

codecov bot commented Mar 26, 2025

Codecov Report

Attention: Patch coverage is 64.51613% with 11 lines in your changes missing coverage. Please review.

Project coverage is 63.58%. Comparing base (cd14a83) to head (4a93276).
Report is 2 commits behind head on humble.

Files with missing lines Patch % Lines
...oller_interface/test/test_controller_interface.cpp 33.33% 0 Missing and 6 partials ⚠️
...roller_interface/src/controller_interface_base.cpp 81.81% 0 Missing and 2 partials ⚠️
...er_interface/test/test_controller_with_options.cpp 33.33% 0 Missing and 2 partials ⚠️
joint_limits/test/joint_limits_rosparam_test.cpp 87.50% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           humble    #2142      +/-   ##
==========================================
+ Coverage   63.55%   63.58%   +0.02%     
==========================================
  Files         112      112              
  Lines       12821    12848      +27     
  Branches     8642     8660      +18     
==========================================
+ Hits         8149     8169      +20     
+ Misses        794      790       -4     
- Partials     3878     3889      +11     
Flag Coverage Δ
unittests 63.58% <64.51%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...controller_interface/controller_interface_base.hpp 100.00% <ø> (ø)
joint_limits/test/joint_limits_rosparam_test.cpp 29.68% <87.50%> (+1.85%) ⬆️
...roller_interface/src/controller_interface_base.cpp 90.00% <81.81%> (+6.32%) ⬆️
...er_interface/test/test_controller_with_options.cpp 53.57% <33.33%> (-5.69%) ⬇️
...oller_interface/test/test_controller_interface.cpp 57.95% <33.33%> (-2.81%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@saikishor saikishor left a comment

Choose a reason for hiding this comment

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

Looks fine to me

@christophfroehlich christophfroehlich merged commit a978e78 into humble Mar 27, 2025
12 of 13 checks passed
@christophfroehlich christophfroehlich deleted the mergify/bp/humble/pr-1979 branch March 27, 2025 05:44
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.

2 participants