Skip to content

De-flake servo and hybrid_planning launch fixtures (backport #3809) - #3871

Merged
nbbrooks merged 1 commit into
jazzyfrom
mergify/bp/jazzy/pr-3809
Oct 22, 2026
Merged

nbbrooks merged 1 commit into
jazzyfrom
mergify/bp/jazzy/pr-3809

Conversation

@mergify

@mergify mergify Bot commented Sep 25, 2026

Copy link
Copy Markdown

Description

Same fix as #3777, applied to the four remaining launch fixtures with the pattern.

Each launches its gtest node on a fixed TimerAction while controller spawners run in parallel. Under load the spawner hasn't finished activating the controller when the timer fires, so the test starts against a topic with no publisher and fails intermittently:

TimerAction(period=N, actions=[<gtest>])

Replaced with a gate on the last spawner exiting — spawner exits 0 only after the controller is active, so the gtest is guaranteed a live publisher:

RegisterEventHandler(OnProcessExit(target_action=<last_spawner>, on_exit=[<gtest>]))

Fixtures changed

file family
moveit_ros/moveit_servo/tests/launch/servo_ros_integration.test.py ServoRosFixture
moveit_ros/moveit_servo/tests/launch/servo_cpp_integration.test.py servo cpp integration
moveit_ros/moveit_servo/tests/launch/servo_utils.test.py servo utils
moveit_ros/hybrid_planning/test/launch/test_basic_integration.test.py hybrid_planning basic

Verified in a Resolute container: servo 4/4 iterations green, servo_utils 3/3, hybrid_planning 3/3. Each previously flaked at roughly the rate the trajectory_cache family did before #3777.

test_basic_integration.test.py additionally needed RegisterEventHandler and OnProcessExit imported — it calls them unqualified, unlike the servo fixtures which use launch.actions.RegisterEventHandler. Without the import the fixture raises NameError at launch.

Why this is worth landing

This family is currently costing signal on unrelated PRs. The rolling-ci + deprecation check and rolling-ci + ccov failures on #3807 were test_get_cartesian_path_request_features_with_move_group and test_motion_plan_request_features_with_move_group — same root cause, different fixture.

Deliberately not changed

These chain TimerActions across ros2_control and several spawners rather than gating on one terminal timer, so picking the right target_action needs a real reproducer of each family's failure mode:

  • moveit_ros/planning/planning_scene_monitor/test/launch/planning_scene_monitor.test.py
  • moveit_ros/tests/launch/move_group_api.test.py

Checklist

  • Required by CI: Code is auto formatted — launch-file only, pre-commit clean
  • Extend the tutorials / documentation — not applicable
  • Document API changes in MIGRATION.md — not applicable, test fixtures only
  • Create tests, which fail without this PR — these are the tests; the change makes existing ones deterministic
  • Include a screenshot if changing a GUI — not applicable

🤖 Generated with Claude Code


This is an automatic backport of pull request #3809 done by Mergify.

Same fix as #3777, applied to the four remaining fixtures with the pattern.

Each launched its gtest node on a fixed TimerAction while controller
spawners ran in parallel. Under load the spawner has not finished
activating the controller when the timer fires, so the test starts against
a topic with no publisher and fails intermittently:

  TimerAction(period=N, actions=[<gtest>])

Replaced with a gate on the last spawner exiting -- spawner exits 0 only
after the controller is active, so the gtest is guaranteed a live
publisher:

  RegisterEventHandler(OnProcessExit(target_action=<last_spawner>,
                                     on_exit=[<gtest>]))

Fixtures changed:

  moveit_ros/moveit_servo/tests/launch/servo_ros_integration.test.py
  moveit_ros/moveit_servo/tests/launch/servo_cpp_integration.test.py
  moveit_ros/moveit_servo/tests/launch/servo_utils.test.py
  moveit_ros/hybrid_planning/test/launch/test_basic_integration.test.py

Verified locally in the Resolute audit container before this change was
first written: servo 4/4 iterations green, servo_utils 3/3,
hybrid_planning 3/3. Previously each flaked at roughly the same rate as
the trajectory_cache family #3777 addressed.

test_basic_integration.test.py additionally needed RegisterEventHandler and
OnProcessExit imported -- it calls them unqualified, unlike the servo
fixtures which use launch.actions.RegisterEventHandler. Without the import
the fixture raises NameError at launch.

Not changed, because they chain TimerActions across ros2_control and
several spawners rather than gating on one terminal timer -- picking the
correct target_action needs a real reproducer of each family's failure:

  moveit_ros/planning/planning_scene_monitor/test/launch/planning_scene_monitor.test.py
  moveit_ros/tests/launch/move_group_api.test.py

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
(cherry picked from commit 40f3140)
@coderabbitai

coderabbitai Bot commented Sep 25, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: d9098d5f-e78a-455b-a17b-00df69f691bd

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@130s
130s requested a review from nbbrooks September 25, 2026 15:25
@codecov

codecov Bot commented Sep 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 46.26%. Comparing base (002f40e) to head (4a0e43d).

Additional details and impacted files
@@            Coverage Diff             @@
##            jazzy    #3871      +/-   ##
==========================================
+ Coverage   46.25%   46.26%   +0.01%     
==========================================
  Files         718      718              
  Lines       59188    59188              
  Branches     7598     7599       +1     
==========================================
+ Hits        27374    27376       +2     
+ Misses      31650    31647       -3     
- Partials      164      165       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@nbbrooks
nbbrooks merged commit 6854df5 into jazzy Oct 22, 2026
7 checks passed
@nbbrooks
nbbrooks deleted the mergify/bp/jazzy/pr-3809 branch October 22, 2026 23:13
@github-project-automation github-project-automation Bot moved this to ✅ Done in MoveIt Oct 22, 2026
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.

1 participant