← Back to issue list

core22 colcon plugin: re-source environment after installation

View original Github issue

Metadata

Project
snapcraft
Number
#3994
Type
pull request
State
merged
Author
Guillaumebeuzeboc
Labels
—
Created
Updated
Closed

Current evaluation

Merged #3994, moving ROS 2 environment sourcing until after colcon dependencies are installed. It also added package-state cleanup and regression spread coverage for custom ROS 2 interfaces.

Resolution: closed resolved

Reason: PR #3994 was approved and merged into main. It fixes core22 colcon builds by sourcing the ROS 2 environment after dependency installation and adds a message-package spread test covering the failure.

Evaluated by: mr-cal-bot

No scores available.

Issue body

- [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [x] Have you successfully run `make lint`? - [x] Have you successfully run `pytest tests/unit`? ----- Core22 ROS 2 `colcon` snaps couldn't build packages creating custom ROS 2 interfaces. It was sourcing the environment before downloading the dependencies. Some dependencies (`rosidl`) have specificities when sourced, hence sourcing before downloading them causes issues. In the case of ROS 2 message, the `PYTHONPATH` only had the `site-packages` subdir and not the `dist-packages` subdir added by `rosidl`. This issue couldn't appear with `lxd` spread tests because the `lxd` environment was not cleaned properly by `colcon` spread tests (Debian packages were still installed, hence the dependencies were mostly already installed). Additionally, the advanced `colcon` spread tests had no entry in the `spread.yaml` and were never called. Hence, this PR does: - Add missing spread entry for `colcon` specific tests - Add `package-utils.sh` to restore the state of Debian package installed before a spread tests - Add a `colcon` spread test with a message package to highlight that there is a bug - Fix the bug by sourcing the ROS 2 environment after installing the ROS 2 dependencies

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged #3994, moving ROS 2 environment sourcing until after colcon dependencies are installed. It also added package-state cleanup and regression spread coverage for custom ROS 2 interfaces.
stealth/space-bunny-alpha — closed resolved Merged #3994 to re-source the ROS 2 environment after dependency installation in the core22 colcon plugin, with new spread coverage; backported by #4054.
stealth/space-bunny-alpha — closed resolved Merged PR #3994 fixed core22 colcon builds by re-sourcing the ROS 2 environment after dependency installation, with regression spread tests and test-environment cleanup support.
qwen/qwen3.6-35b-a3b — — Merged fix for core22 colcon plugin that re-sources ROS 2 environment post-installation to resolve custom interface build failures. Added spread tests and package state restoration. Approved by two reviewers and merged.
qwen3.6-35b-a3b-mtp-q6 — — Merged. Fixed core22 colcon plugin by re-sourcing the ROS 2 environment after dependency installation, resolving custom interface build failures. Added spread tests and package-utils.sh. Approved after reviewer discussion on LXD handling.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#4054 core22 colcon plugin: re-source environment after installation (#3994) snapcraft merged Backported the core22 colcon fix in #3994: source ROS 2 after dependency installation. PR #4054 merged via d634246 into hotfix/7.3, with new spread coverage.
89%
#2456 plugins: add colcon plugin snapcraft merged PR #2456 by kyrofa merged (commit cd9516b56) adding a new beta colcon plugin for ROS 2 builds, resolving LP bug #1805213; later extended by #2486, #2593, #2670, #2687 and #2981.
74%
#3113 colcon: use packages.ros.org/ros2 repository snapcraft merged Merged PR #3113 (commit d76f466f6) switched the colcon plugin from the broken repo.ros2.org apt source to packages.ros.org/ros2.
74%
#3664 ROS plugins v2: respect source-subdir key snapcraft merged Merged PR #3664, with commit 09eb744e5, made ROS v2 Colcon/catkin plugins respect source-subdir, removed a redundant dependency, and added subdirectory tests.
73%
#3750 Add core22 colcon plugin / ros2-humble extension snapcraft merged Merged into main as commit 2013e0e18, adding the core22 colcon plugin and ros2-humble extension.
72%
#1805213 Support the new ros2 build tool colcon snapcraft (launchpad) closed Added and merged the beta colcon plugin for ROS 2 builds in snapcore/snapcraft#2456 (commit cd9516b56), resolving LP bug #1805213.
71%
#3097 colcon v2 plugin + ros2 extension snapcraft closed Closed unmerged and superseded by #3203, which added experimental ROS 2 Foxy support and the colcon v2 plugin in commit 88cc08fad.
71%