New automation for validating rosdistro changes

Greetings, ROS contributors!

As presented during the day 1 lightning talks at ROSCon 2024, I’m pleased to announce the release of the rosdistro-reviewer tool, which provides feedback for pull requests submitted to the ros/rosdistro repository on GitHub.

What to expect

When you submit changes to ros/rosdistro, a new review should be posted to your pull request shortly after you open it from the github-actions[bot] user.

Goals of this tool

  1. Support more types of checks than can currently run in the pytest-based automation.
  2. Provide informational feedback that the rosdistro review team can use to make quicker decisions about certain criteria.
  3. Provide feedback to submitters using a single channel (reivews), rather than providing some of the feedback in verbose log files.
  4. Provide feedback faster, ideally reducing the amount of time before a pull request arrives at an acceptable form for merging.

Iterating on changes

The automation will run and post a review for all changes pushed to the pull request unless the PR is in a β€œdraft” state. Marking a pull request as β€œready for review” will also trigger the automation to run and post a review.

It is also possible to invoke the tool locally to validate changes prior to opening a pull request or pushing them to an active one. The rosdistro-reviewer tool is available for installation from PyPI and is also distributed in the ROS apt repositories (apt install python3-rosdistro-reviewer). To invoke the tool, run something like rosdistro-reviewer --target-ref master from your local rosdistro repository clone. This command will check all changes (including staged and uncommitted ones) present in your workspace against the state of the master branch in your clone. If everything looks good, you’ll see something like this:

  βœ… No changes recommended
 /β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”\
 | For changes related to rosdep:                                   |
 | * βœ… New rosdep keys are named appropriately                     |
 | * βœ… Platforms for new rosdep rules are valid                    |
 |                                                                  |
 | For changes related to yamllint:                                 |
 | * βœ… All new lines of YAML pass linter checks                    |
 \β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”/

If the automation believes changes should be made, you may see output more like this:

  ❌ Changes recommended
 /β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”\
 | For changes related to rosdep:                                   |
 | * βœ… New rosdep keys are named appropriately                     |
 | * ❌ There are problems with explicitly provided platforms:      |
 |   - One or more explicitly provided platforms are no longer      |
 |     supported                                                    |
 |   - One or more explicitly provided platforms are not supported  |
 |     by rosdep                                                    |
 |                                                                  |
 | For changes related to yamllint:                                 |
 | * ❌ One or more linter violations were added to YAML files      |
 \β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”/
  Β¦ 
  Β¦ /β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”\
  Β¦ | In rosdep/python.yaml:                                        |
  Β¦ |   4861 |   archlinux: [python-aiosignal]                      |
  Β¦ +---------------------------------------------------------------+
  Β¦ | This OS is not supported by rosdep                            |
  Β¦ \β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”/
  Β¦ 
  Β¦ /β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”\
  Β¦ | In rosdep/python.yaml:                                        |
  Β¦ |   4864 |     bionic: null                                     |
  Β¦ +---------------------------------------------------------------+
  Β¦ | This release is no longer a supported version of ubuntu       |
  Β¦ \β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”/
  Β¦ 
  Β¦ /β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”\
  Β¦ | In rosdep/python.yaml:                                        |
  Β¦ |   4860 |       packages: [aiosignal] # Should migrate to syst |
  Β¦ +---------------------------------------------------------------+
  Β¦ | This line does not pass YAML linter checks: too few spaces    |
  Β¦ | before comment                                                |
  Β¦ \β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”/
  Β¦ 
  Β¦ /β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”\
  Β¦ | In rosdep/base.yaml:                                          |
  Β¦ |   201 |     fedora: [aunit-devel]                             |
  Β¦ +---------------------------------------------------------------+
  Β¦ | This line does not pass YAML linter checks: wrong             |
  Β¦ | indentation: expected 2 but found 4                           |
  Β¦ \β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”/

Reporting bugs

If you encounter problems with this automation, I’d love to hear about them so that we can improve it. Feel free to report bugs by opening issues on the ros-infrastructure/rosdistro-reviewer repository, or by pinging me (@cottsay) from the relevant pull request.

8 Likes