Skip to content

Allow deferred service replies. - #29

Merged
StefanFabian merged 2 commits into
rollingfrom
feature/deferred-service-reply
Jun 29, 2026
Merged

Allow deferred service replies.#29
StefanFabian merged 2 commits into
rollingfrom
feature/deferred-service-reply

Conversation

@StefanFabian

Copy link
Copy Markdown
Member

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support for deferred service replies in ros_babel_fish, allowing service callbacks to “take” a request and send the response later (instead of always auto-sending an immediate response).

Changes:

  • Update service request handling to only auto-send a response when the callback returns one.
  • Extend AnyServiceCallback dispatching to support “defer response” variants by returning nullptr for deferred callbacks.
  • Add a regression test ensuring deferred callbacks do not result in an early/empty response.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
ros_babel_fish/test/service.cpp Adds a regression test covering deferred service responses.
ros_babel_fish/src/detail/babel_fish_service.cpp Sends a response only when the dispatched callback returns one (supports deferred replies).
ros_babel_fish/include/ros_babel_fish/detail/any_service_callback.hpp Changes dispatch to return an optional CompoundMessage and special-cases defer variants.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ros_babel_fish/test/service.cpp
Comment thread ros_babel_fish/src/detail/babel_fish_service.cpp
@StefanFabian
StefanFabian merged commit b53a4b9 into rolling Jun 29, 2026
4 of 5 checks passed
@StefanFabian
StefanFabian deleted the feature/deferred-service-reply branch June 29, 2026 03:04
@StefanFabian

Copy link
Copy Markdown
Member Author

Successfully created backport PR for kilted:

@sonarqubecloud

Copy link
Copy Markdown

@StefanFabian

Copy link
Copy Markdown
Member Author

Backport failed for jazzy, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin jazzy
git worktree add -d .worktree/backport-29-to-jazzy origin/jazzy
cd .worktree/backport-29-to-jazzy
git switch --create backport-29-to-jazzy
git cherry-pick -x b53a4b9eab81ad3ca37f318bf701aa3d5b7871f8

StefanFabian added a commit that referenced this pull request Jun 29, 2026
StefanFabian added a commit that referenced this pull request Jun 29, 2026
StefanFabian added a commit that referenced this pull request Jun 29, 2026
(cherry picked from commit 4053651)
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.

2 participants