Repository navigation
fix: stop the workspace template from enabling coverage builds - #64
Merged
Merged
Conversation
The shipped colcon-defaults.yaml turned on coverage-gcc and coverage-pytest for every build. coverage-pytest sets AMENT_CMAKE_PYTEST_WITH_COVERAGE, and the MoveIt Pro runtime image does not include pytest-cov, so every ament_add_pytest_test call warned at configure time. coverage-gcc instrumented every library and Behavior plugin, which slows builds and can slow multithreaded code at runtime. Drop both mixins to match the defaults MoveIt Pro itself installs for the runtime user, document how to opt back in, and add a pre-commit hook that rejects coverage mixins in the template. Also COPY the defaults file with --chown so it belongs to the workspace user regardless of the host checkout's mode, including runs that skip the entrypoint's home directory chown. Same change as PickNikRobotics/moveit_pro_example_ws for v10.2. Refs PickNikRobotics/moveit_pro#23957
picknik-johnny-5-bot
Bot
force-pushed
the
fix/23957-pytest-cov-warnings
branch
from
November 2, 2026 22:17
f2b472a to
80289d4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[written by AI]
Refs PickNikRobotics/moveit_pro#23957
Motivation
Same fix as PickNikRobotics#1141. The template
colcon-defaults.yamlenablescoverage-gccandcoverage-pytest. The MoveIt Pro image has no pytest-cov, so everyament_add_pytest_testwarns'pytest-cov' was not found, and every library is built with gcov instrumentation. MoveIt Pro's own user defaults and the 10.2.0 release notes already have coverage off by default.Summary
COLCON_DEFAULTS_FILE.no-coverage-mixinspre-commit hook.COPY --chownthe defaults file to the workspace user.Existing build directories keep the cached coverage flags. Rebuild once with
--cmake-clean-cache, or deletebuild/,install/andlog/.Validation
10.2.0-rc5runtime image, using this repo's old and new defaults on an example_ws package: pytest-cov warnings went from 4 to 0, andcolcon testpassed 16/16 both times.pre-commit run -aandhadolintpass. The new hook rejects the original file.git diff --check origin/main...HEAD