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: SequentialWriter incorrect metadata total duration for split bags #1098

Merged
merged 1 commit into from
Sep 26, 2022

Conversation

emersonknapp
Copy link
Collaborator

@emersonknapp emersonknapp commented Sep 24, 2022

Fixes #841

This fix should get backported to Foxy/Galactic/Humble, it's been persistent for a long time. The test infra might not port well but the fix itself is very simple.

@emersonknapp emersonknapp requested a review from a team as a code owner September 24, 2022 00:32
@emersonknapp emersonknapp requested review from MichaelOrlov and hidmic and removed request for a team September 24, 2022 00:32
…uration of the final file

Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>
@emersonknapp
Copy link
Collaborator Author

Gist: https://gist.githubusercontent.com/emersonknapp/692acfa17f9a48b555e93ef4072b9302/raw/ab57c1b00397503f9dee8ac39ff6e66945f97e70/ros2.repos
BUILD args: --packages-above-and-dependencies rosbag2_cpp
TEST args: --packages-above rosbag2_cpp
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/10886

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

@emersonknapp emersonknapp changed the title Fix issue where sequentialwriter only sets metadata duration to the duration of the final file Fix: SequentialWriter incorrect metadata total duration for split bags Sep 26, 2022
@emersonknapp emersonknapp merged commit 626d69b into rolling Sep 26, 2022
@delete-merged-branch delete-merged-branch bot deleted the emersonknapp/fix-split-bag-duration branch September 26, 2022 22:18
@emersonknapp
Copy link
Collaborator Author

@Mergifyio backport humble galactic foxy

mergify bot pushed a commit that referenced this pull request Sep 26, 2022
…uration of the final file (#1098)

Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>
(cherry picked from commit 626d69b)
mergify bot pushed a commit that referenced this pull request Sep 26, 2022
…uration of the final file (#1098)

Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>
(cherry picked from commit 626d69b)

# Conflicts:
#	rosbag2_cpp/src/rosbag2_cpp/writers/sequential_writer.cpp
#	rosbag2_cpp/test/rosbag2_cpp/test_sequential_writer.cpp
mergify bot pushed a commit that referenced this pull request Sep 26, 2022
…uration of the final file (#1098)

Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>
(cherry picked from commit 626d69b)

# Conflicts:
#	rosbag2_cpp/CMakeLists.txt
#	rosbag2_cpp/src/rosbag2_cpp/writers/sequential_writer.cpp
@mergify
Copy link

mergify bot commented Sep 26, 2022

Copy link
Contributor

@MichaelOrlov MichaelOrlov left a comment

Choose a reason for hiding this comment

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

@emersonknapp Thanks for fixing this issue!
LGTM.

@clalancette
Copy link
Contributor

@emersonknapp @MichaelOrlov I'm pretty sure this change broke building on RHEL; see https://ci.ros2.org/view/nightly/job/nightly_linux-rhel_release/1273/console . My guess is because RHEL-8 has an older version of gcc, and thus the version of std::filesystem doesn't work as well as it should. Given that we are only using std::filesystem in a test, maybe we can slightly rewrite the test to be more friendly to RHEL-8?

@emersonknapp
Copy link
Collaborator Author

Yeah this can be easily patched to use rcpputils filsystem helper. Just didn't catch the issue because rhel not in the standard ci suite. Maybe we should add it to ci_launcher?

Regardless, I'm AFK until tomorrow afternoon so I can't fix it until then, reverting would be ok by me if wanted.

@MichaelOrlov
Copy link
Contributor

@clalancette @emersonknapp I prepared fix in #1104 please review.

@clalancette
Copy link
Contributor

Maybe we should add it to ci_launcher?

Yeah, we've gone back and forth on that question. RHEL is a Tier-2 platform, which means that we don't technically guarantee that it will work. On the other hand, we do have people using it, so we want to make sure it works as well as possible.

The problem with adding it to the ci_launcher is that it puts more strain on the CI workers, and we are already running kind of close to the limit. RHEL doesn't usually require special handling, but did in this case. I'm inclined to leave things as-is, and revisit this question if more RHEL-specific problems start to pop up.

@ros-discourse
Copy link

This pull request has been mentioned on ROS Discourse. There might be relevant details there:

https://discourse.ros.org/t/ros-2-tsc-meeting-minutes-2022-10-13/28213/1

MichaelOrlov pushed a commit that referenced this pull request Apr 12, 2023
…uration of the final file (#1098) (#1101)

Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>
(cherry picked from commit 626d69b)

Co-authored-by: Emerson Knapp <537409+emersonknapp@users.noreply.github.com>
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.

Bag split updating starting_time metadata field
4 participants