autowarefoundation / autoware

Autoware - the world's leading open-source software project for autonomous driving
https://www.autoware.org/
Apache License 2.0
8.58k stars 2.88k forks source link

refactor(docker): introduce rosdep-installed stage #4656

Closed youtalk closed 2 months ago

youtalk commented 2 months ago

Description

This PR introduces the rosdep-installed stage before the prebuilt stage to execute rosdep install only one time.

Tests performed

Not applicable.

Effects on system behavior

Not applicable.

Pre-review checklist for the PR author

The PR author must check the checkboxes below when creating the PR.

In-review checklist for the PR reviewers

The PR reviewers must check the checkboxes below before approval.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

After all checkboxes are checked, anyone who has write access can merge the PR.

youtalk commented 2 months ago

~The spell check failure will be fixed at https://github.com/tier4/autoware-spell-check-dict/pull/716~ Done.

mitsudome-r commented 2 months ago

@oguzkaganozt Did you have any reasons for running rosdep twice in prebuilt and runtime steps? I just wanted to confirm if you had any intention when you did the refactoring. Otherwise, the change looks reasonable to me.

doganulus commented 2 months ago

First, rosdep installs build dependencies for devel image.

Second, rosdep installs runtime (exec) dependencies for runtime image.

This separation is very important.

youtalk commented 2 months ago

rosdep install does not provide an option to choose to install dependent packages based on exec_depend, build_depend, etc. All dependent packages including build_export_depend and test_depend will be installed. This PR simply saves the waste of running the same rosdep install twice.

I am planning an apt package release of the Autoware packages. Once that is completed, we will be able to control the build and execution dependencies you mentioned.

doganulus commented 2 months ago

This is the PR that adds the support to dependency key selection: https://github.com/ros-infrastructure/rosdep/pull/789

And we can use:

rosdep install --dependency-types build
rosdep install --dependency-types exec

Whether build_depend and exec_depend tags are used correctly in packages is another question and how to ensure their correct usage but I am bringing it into your attention.

youtalk commented 2 months ago

@doganulus Thank you for your feedback. I didn't know the option. Due to the rosdep install separation, I've closed this PR.