Change default branch name to 'rolling' in ROS 2 core

Hello ROS community,

As anyone who has worked in the ROS 2 core knows, we have a myriad of different names for the default branches in the core. These range from ‘master’, to ‘main’, to ‘rolling’, to ‘rolling-devel’, to even ‘crystal-devel’.

In an effort to make this easier to script and explain, we are going to change the default branch on most repositories listed in ros2/ros2.repos at master · ros2/ros2 · GitHub to ‘rolling’. Note that certain repositories will be exempt from this renaming:

In order to not break any downstream scripts, we’ll also be installing a bot that automatically syncs commits from the new ‘rolling’ branch to whatever the old default branch was.

Roughly what we are going to do on every repository is:

  1. Create a ‘rolling’ branch.
  2. Add the GitHub action to automatically sync between the new ‘rolling’ branch and the old default branch.
  3. Change the default to the ‘rolling’ branch.
  4. Retarget existing PRs that target the default branch to target the ‘rolling’ branch.

We’ll also be updating ros2/ros2.repos at master · ros2/ros2 · GitHub to point the repositories at the ‘rolling’ branch, as well as updating the documentation at GitHub - ros2/ros2_documentation: ROS 2 docs repository to do the same.

Assuming all goes to plan, downstream consumers won’t really notice the change, except for the fact that new PRs will start targeting the ‘rolling’ branch instead of the old default. That said, once the transition is complete we will encourage all downstream consumers to use the ‘rolling’ branch.

Please let us know any feedback you have about this change, and if you think we’ve missed any major steps that need to be completed for this to work smoothly. If there are no major obstacles or objections, we’ll start doing this transition the week of June 27th, 2022.

12 Likes

:clap: very nice move!

However, when we release a new version of our webots_ros2 package for different ROS 2 distros using bloom, it seems that the rosdistro repo has CI tests that require the existence of the “foxy”, “galactic”, “humble” and “rolling” branches on the package repo. In our case, we managed to handle the differences between the ROS 2 distros at compile time and runtime mainly using the ROS_DISTRO environment variable, which is great for maintenance. Thus it makes no sense for us to maintain several branches on our package repo (e.g., “foxy”, “galactic”, “humble” and “rolling”) as they hold basically the exact same content, it is confusing contributors and is a pain to maintain them in sync. So my question is:

Do you have any plan to fix the CI tests on rosdistro to remove the requirements for the “foxy”, “galactic” and “humble” branches and allow us to maintain a single branch, e.g., “rolling” on our package repo?

There is no such requirement. You can use any branching scheme you like on your downstream repositories. For instance, I know that PlotJuggler uses the same branch (main) for ROS 1 Melodic, ROS 1 Noetic, ROS 2 Foxy, ROS 2 Galactic, ROS 2 Humble, and ROS 2 Rolling.

The only requirement is that it is a branch, not a tag.

@clalancette sounds good to me.

quick question though. how about the existed PRs to be targeted to current default branch in each repository? Contributors need to change the target branch once the default is changed?

best,
Tomoya

We’ll have a script that automatically retargets all of the existing PRs to the new ‘rolling’ branch. The contributors shouldn’t have to do anything.

1 Like