Adding a docker file to help test for missing package.xml dependencies#606
Adding a docker file to help test for missing package.xml dependencies#60611 commits merged intomasterfrom unknown repository
Conversation
Codecov Report
@@ Coverage Diff @@
## master #606 +/- ##
==========================================
- Coverage 21.12% 21.08% -0.05%
==========================================
Files 184 184
Lines 9448 9448
Branches 2317 2317
==========================================
- Hits 1996 1992 -4
Misses 6311 6311
- Partials 1141 1145 +4
Continue to review full report at Codecov.
|
I'm not sure I understand. This seem to be using rosdep to install all dependencies declared in workspace packages, how does using one workspace instead of a layered workspace for upstream packaged dependencies change things? I think we would need to call rosdep for only the navigation packages, and the upstream ros2 packages that and dependent, not necessary for all packages in the ros2 master .repo.
Is this big issue? I could probably add a new tag like
I think introducing another Dockerfile would exacerbates this. I've recommend templating our Dockerfile pipeline using docker build arguments to generalize against any release, specially for the use case in our CI and target release branch PRs. I'm little blocked however in doing this by upstream issues however: https://discuss.circleci.com/t/conditioning-docker-image-via-base-branch-name-from-pr/28426/6 |
Thanks for the thorough explanation! I think understand now: the checking for missing ros2 depnacies.
I think we could either have it a regular cron job for master/release branches or we could have it be a final check in PRs, e.g. before merging, user merging PR first manual approves the branch of the workflow for the PR that tests this, so that not every commit triggers this length build. https://circleci.com/docs/2.0/workflows/#holding-a-workflow-for-a-manual-approval |
mkhansenbot
left a comment
There was a problem hiding this comment.
Either I don't understand the documentation or the commands for build and test are incorrect. I would think there's supposed to be one to build nav2:master and another to build nav2:crystal.
doc/process/PreReleaseChecklist.md
Outdated
| There is a docker file to do that, so run | ||
|
|
||
| ```bash | ||
| sudo docker build -t nav2:crystal_full --build-arg http_proxy=http://myproxy.example.com:80 --build-arg https_proxy=http://myproxy.example.com:80 --build-arg ROS2_BRANCH=crystal -f Dockerfile.full_ros_build ./ |
There was a problem hiding this comment.
Did you get this command and the other one swapped? This one says ROS2_BRANCH=crystal, which I think should be in the next example?
There was a problem hiding this comment.
Both dockerfiles need a ROS2_BRANCH argument now. It represents the upstream branch we are targeting or verifying against.
| For newer releases, run | ||
|
|
||
| ```bash | ||
| sudo docker run nav2:crystal src/navigation2/tools/run_test_suite.bash |
There was a problem hiding this comment.
should this be nav2:master?
There was a problem hiding this comment.
It's just a tag for the docker build. We could leave it out entirely. I'll change the tags to be branch agnostic. I'll make them nav2:full_build and nav2:rosdep_build
mkhansenbot
left a comment
There was a problem hiding this comment.
Sorry I don't know what state this is in but I just reviewed it and found a couple minor things. I think the FROM ros:$BRANCH should be FROM ros:$ROS2_BRANCH shouldn't it?
Dockerfile.full_ros_build
Outdated
| ARG CMAKE_BUILD_TYPE=Debug | ||
| RUN colcon build \ | ||
| --symlink-install \ | ||
| # --packages-up-to nav2_bringup \ |
There was a problem hiding this comment.
Is this commented out --packages-up-to option needed?
There was a problem hiding this comment.
It's a possible performance optimization. I'd like to use it, but I don't know for sure if it is safe (as in, we'll truly catch all problems.) If we add a package that doesn't get referenced in some way from nav2_bringup, then we'd miss any dependency problems with that package.
I left the comment in so I didn't need to look up how to do this again, if we decided we wanted to enable the optimization, however, I'll delete it for now.
Dockerfile.release_branch
Outdated
| @@ -7,17 +7,9 @@ | |||
| # docker build -t nav2:crystal --build-arg BUILD_SYSTEM_TESTS | |||
There was a problem hiding this comment.
probably should update the example command line from 'Dockerfile.crystal' to 'Dockerfile.release_branch'
Dockerfile.release_branch
Outdated
| python3-vcstool \ | ||
| wget \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
| FROM ros:$BRANCH |
There was a problem hiding this comment.
shouldn't this be ros:$ROS2_BRANCH
There was a problem hiding this comment.
Yes. Good catch. I guess I didn't test enough after I consolidated the two variables.
This catches missing dependencies in the package.xml files.


Description of contribution in a few bullet points
Future work that may be required in bullet points
crystal-ros-coreto get the correct apt sources file and the basic dependencies that ROS2 needs, howevercrystal-ros-coreinstalls a bunch of ros2 packages we don't need since we are building everything from source anyhow.crystal-ros-corebase image probably needs to be an argument, so we can change it based on which branch we are targeting.