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

[humble] Bugfix for bag_split event callbacks called to early with file compression (backport #1643) #1733

Merged
merged 2 commits into from
Jul 16, 2024

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Jun 26, 2024

  • Depends from [humble] Add option to prevent message loss while converting (backport #1058) #1749
  • Bugfix for bag_split event callbacks calling to early when using file compression option for rosbag2_cpp::Writer. i.e. callbacks calling when the bag file closes. However, the expected behavior is that callbacks are called when compression is finished and the original bag file is deleted.
  • Done with fix. However, missing regression tests.

Update: Jun-06-2024 Added unit tests to cover changes.


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

@mergify mergify bot added the conflicts label Jun 26, 2024
@mergify mergify bot requested a review from a team as a code owner June 26, 2024 22:27
Copy link
Author

mergify bot commented Jun 26, 2024

Cherry-pick of 1877b53 has failed:

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

You are currently cherry-picking commit 1877b538.
  (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_compression/include/rosbag2_compression/sequential_compression_writer.hpp
	modified:   rosbag2_cpp/include/rosbag2_cpp/writers/sequential_writer.hpp

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   rosbag2_compression/src/rosbag2_compression/sequential_compression_writer.cpp
	both modified:   rosbag2_compression/test/rosbag2_compression/test_sequential_compression_writer.cpp
	both modified:   rosbag2_cpp/src/rosbag2_cpp/writers/sequential_writer.cpp
	both modified:   rosbag2_cpp/test/rosbag2_cpp/test_sequential_writer.cpp
	both modified:   rosbag2_transport/test/rosbag2_transport/test_record.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

@mergify mergify bot requested review from emersonknapp and james-rms and removed request for a team June 26, 2024 22:27
@MichaelOrlov MichaelOrlov changed the title Bugfix for bag_split event callbacks called to early with file compression (backport #1643) [humble] Bugfix for bag_split event callbacks called to early with file compression (backport #1643) Jun 26, 2024
@MichaelOrlov MichaelOrlov marked this pull request as draft June 26, 2024 22:28
…ssion (#1643)

* Bugfix for bag_split event callbacks not called with file compression

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

* Delete redundant "should_split_bagfile" in compression_writer

- It is a non-virtual method and doesn't call from the base class.

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

* Adjust "split_event_calls_callback" for testing multiple splits

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

* Use temp folder for "SequentialWriterTest" fixture instead of "uri"

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

* Add tests for split event callbacks when using file and msg compression

 - Added "split_event_calls_callback_with_msg_compression" and
"split_event_calls_callback_with_file_compression" uit tests

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

* Add debug info to the flaky "can_record_again_after_stop" test

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

* Use `uint64_t` type for `fake_storage_size_` in tests

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

---------

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

# Conflicts:
#	rosbag2_compression/src/rosbag2_compression/sequential_compression_writer.cpp
#	rosbag2_compression/test/rosbag2_compression/test_sequential_compression_writer.cpp
#	rosbag2_cpp/src/rosbag2_cpp/writers/sequential_writer.cpp
#	rosbag2_cpp/test/rosbag2_cpp/test_sequential_writer.cpp
#	rosbag2_transport/test/rosbag2_transport/test_record.cpp
Signed-off-by: Michael Orlov <[email protected]>
@MichaelOrlov MichaelOrlov self-assigned this Jul 16, 2024
@MichaelOrlov MichaelOrlov marked this pull request as ready for review July 16, 2024 06:51
@MichaelOrlov
Copy link
Contributor

Pulls: #1733
Gist: https://gist.githubusercontent.com/MichaelOrlov/92b8dccce4366d65b957ca35b0feaa34/raw/f07094ea9849e4cb2a5e09e53fc1c10ae2c46cf7/ros2.repos
BUILD args: --packages-above-and-dependencies rosbag2_compression rosbag2_cpp rosbag2_transport rosbag2_tests
TEST args: --packages-above rosbag2_compression rosbag2_cpp rosbag2_transport rosbag2_tests
ROS Distro: humble
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/14243

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

@MichaelOrlov MichaelOrlov merged commit f449d50 into humble Jul 16, 2024
14 checks passed
@mergify mergify bot deleted the mergify/bp/humble/pr-1643 branch July 16, 2024 15:05
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.

1 participant