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

Add default initialization for CompressionOptions #1539

Merged
merged 2 commits into from Jan 20, 2024

Conversation

arneboe
Copy link
Contributor

@arneboe arneboe commented Jan 15, 2024

This PR adds sane defaults for the CompressionOptions struct.
Sane defaults are important because the struct does not have a constructor and it is possible (and very easy) to use it without completely initializing it.

Another option would be to add a constructor and delete the default constructor, but that would not be backward compatible.

@arneboe arneboe requested a review from a team as a code owner January 15, 2024 15:59
@arneboe arneboe requested review from gbiggs and jhdcs and removed request for a team January 15, 2024 15:59
Copy link
Contributor

@fujitatomoya fujitatomoya left a comment

Choose a reason for hiding this comment

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

minor comment, but needs to be resolved.

CC: @MichaelOrlov

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.

@arneboe I have a minor concern about initial value for number of threads.
Also please fix DCO. See details in the https://github.com/ros2/rosbag2/pull/1539/checks?check_run_id=20499622275

Arne Böckmann and others added 2 commits January 18, 2024 13:27
Signed-off-by: Arne Böckmann <a.boeckmann@cellumation.com>
…tions.hpp

Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
Signed-off-by: Arne Böckmann <a.boeckmann@cellumation.com>
@arneboe
Copy link
Contributor Author

arneboe commented Jan 18, 2024

@arneboe I have a minor concern about initial value for number of threads. Also please fix DCO. See details in the https://github.com/ros2/rosbag2/pull/1539/checks?check_run_id=20499622275

Done ;)

@MichaelOrlov
Copy link
Contributor

@ros-pull-request-builder retest this please

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.

LGTM

@MichaelOrlov
Copy link
Contributor

Gist: https://gist.githubusercontent.com/MichaelOrlov/d2aeb87a86a3fc667fbe88950d5f1ea8/raw/fd15696f0f6d091943f8f91903f39eb3682df54b/ros2.repos
BUILD args: --packages-above-and-dependencies rosbag2_compression
TEST args: --packages-above rosbag2_compression
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/13144

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

@MichaelOrlov MichaelOrlov changed the title feat: add sane defaults for CompressionOptions Add default initialization for CompressionOptions Jan 19, 2024
@MichaelOrlov MichaelOrlov merged commit 931bf54 into ros2:rolling Jan 20, 2024
14 checks passed
@MichaelOrlov
Copy link
Contributor

https://github.com/Mergifyio backport iron humble

Copy link

mergify bot commented Jan 20, 2024

backport iron humble

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Jan 20, 2024
* feat: add sane defaults for CompressionOptions

Signed-off-by: Arne Böckmann <a.boeckmann@cellumation.com>

* Update rosbag2_compression/include/rosbag2_compression/compression_options.hpp

Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
Signed-off-by: Arne Böckmann <a.boeckmann@cellumation.com>

---------

Signed-off-by: Arne Böckmann <a.boeckmann@cellumation.com>
Co-authored-by: Arne Böckmann <a.boeckmann@cellumation.com>
Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
(cherry picked from commit 931bf54)

# Conflicts:
#	rosbag2_compression/include/rosbag2_compression/compression_options.hpp
mergify bot pushed a commit that referenced this pull request Jan 20, 2024
* feat: add sane defaults for CompressionOptions

Signed-off-by: Arne Böckmann <a.boeckmann@cellumation.com>

* Update rosbag2_compression/include/rosbag2_compression/compression_options.hpp

Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
Signed-off-by: Arne Böckmann <a.boeckmann@cellumation.com>

---------

Signed-off-by: Arne Böckmann <a.boeckmann@cellumation.com>
Co-authored-by: Arne Böckmann <a.boeckmann@cellumation.com>
Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
(cherry picked from commit 931bf54)

# Conflicts:
#	rosbag2_compression/include/rosbag2_compression/compression_options.hpp
MichaelOrlov added a commit that referenced this pull request Jan 28, 2024
…1539) (#1546)

* Add default initialization for CompressionOptions (#1539)

* feat: add sane defaults for CompressionOptions

Signed-off-by: Arne Böckmann <a.boeckmann@cellumation.com>

* Update rosbag2_compression/include/rosbag2_compression/compression_options.hpp

Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
Signed-off-by: Arne Böckmann <a.boeckmann@cellumation.com>

---------

Signed-off-by: Arne Böckmann <a.boeckmann@cellumation.com>
Co-authored-by: Arne Böckmann <a.boeckmann@cellumation.com>
Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
(cherry picked from commit 931bf54)

# Conflicts:
#	rosbag2_compression/include/rosbag2_compression/compression_options.hpp

* Address merge conflicts

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>

---------

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>
Co-authored-by: Arne B <arne@rnae.de>
Co-authored-by: Michael Orlov <michael.orlov@apex.ai>
MichaelOrlov added a commit that referenced this pull request Jan 28, 2024
) (#1545)

* Add default initialization for CompressionOptions (#1539)

* feat: add sane defaults for CompressionOptions

Signed-off-by: Arne Böckmann <a.boeckmann@cellumation.com>

* Update rosbag2_compression/include/rosbag2_compression/compression_options.hpp

Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
Signed-off-by: Arne Böckmann <a.boeckmann@cellumation.com>

---------

Signed-off-by: Arne Böckmann <a.boeckmann@cellumation.com>
Co-authored-by: Arne Böckmann <a.boeckmann@cellumation.com>
Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
(cherry picked from commit 931bf54)

# Conflicts:
#	rosbag2_compression/include/rosbag2_compression/compression_options.hpp

* Address merge conflicts

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>

---------

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>
Co-authored-by: Arne B <arne@rnae.de>
Co-authored-by: Michael Orlov <michael.orlov@apex.ai>
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.

None yet

3 participants