Skip to content
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 spawner behaviour on failing controller activation or deactivation (backport #1941) #1968

Merged
merged 1 commit into from
Dec 22, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Dec 21, 2024

Before the fix proposed in this PR, the spawner reports the controller activation as successful, if the activation is failed at the last stage after calling activate_controllers. This PR addresses the issue by proposing a fix and this should now properly fail at the spawner end as well

Before the fix:

1: [INFO] [1734338012.820800005] [test_controller_manager]: Activating controllers: [ ctrl_with_joint1_and_joint2_command_interfaces ]
1: [ERROR] [1734338012.829138606] [test_controller_manager]: Resource conflict for controller 'ctrl_with_joint1_and_joint2_command_interfaces'. Command interface 'joint1/position' is already claimed.
1: [INFO] [1734338012.830469222] [spawner_ctrl_with_joint1_and_joint2_command_interfaces]: Configured and activated ctrl_with_joint1_and_joint2_command_interfaces

With the proposed fix:

1: [INFO] [1734338233.806072093] [test_controller_manager]: Activating controllers: [ ctrl_with_joint1_and_joint2_command_interfaces ]
1: [ERROR] [1734338233.814172942] [test_controller_manager]: Resource conflict for controller 'ctrl_with_joint1_and_joint2_command_interfaces'. Command interface 'joint1/position' is already claimed.
1: [ERROR] [1734338233.814291503] [test_controller_manager]: Could not activate controller : 'ctrl_with_joint1_and_joint2_command_interfaces'
1: [ERROR] [1734338233.817168509] [spawner_ctrl_with_joint1_and_joint2_command_interfaces]: Failed to activate controller : ctrl_with_joint1_and_joint2_command_interfaces

This is an automatic backport of pull request #1941 done by [Mergify](https://mergify.com).

@mergify mergify bot added the conflicts label Dec 21, 2024
Copy link
Contributor Author

mergify bot commented Dec 21, 2024

Cherry-pick of 038a05f has failed:

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

You are currently cherry-picking commit 038a05f.
  (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_manager/controller_manager/spawner.py
	new file:   controller_manager/test/test_controller_spawner_with_interfaces.yaml
	modified:   controller_manager/test/test_release_interfaces.cpp
	modified:   controller_manager/test/test_spawner_unspawner.cpp

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   controller_manager/CMakeLists.txt
	both modified:   controller_manager/src/controller_manager.cpp
	both modified:   controller_manager/test/test_controller/test_controller.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

@christophfroehlich christophfroehlich marked this pull request as draft December 21, 2024 20:18
@saikishor saikishor force-pushed the mergify/bp/humble/pr-1941 branch from 8a2df81 to c740c9c Compare December 21, 2024 22:55
@saikishor saikishor force-pushed the mergify/bp/humble/pr-1941 branch 2 times, most recently from dbae78c to 046e8b9 Compare December 21, 2024 23:05
@saikishor saikishor force-pushed the mergify/bp/humble/pr-1941 branch from 046e8b9 to 75fc53a Compare December 21, 2024 23:16
Copy link

codecov bot commented Dec 21, 2024

Codecov Report

Attention: Patch coverage is 50.56180% with 44 lines in your changes missing coverage. Please review.

Project coverage is 62.87%. Comparing base (5c5a171) to head (75fc53a).
Report is 1 commits behind head on humble.

Files with missing lines Patch % Lines
controller_manager/test/test_spawner_unspawner.cpp 42.00% 3 Missing and 26 partials ⚠️
controller_manager/src/controller_manager.cpp 63.15% 3 Missing and 4 partials ⚠️
...r_manager/test/test_controller/test_controller.cpp 66.66% 1 Missing and 5 partials ⚠️
...ontroller_manager/test/test_release_interfaces.cpp 0.00% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           humble    #1968      +/-   ##
==========================================
- Coverage   62.92%   62.87%   -0.06%     
==========================================
  Files         109      109              
  Lines       12504    12589      +85     
  Branches     8481     8547      +66     
==========================================
+ Hits         7868     7915      +47     
- Misses        852      858       +6     
- Partials     3784     3816      +32     
Flag Coverage Δ
unittests 62.87% <50.56%> (-0.06%) ⬇️

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

Files with missing lines Coverage Δ
controller_manager/controller_manager/spawner.py 72.26% <ø> (+2.18%) ⬆️
...ontroller_manager/test/test_release_interfaces.cpp 44.14% <0.00%> (ø)
...r_manager/test/test_controller/test_controller.cpp 79.31% <66.66%> (-3.19%) ⬇️
controller_manager/src/controller_manager.cpp 67.02% <63.15%> (-0.04%) ⬇️
controller_manager/test/test_spawner_unspawner.cpp 51.99% <42.00%> (-0.84%) ⬇️

... and 1 file with indirect coverage changes

Copy link
Contributor

@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.

Thx for fixing!

@christophfroehlich christophfroehlich merged commit 4c58cda into humble Dec 22, 2024
15 checks passed
@christophfroehlich christophfroehlich deleted the mergify/bp/humble/pr-1941 branch December 22, 2024 15:14
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