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

[iron] Gracefully handle SIGINT and SIGTERM signals for play and burst CLI (backport #1557) #1690

Merged
merged 2 commits into from
Jun 6, 2024

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Jun 4, 2024

…1557)

* Gracefully handle SIGINT and SIGTERM signals for play and burst CLI

- Intercept signals to call Player::stop() instead of relying on the
rclcpp::shutdown() in default signal handlers.
- Also added static Player::Cancel() method.

Signed-off-by: Michael Orlov <[email protected]>

* Add test_play_cancel to the test_transport.py

Signed-off-by: Michael Orlov <[email protected]>

* Add missing imports in test_transport.py

Signed-off-by: Michael Orlov <[email protected]>

* Regenerate Python stub files (.pyi) after altering API

Signed-off-by: Michael Orlov <[email protected]>

* Add call for original deferred signal handler for Player and Recorder

Signed-off-by: Michael Orlov <[email protected]>

---------

Signed-off-by: Michael Orlov <[email protected]>
(cherry picked from commit 32bd5c3)

# Conflicts:
#	rosbag2_py/rosbag2_py/_transport.pyi
#	rosbag2_py/src/rosbag2_py/_transport.cpp
#	rosbag2_transport/src/rosbag2_transport/player.cpp
@mergify mergify bot requested a review from a team as a code owner June 4, 2024 18:19
@mergify mergify bot added the conflicts label Jun 4, 2024
@mergify mergify bot requested review from MichaelOrlov and hidmic and removed request for a team June 4, 2024 18:19
Copy link
Author

mergify bot commented Jun 4, 2024

Cherry-pick of 32bd5c3 has failed:

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

You are currently cherry-picking commit 32bd5c3a.
  (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:   rosbag2_py/test/test_transport.py

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	deleted by us:   rosbag2_py/rosbag2_py/_transport.pyi
	both modified:   rosbag2_py/src/rosbag2_py/_transport.cpp
	both modified:   rosbag2_transport/src/rosbag2_transport/player.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

@MichaelOrlov MichaelOrlov changed the title Gracefully handle SIGINT and SIGTERM signals for play and burst CLI (backport #1557) [iron] Gracefully handle SIGINT and SIGTERM signals for play and burst CLI (backport #1557) Jun 4, 2024
Signed-off-by: Michael Orlov <[email protected]>
@MichaelOrlov
Copy link
Contributor

Pulls: #1690
Gist: https://gist.githubusercontent.com/MichaelOrlov/1071e5e7c924fa019ed3a9fac406a028/raw/65ea0be6edeb613563013ddbd4a0fd0e16629711/ros2.repos
BUILD args: --packages-above-and-dependencies rosbag2_py rosbag2_transport
TEST args: --packages-above rosbag2_py rosbag2_transport
ROS Distro: iron
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/14042

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@MichaelOrlov MichaelOrlov merged commit fd22add into iron Jun 6, 2024
13 checks passed
@delete-merged-branch delete-merged-branch bot deleted the mergify/bp/iron/pr-1557 branch June 6, 2024 06:20
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