Skip to content

Mutex: honour mutex_package.build_number; run_constraints optional - #169

Merged
traversaro merged 2 commits into
RoboStack:masterfrom
Tobias-Fischer:fix/mutex-build-number
Oct 10, 2026
Merged

traversaro merged 2 commits into
RoboStack:masterfrom
Tobias-Fischer:fix/mutex-build-number

Conversation

@Tobias-Fischer

@Tobias-Fischer Tobias-Fischer commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Publishing a new build of the mutex at the same version (mutex_package.build_number) didn't work. Two places used the distribution's build_number for the mutex instead of its own:

  1. Skip-existing check (main.py): a published mutex counted as already built when its build number matched the distribution's build_number. So no recipe was generated (Skipping ros2-distro-mutex).
  2. write_recipe (template.py): it overwrote every output's build number with the distribution's. The mutex recipe then had string: lyrical_28 but number: 27.

Fix:

  • A new expected_build_number() gives the mutex its own build number and leaves other packages unchanged (the distribution's, or pkg_additional_info.yaml's). The skip check now uses it.
  • write_recipe starts from the output's own build number before applying pkg_additional_info.yaml.

For a whole distribution (RoboStack lyrical, linux-64), the only recipe that changes is the mutex's: number: 27 → 28.

Tests: vinca/test_mutex_build_number.py covers the expected build numbers and the written mutex recipe. Without the template.py change, the recipe test fails. The full suite passes.

Also: run_constraints is optional. A mutex only has to keep one distribution per environment, so mutex_package no longer requires the key, and the recipe only lists run_constraints when there are any. RoboStack drops all mutex constraints: they applied to every user environment and made solvers fall back to old builds; wrong dependencies are fixed in the packages themselves.

Needed for RoboStack to publish the mutex again without run_constraints, at the same version, so that no other package needs a rebuild.

🤖 Generated with Claude Code

A new build of the mutex at the same version (mutex_package.build_number) was
never generated: the skip-existing check compared the published mutex with
the distribution's build_number, and write_recipe overwrote the recipe's
build number with it too (build string lyrical_28, number 27). Both now use
the mutex's own build number; other packages are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tobias-Fischer added a commit to Tobias-Fischer/robostack-distros that referenced this pull request Oct 9, 2026
Without it the new mutex builds are never generated (RoboStack/vinca#169).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tobias-Fischer added a commit to Tobias-Fischer/robostack-distros that referenced this pull request Oct 9, 2026
Without it the new mutex builds are never generated (RoboStack/vinca#169).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tobias-Fischer added a commit to Tobias-Fischer/robostack-distros that referenced this pull request Oct 10, 2026
Without it the new mutex builds are never generated (RoboStack/vinca#169).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A mutex only has to keep one distribution per environment; constraining other
packages from it is optional, so mutex_package no longer requires the key,
and the recipe lists run_constraints only when there are any.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Tobias-Fischer Tobias-Fischer changed the title Mutex: honour mutex_package.build_number Mutex: honour mutex_package.build_number; run_constraints optional Oct 10, 2026
Tobias-Fischer added a commit to Tobias-Fischer/robostack-distros that referenced this pull request Oct 10, 2026
* Drop the distro mutex's run_constraints

The mutex only keeps one ROS distribution per environment. Its run_constraints
applied to every user environment, also to libraries the user's packages
don't use, and made solvers silently fall back to old ROS builds when another
package needed a different version (ros-base + libprotobuf 6: jazzy resolved
to mutex 0.15 / rclcpp 28.1.18 instead of 0.19 / 28.1.22). Library versions
come from the packages' own dependencies; wrong metadata gets fixed in the
package (patch, pkg_additional_info.yaml, conda-forge repodata patch).

Checked by solving desktop + perception + ros_gz for every distribution on
linux-64, osx-arm64 and win-64 with and without them: humble and lyrical
resolve to identical environments, jazzy and rolling to newer
openvino/opencv/ffmpeg builds (jazzy's smoke-tested on osx-arm64: OpenCV,
cv_bridge, rclpy, talker/listener, gz).

- shared/vinca.yaml: run_constraints: [] with the policy; distros: removed,
  and a new mutex build at the same version (mutex_package.build_number)
- rs check / tools/tests: reject mutex run_constraints
- pinning bot: no more mutex constraint sync or mutex rebuild
- pixi run test: first unit tests of the tooling, run in PR CI

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Pin vinca f9d68bb: the mutex keeps its own build number

Without it the new mutex builds are never generated (RoboStack/vinca#169).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Mutex: no run_constraints key at all (vinca cf6833a makes it optional)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@traversaro
traversaro merged commit c58a859 into RoboStack:master Oct 10, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants