Skip to content

feat: Improve action unadvertising (backport #1248)#1252

Open
mergify[bot] wants to merge 2 commits into
kiltedfrom
mergify/bp/kilted/pr-1248
Open

feat: Improve action unadvertising (backport #1248)#1252
mergify[bot] wants to merge 2 commits into
kiltedfrom
mergify/bp/kilted/pr-1248

Conversation

@mergify
Copy link
Copy Markdown

@mergify mergify Bot commented May 14, 2026

Public API Changes
None

Description
Previously, action servers were never actually destroyed and just left hanging. This PR improves the logic so that now, when an action gets unadvertised:

  1. Any new goals are rejected.
  2. Pending goals are aborted
  3. When the last goal finishes, action server destruction is scheduled 1 second into the future to allow all action results to be sent.

The test confirms that the user can advertise the action, unadvertise the action and then advertise the action with the same name again.

I'm still not sure whether action_server.destroy() is perfectly safe but I didn't experience any crashes when testing it.


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

* Improve logging on send_action_goal fail

* Reject new goals after action was unadversited

* Abort action goals on shutdown

* Schedule destruction of action server after last goal finishes

* Expand unadvertise action test

(cherry picked from commit cfd0646)

# Conflicts:
#	rosbridge_library/src/rosbridge_library/capabilities/advertise_action.py
@mergify mergify Bot added the conflicts label May 14, 2026
@mergify
Copy link
Copy Markdown
Author

mergify Bot commented May 14, 2026

Cherry-pick of cfd0646 has failed:

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

You are currently cherry-picking commit cfd0646.
  (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:   rosbridge_library/src/rosbridge_library/capabilities/send_action_goal.py
	modified:   rosbridge_library/test/capabilities/test_action_capabilities.py

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   rosbridge_library/src/rosbridge_library/capabilities/advertise_action.py

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

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant