-
Notifications
You must be signed in to change notification settings - Fork 283
Propagate "custom_data" and "ros_distro" in to the metadata.yaml file during re-indexing #1700
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
Conversation
Signed-off-by: Cole Tucker Signed-off-by: coalman321 <[email protected]>
Signed-off-by: coalman321 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm with green CI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@coalman321 Thanks for the PR. Overall looks good to me.
However, I have a proposal to check if temp_metadata.custom_data
is not empty before assigning it to the metadata_.custom_data
and the same for the ros_distro
.
So I changed my thoughts on implementation a few times during this PR. My guiding thought was that the youngest split file (most recent) should be the most up to date version of If you think this thought process doesn't match up with the designed intent, then I would be happy to modify it. |
@coalman321 Your assumption that the latest metadata should have the most up to date version of the |
I had not considered the abnormal case where the recording is not closed properly. Ill adjust the logic to work only if the fields are not empty. |
Signed-off-by: coalman321 <[email protected]>
Signed-off-by: coalman321 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@coalman321 Thank you for your contribution.
LGTM with green CI.
Happy to help. Also looks like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@coalman321 May I ask you to modify https://github.com/ros2/rosbag2/blob/rolling/rosbag2_tests/test/rosbag2_tests/test_reindexer.cpp tests to check custom_data
and ROS_DISTRO
in the reindexer test?
Signed-off-by: coalman321 <[email protected]>
Added verification for both in the reindexer test as requested. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@coalman321 Thanks for updating the tests.
LGTM with green CI.
Pulls: #1700 |
@coalman321 Unfortunately the CI failed on Windows with the following errors:
|
Signed-off-by: coalman321 <[email protected]>
Looks like it was an issue with the clock type that was being used. GCC must alias the system clock and the high-res clock in chrono. The change uses the exact same time point spec from the BagMetadata structure now. |
https://github.com/Mergifyio backport jazzy iron |
✅ Backports have been created
|
… during re-indexing (#1700) * propagate custom data and ros_distro during reindexing Signed-off-by: Cole Tucker Signed-off-by: coalman321 <[email protected]> * fix ament uncrustify issue Signed-off-by: coalman321 <[email protected]> * only update metadata if size is nonzero Signed-off-by: coalman321 <[email protected]> * fix uncrustify issue and switch to empty Signed-off-by: coalman321 <[email protected]> * update reindexer test to verify custom data and ros_distro changes Signed-off-by: coalman321 <[email protected]> * Convert to use exact clock type for windows CI Signed-off-by: coalman321 <[email protected]> --------- Signed-off-by: coalman321 <[email protected]> (cherry picked from commit 804432c)
… during re-indexing (#1700) * propagate custom data and ros_distro during reindexing Signed-off-by: Cole Tucker Signed-off-by: coalman321 <[email protected]> * fix ament uncrustify issue Signed-off-by: coalman321 <[email protected]> * only update metadata if size is nonzero Signed-off-by: coalman321 <[email protected]> * fix uncrustify issue and switch to empty Signed-off-by: coalman321 <[email protected]> * update reindexer test to verify custom data and ros_distro changes Signed-off-by: coalman321 <[email protected]> * Convert to use exact clock type for windows CI Signed-off-by: coalman321 <[email protected]> --------- Signed-off-by: coalman321 <[email protected]> (cherry picked from commit 804432c)
https://github.com/Mergifyio backport humble |
✅ Backports have been created
|
… during re-indexing (#1700) * propagate custom data and ros_distro during reindexing Signed-off-by: Cole Tucker Signed-off-by: coalman321 <[email protected]> * fix ament uncrustify issue Signed-off-by: coalman321 <[email protected]> * only update metadata if size is nonzero Signed-off-by: coalman321 <[email protected]> * fix uncrustify issue and switch to empty Signed-off-by: coalman321 <[email protected]> * update reindexer test to verify custom data and ros_distro changes Signed-off-by: coalman321 <[email protected]> * Convert to use exact clock type for windows CI Signed-off-by: coalman321 <[email protected]> --------- Signed-off-by: coalman321 <[email protected]> (cherry picked from commit 804432c) # Conflicts: # rosbag2_tests/test/rosbag2_tests/test_reindexer.cpp
… during re-indexing (#1700) (#1710) * propagate custom data and ros_distro during reindexing Signed-off-by: Cole Tucker Signed-off-by: coalman321 <[email protected]> * fix ament uncrustify issue Signed-off-by: coalman321 <[email protected]> * only update metadata if size is nonzero Signed-off-by: coalman321 <[email protected]> * fix uncrustify issue and switch to empty Signed-off-by: coalman321 <[email protected]> * update reindexer test to verify custom data and ros_distro changes Signed-off-by: coalman321 <[email protected]> * Convert to use exact clock type for windows CI Signed-off-by: coalman321 <[email protected]> --------- Signed-off-by: coalman321 <[email protected]> (cherry picked from commit 804432c) Co-authored-by: Cole Tucker <[email protected]>
…ml file during re-indexing (backport #1700) (#1711) * Propagate "custom_data" and "ros_distro" in to the metadata.yaml file during re-indexing (#1700) * propagate custom data and ros_distro during reindexing Signed-off-by: Cole Tucker Signed-off-by: coalman321 <[email protected]> * fix ament uncrustify issue Signed-off-by: coalman321 <[email protected]> * only update metadata if size is nonzero Signed-off-by: coalman321 <[email protected]> * fix uncrustify issue and switch to empty Signed-off-by: coalman321 <[email protected]> * update reindexer test to verify custom data and ros_distro changes Signed-off-by: coalman321 <[email protected]> * Convert to use exact clock type for windows CI Signed-off-by: coalman321 <[email protected]> --------- Signed-off-by: coalman321 <[email protected]> (cherry picked from commit 804432c) * Remove "metadata.ros_distro" update since we don't have in on Iron Signed-off-by: Michael Orlov <[email protected]> * Skip check for `custom_metadata` in test for mcap storage plugin. - Rationale: Mcap storage doesn't store serialized metadata in bag directly on Iron and Humble. Backporting of the relevant #1423 is not possible without updating mcap vendor package to the v1.1.0 because we have dependencies from the mcap_reader_->metadataIndexes(); API which became available only in the foxglove/mcap#902 Signed-off-by: Michael Orlov <[email protected]> --------- Signed-off-by: Michael Orlov <[email protected]> Co-authored-by: Cole Tucker <[email protected]> Co-authored-by: Michael Orlov <[email protected]>
Propagates the
custom_data
andros_distro
fields from the underlying storage into themetadata.yaml
file during re-indexing.metadata.yaml
were left as default.custom_data
andros_distro
metadata from the newest storage file contained within the log as custom data can be modified in the storage API between successive split files.This fixes #1699