ros-tooling / setup-ros

Github Action to set up ROS 2 on hosts
Apache License 2.0
85 stars 38 forks source link

Add Ubuntu 24.04 Noble and switch Rolling to it #658

Closed christophebedard closed 3 months ago

christophebedard commented 4 months ago

Relates to https://github.com/ros-tooling/action-ros-ci/pull/842

See also https://github.com/ros-tooling/setup-ros-docker/pull/69 (required for the Test on a setup-ros-docker container CI job)

Closes #659

Rolling is moving to Ubuntu 24.04 Noble: https://discourse.ros.org/t/preparing-ros-2-rolling-for-the-transition-to-ubuntu-24-04/35673.

Note: the ubuntu-24.04GitHub runner is not available yet: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#choosing-github-hosted-runners. I changed the workflow configs to use a Ubuntu Noble Docker image on top of ubuntu-latest. We could just keep this and not have to remove the workaround + bring it back for Ubuntu 26.04.

I also removed some apt from the list for Noble, since we can just rely on rosdep:

  1. Some flake8 plugins, see: https://github.com/ros2/ros2_documentation/pull/3945
  2. libtinyxml2-dev installed for tinyxml2_vendor
codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 57.14286% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 91.09%. Comparing base (ec1b086) to head (0876b68).

Files Patch % Lines
src/setup-ros-linux.ts 57.14% 3 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #658 +/- ## ========================================== - Coverage 92.47% 91.09% -1.38% ========================================== Files 8 8 Lines 186 191 +5 Branches 22 24 +2 ========================================== + Hits 172 174 +2 - Misses 14 17 +3 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

christophebedard commented 3 months ago

The desktop variant seems to be available for Rolling on Noble, but not desktop_full: https://repo.ros2.org/status_page/ros_rolling_default.html?q=variant. So I assume that not all packages are available yet. We could still merge this in.

ct2034 commented 3 months ago

I can confirm. It works for me: https://github.com/ros/diagnostics/actions/runs/8439160454/job/23113100580?pr=335

christophebedard commented 3 months ago

Looks like there is an incompatibility between python3-flake8 (5.0.4) and python3-pycodestyle (2.11.1) on Noble that leads to this runtime (test-time) error:

flake8.exceptions.FailedToLoadPlugin: Flake8 failed to load plugin "pycodestyle" due to cannot import name 'missing_whitespace_around_operator' from 'pycodestyle' (/usr/lib/python3/dist-packages/pycodestyle.py).

See this CI job from the action-ros-ci PR: https://github.com/ros-tooling/action-ros-ci/actions/runs/8425209031/job/23070850980?pr=842#step:7:3242.

The apt version should hopefully eventually be fixed, but in the meantime we could try to install flake8<5 from pip like what is done in https://github.com/ros2/ci/pull/761, or we could try to install a newer version from noble-proposed like what is done in https://github.com/ros2/ci/pull/765.

christophebedard commented 3 months ago

I can confirm. It works for me: https://github.com/ros/diagnostics/actions/runs/8439160454/job/23113100580?pr=335

You're not hitting the issue I mentioned in my comment above?

Ah, probably because the package you're testing doesn't use flake8.

ct2034 commented 3 months ago

Yes, I can also confirm the flake8 issue.

ct2034 commented 3 months ago

The downgrade to flake8<5 fixes the above-mentioned error. But on one of the packages I now get a new one: https://github.com/ros/diagnostics/actions/runs/8439870785/job/23115500760?pr=335

      File "/usr/local/lib/python3.12/dist-packages/flake8/plugins/manager.py", line 261, in _load_entrypoint_plugins
          eps = importlib_metadata.entry_points().get(self.namespace, ())
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      AttributeError: 'EntryPoints' object has no attribute 'get'
christophebedard commented 3 months ago

It may be because pip seems to install other (newer?) versions of some packages when you do pip3 install --break-system-packages 'flake8<5', so you'd need to figure out which ones lead to this incompatibility.

Can you try to do https://github.com/ros2/ci/pull/765 instead of using pip? If it works, then I'll just do that here.

christophebedard commented 3 months ago

Can you try to do ros2/ci#765 instead of using pip? If it works, then I'll just do that here.

Well I did it and it seems to work!

christophebedard commented 3 months ago

Since this works, I'll go ahead and merge it. I may not create a new release just yet since the transition to Noble is not officially complete. I'll let people using setup-ros@master use/test it.