Support for CI on top of ros2 nightly images#454
Support for CI on top of ros2 nightly images#454mathias-luedtke merged 2 commits intoros-industrial:masterfrom
Conversation
mathias-luedtke
left a comment
There was a problem hiding this comment.
Thank you very much!
All in all I don't see any problem with merging this 👍
However, I'd like to discuss these two items first.
industrial_ci/src/env.sh
Outdated
| ;; | ||
| "foxy") | ||
| ros2_defaults "bionic" | ||
| DEFAULT_DOCKER_IMAGE= |
There was a problem hiding this comment.
Why not
| DEFAULT_DOCKER_IMAGE= | |
| DEFAULT_DOCKER_IMAGE=osrf/ros2:nightly |
This way, one can specify DOCKER_IMAGE=osrf/ros2:nightly (for rolling nightly version) or ROS_DISTRO=foxy (for next release only)
There was a problem hiding this comment.
Or DOCKER_IMAGE=osrf/ros2:nightly for now?
There was a problem hiding this comment.
This way, one can specify DOCKER_IMAGE=osrf/ros2:nightly (for rolling nightly version) or ROS_DISTRO=foxy (for next release only)
I am not sure I understood what the intended result is from these 2 different configurations.
What are the 2 scenarios we are trying to cover with this change?
What would the .travis.yml line would look like for each?
Or DOCKER_IMAGE=osrf/ros2:nightly for now?
This will work more consistently than DEFAULT_DOCKER_IMAGE=osrf/ros2:nightly as the DEFAULT_DOCKER_IMAGE gets overwritten for some ROS_REPO values (including the default one)
A few hidden assumptions / expectations from my part that came up:
- Clear at first glance
It should be clear to user which job is a nightly build vs a build against a released distribution
in ros2ci it was done by naming the job nightly
- env: JOB_TYPE=nightly
script:
- cp additional_repos.repos .ros2ci/
- .ros2ci/travis.bash $JOB_TYPENot sure what would be the best for ICI. Maybe having the DOCKER_IMAGE=osrf/ros2:nightly at the beginning of the line is enough 🤷♂️
- Minimal effort to set up
Should be a one liner for user to set up in their CI system e.g.:
env:
matrix:
- ROS_DISTRO="dashing" ROS_REPO=main
- ROS_DISTRO="eloquent" ROS_REPO=main
+ - DOCKER_IMAGE="osrf/ros2:nightly" UPSTREAM_WORKSPACE="additional_repos.repos"- Zero maintenance from users
Once added the line should never need to be updated to keep tracking "ROS 2 master"- line should be
ROS_DISTRO-free
- line should be
- Clearly separated from release jobs
The job defined will never track a releasedROS_DISTROfrom debians, if users want to add a job for a new distro they should
env:
matrix:
- ROS_DISTRO="dashing" ROS_REPO=main
- ROS_DISTRO="eloquent" ROS_REPO=main
+ - ROS_DISTRO="foxy" ROS_REPO=main
- DOCKER_IMAGE="osrf/ros2:nightly" UPSTREAM_WORKSPACE="additional_repos.repos"There was a problem hiding this comment.
I am not sure I understood what the intended result is from these 2 different configurations.
- test against night build (
DOCKER_IMAGE="osrf/ros2:nightly" UPSTREAM_WORKSPACE="additional_repos.repos) - test against ROS2 foxy (
ROS_DISTRO="foxy" ROS_REPO=main). Could point to the nightly build right now and can be switched to the testing/main repo as they become available.
There was a problem hiding this comment.
Thanks for clarifying 👍
Yes it should work.
Users with all their dependencies in ros2.repos will be fine, the ones with extra dependencies will need to remove the UPSTREAM_WORKSPACE once the packages are available in the distro
ROS_DISTRO="foxy" ROS_REPO=main UPSTREAM_WORKSPACE="additional_repos.repos"
to
ROS_DISTRO="foxy" ROS_REPO=main
industrial_ci/src/workspace.sh
Outdated
| fi | ||
| set -o pipefail # fail if rosdep install fails | ||
| ROS_PACKAGE_PATH=$cmake_prefix_path ici_exec_in_workspace "$extend" "." rosdep install "${rosdep_opts[@]}" | { grep "executing command" || true; } | ||
| ROS_PACKAGE_PATH=$cmake_prefix_path:${ROS_PACKAGE_PATH} ici_exec_in_workspace "$extend" "." rosdep install "${rosdep_opts[@]}" | { grep "executing command" || true; } |
There was a problem hiding this comment.
${ROS_PACKAGE_PATH} should be empty at this point
There was a problem hiding this comment.
In the case of the nightly image it is not empty osrf/docker_images#328.
But it is a hack because of a rosdep issue, so I dont think this commit should be merged in industrial_ci, this is only propagating the workaround to have a working example for this discussion
There was a problem hiding this comment.
I see. Shouldn't this path be included in CMAKE_PREFIX_PATH? I stumbled upon this issue as well and CMAKE_PREFIX_PATH did the trick in my tests. However, I haven't tested it against the nightly build yet.
There was a problem hiding this comment.
hmm I think rosdep does only look in ROS_PACKAGE_PATH and AMENT_PREFIX_PATH.
If all the packages in the nightly archive were registered in the ament index it would work (ongoing discussion at ros2/tinyxml_vendor#14)
There was a problem hiding this comment.
hmm I think rosdep does only look in ROS_PACKAGE_PATH
That's why I set it to CMAKE_PREFIX_PATH, this works (or worked?) for catkin and ament :)
There was a problem hiding this comment.
only use AMENT_PREFIX_PATH
catkin packages do not set AMENT_PREFIX_PATH (?)
So the ROS2 docker images (e.g. ros:dashing) do not set CMAKE_PREFIX_PATH
I know, and they should not set it. I am reading it from setup.bash
This is a temporary hack until rosdep can crawl the ament index.
There was a problem hiding this comment.
catkin packages do not set AMENT_PREFIX_PATH (?)
not that I know of. Even if a tool build tool like colcon did it, I wouldn't expect catkin packages to register themselves in the index.
This is a temporary hack until rosdep can crawl the ament index.
This is now a thing ros-infrastructure/rosdep#699
The nightly image sets the ROS_PACKAGE_PATH only because rosdep cannot find non-ament packages like ros2/tinyxml_vendor#14
There was a problem hiding this comment.
TL;DR this line can stay as is if we remove the COLCON_IGNORE
I just tested it, the COLCON_IGNORE is breaking the work-around.
If rosdep now support AMENT_PREFIX_PATH, then we don't need to set ROS_PACKAGE_PATH.
There was a problem hiding this comment.
I just tested it, the COLCON_IGNORE is breaking the work-around.
In what scenario does it break? Can you clarify how it breaks?
If removing it has a negative effect, I'll reject osrf/docker_images#345
This reverts commit 09618f4.
There was a problem hiding this comment.
Please rebase this to #456 and commit my suggestion.
If the new version still passes your tests, I will merge both PRs.
As a follow-up, I'd like to rewrite env.sh to allow arbitrary Docker images.
For this to work, the variables have to be parsed in the correct order/phase and not twice as of now.
Haven't tried this yet but I expect #456 to break the use of nightly images. So for the nightly builds to work we would have to keep populating the ROS_PACKAGE_PATH here for now |
I tested it locally with https://github.com/Karsten1987/confbot_robot/blob/ca85f937cf51b597477837c4a636dad88fc39a20/.travis.yml It seems to work (all tests pass), but it displays a lot of connext-related errors/warnings. |
Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
Oh yeah, it will work because the I'll rebase on #456 and force-push on this branch |
Yeah this is another issue with the OR nightly archive, unrelated to this PR |
61a5ccd to
2cf0fe4
Compare
mathias-luedtke
left a comment
There was a problem hiding this comment.
Oh yeah, it will work because the ROS_PACKAGE_PATH work-around hard coded in the docker image is not being overwritten anymore
Exactly :)
I am not sure if we should list foxy in the list of supported distros.
Not sure either. As long as Foxy is not released (or in beta phase) the statement would be misleading as testing against the last nightly != testing against officially released Foxy... An alternative is to add "ROS 2 nightly builds" to the list of supported distros. It does not qualify as a distro per se but would be more accurate. |
I'd like to support something like
For now we should just merge it as-is. Please let me know if your test repo works with this version. I will postpone the merge until then. |
Yeah me too, there were some blockers on the docker image side for a while. It may be possible now, would need to check again.
It works for me! |
Hi all, I created a way simpler and stupider version of ici for ROS 2 a while back (ros2ci). Main purpose was to be able to run CI on both released ROS 2 distros and ROS 2 nightly builds to catch breakage of packages against upcoming versions of ROS 2.
Now that ICI supports colcon + ROS 2 (hat tip @ipa-mdl 👍🎉), I'd like to integrate the support for nightly builds instead of maintaining something on the side.
I'm opening this to start discussion of supporting nightly ROS 2 CI in ICI.
Feature description:
Is it a use case ICI would be interested in supporting?
Content of this PR:
Users wanting to run CI based on nightly builds could modify their travis config as follows:
env: matrix: - ROS_DISTRO="dashing" ROS_REPO=main - ROS_DISTRO="eloquent" ROS_REPO=main + - DOCKER_IMAGE="osrf/ros2:nightly" UPSTREAM_WORKSPACE="additional_repos.repos"osrf/ros2:nightlybeing the docker image provided daily by osrf with the content of the latest nightly buildadditional_repos.reposthe list of upstream packages needed to compile the repository that are NOT part of the nightly imageExample of repo using this and travis job