Skip to content

Conversation

@soham2560
Copy link
Contributor

@soham2560 soham2560 commented Jul 27, 2025

Brief

This PR completes #1236 by @bailaC which was started to fix #759.

TODOs

  • Address previous discussions on original PR

@codecov
Copy link

codecov bot commented Jul 27, 2025

Codecov Report

❌ Patch coverage is 91.35802% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.64%. Comparing base (db10bd6) to head (c215493).

Files with missing lines Patch % Lines
controller_manager/src/controller_manager.cpp 84.00% 1 Missing and 3 partials ⚠️
.../controller_manager/controller_manager_services.py 25.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2414      +/-   ##
==========================================
+ Coverage   89.59%   89.64%   +0.04%     
==========================================
  Files         152      153       +1     
  Lines       17710    17788      +78     
  Branches     1454     1458       +4     
==========================================
+ Hits        15868    15946      +78     
+ Misses       1256     1255       -1     
- Partials      586      587       +1     
Flag Coverage Δ
unittests 89.64% <91.35%> (+0.04%) ⬆️

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

Files with missing lines Coverage Δ
controller_manager/controller_manager/__init__.py 100.00% <ø> (ø)
.../include/controller_manager/controller_manager.hpp 97.29% <ø> (ø)
...ontroller_manager/test/test_cleanup_controller.cpp 100.00% <100.00%> (ø)
...ller_manager/test/test_controller_manager_srvs.cpp 99.35% <100.00%> (+0.01%) ⬆️
.../controller_manager/controller_manager_services.py 81.17% <25.00%> (-1.36%) ⬇️
controller_manager/src/controller_manager.cpp 77.27% <84.00%> (+0.40%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@christophfroehlich christophfroehlich changed the title [UPDATE] Issue 759: This will add the cleanup service Add cleanup_controller lifecycle transition Jul 28, 2025
@soham2560 soham2560 marked this pull request as ready for review July 28, 2025 12:36
@github-actions github-actions bot requested review from ARK3r, aprotyas and destogl July 28, 2025 12:42
@soham2560
Copy link
Contributor Author

soham2560 commented Jul 30, 2025

we decided in todays PMC meet to go back to cleanup, have made relevant changes at c5c3a13 and
40cf540

Copy link
Member

@christophfroehlich christophfroehlich left a comment

Choose a reason for hiding this comment

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

+1

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.

Just some minor nitpicks

@saikishor saikishor added backport-jazzy Triggers PR backport to ROS 2 jazzy. backport-kilted Triggers PR backport to ROS 2 kilted. labels Oct 16, 2025
@soham2560
Copy link
Contributor Author

@saikishor have addressed your comments let me know what you think

Copy link
Member

@christophfroehlich christophfroehlich left a comment

Choose a reason for hiding this comment

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

LGTM, but could we add release notes for this please? And we should create a follow-up issue to path rqt_controller_manager with the new transition.
Also this has to be udpated (in a future PR maybe)

# choices=['unconfigured', 'inactive', 'active'], TODO(destogl): when cleanup is impl

# TODO(destogl): This has to be implemented in CLI and controller manager
# if args.state == 'unconfigured':
# if matched_controller.state != 'inactive':
# return f'cannot cleanup {matched_controller.name} ' \
# f'from its current state {matched_controller.state}'
# response = cleanup_controller(
# node, args.controller_manager, args.controller_name
# )
# if not response.ok:
# return 'Error cleaning up controller, check controller_manager logs'
# # print(f'successfully cleaned up {args.controller_name}')
# return 0

return controller_interface::return_type::ERROR;
}

// find and clean controller if it is inactive
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// find and clean controller if it is inactive
// call cleanup transition, if it is inactive

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

Labels

backport-jazzy Triggers PR backport to ROS 2 jazzy. backport-kilted Triggers PR backport to ROS 2 kilted.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add cleanup_controller service and method to controller manager and also add its CLI script

5 participants