ros2 / ros2/ros2cli

:farmer: ros2cli_daemon tests failing in win rel because it can't spawn daemons

Open
#1,229 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
262
Forks
228
Avg merge
23h 15m
Merged PRs (30d)
12

Description

Generated by Generative AI

No response

Operating System:

Windows 11

ROS version or commit hash:

Rolling

RMW implementation (if applicable):

No response

RMW Configuration (if applicable):

No response

Client library (if applicable):

No response

'ros2 doctor --report' output

No response

Steps to reproduce issue
  1. Go to https://ci.ros2.org/job/nightly_win_rel
  2. Build a job
  3. See test failing
Expected behavior

Build without test regressions

Actual behavior

Building with lots of test regressions because assert spawn_daemon() isn't spawning the daemon

Additional information
Reference Builds
Failing tests

ros2cli.ros2cli.test.test_ros2cli_daemon.test_get_name
ros2cli.ros2cli.test.test_ros2cli_daemon.test_get_namespace
ros2cli.ros2cli.test.test_ros2cli_daemon.test_get_node_names_and_namespaces
ros2cli.ros2cli.test.test_ros2cli_daemon.test_get_node_names_and_namespaces_with_enclaves
ros2cli.ros2cli.test.test_ros2cli_daemon.test_get_topic_names_and_types
ros2cli.ros2cli.test.test_ros2cli_daemon.test_get_service_names_and_types
ros2cli.ros2cli.test.test_ros2cli_daemon.test_get_action_names_and_types
ros2cli.ros2cli.test.test_ros2cli_daemon.test_get_publisher_names_and_types_by_node
ros2cli.ros2cli.test.test_ros2cli_daemon.test_get_subscriber_names_and_types_by_node
ros2cli.ros2cli.test.test_ros2cli_daemon.test_get_service_names_and_types_by_node
ros2cli.ros2cli.test.test_ros2cli_daemon.test_get_client_names_and_types_by_node
ros2cli.ros2cli.test.test_ros2cli_daemon.test_get_action_server_names_and_types_by_node
ros2cli.ros2cli.test.test_ros2cli_daemon.test_get_action_client_names_and_types_by_node
ros2cli.ros2cli.test.test_ros2cli_daemon.test_get_publishers_info_by_topic
ros2cli.ros2cli.test.test_ros2cli_daemon.test_get_subscriptions_info_by_topic
ros2cli.ros2cli.test.test_ros2cli_daemon.test_get_clients_info_by_service
ros2cli.ros2cli.test.test_ros2cli_daemon.test_get_servers_info_by_service
ros2cli.ros2cli.test.test_ros2cli_daemon.test_count_publishers
ros2cli.ros2cli.test.test_ros2cli_daemon.test_count_subscribers
ros2cli.ros2cli.test.test_ros2cli_daemon.test_count_clients
ros2cli.ros2cli.test.test_ros2cli_daemon.test_count_services
ros2cli.ros2cli.test.test_strategy.test_with_daemon_running
ros2cli.ros2cli.test.test_strategy.test_with_daemon_spawn
ros2cli.ros2cli.test.test_strategy.test_enforce_no_daemon

Log Output
__________________ ERROR at setup of test_count_subscribers ___________________

test\test_ros2cli_daemon.py:134: in daemon_node

    assert spawn_daemon(args=[], timeout=5.0)

E   assert False

E    +  where False = spawn_daemon(args=[], timeout=5.0)

____________________ ERROR at setup of test_count_clients _____________________

test\test_ros2cli_daemon.py:134: in daemon_node

    assert spawn_daemon(args=[], timeout=5.0)

E   assert False

E    +  where False = spawn_daemon(args=[], timeout=5.0)

____________________ ERROR at setup of test_count_services ____________________

test\test_ros2cli_daemon.py:134: in daemon_node

    assert spawn_daemon(args=[], timeout=5.0)

E   assert False

E    +  where False = spawn_daemon(args=[], timeout=5.0)

_________________ ERROR at setup of test_with_daemon_running __________________

test\test_strategy.py:35: in enforce_daemon_is_running

    assert spawn_daemon(args=[], timeout=5.0)

E   assert False

E    +  where False = spawn_daemon(args=[], timeout=5.0)

__________________ ERROR at setup of test_enforce_no_daemon ___________________

test\test_strategy.py:35: in enforce_daemon_is_running

    assert spawn_daemon(args=[], timeout=5.0)

E   assert False

E    +  where False = spawn_daemon(args=[], timeout=5.0)

================================== FAILURES ===================================

___________________________ test_with_daemon_spawn ____________________________

test\test_strategy.py:54: in test_with_daemon_spawn

    assert node._daemon_node is not None

E   assert None is not None

E    +  where None = <ros2cli.node.strategy.NodeStrategy object at 0x0000023BB9ECB320>._daemon_node
Flakyness 15 days
job_name last_fail first_fail build_count failure_count failure_percentage
nightly_win_rel 2026-05-11 2026-05-02 4 3 75.0

The first time this error happened was in https://ci.ros2.org/job/nightly_win_rel/3783, comparing repos there is just one change in ros/ros_environment and doesn't seems related

CC: @Crola1702

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with test/test_ros2cli_daemon.py and test/test_strategy.py, focusing on the spawn_daemon(args=[], timeout=5.0) setup and the daemon-spawn strategy test. Reproduce the failure in the nightly_win_rel job or on Windows, then trace why the daemon is not created. Done means the listed ros2cli daemon and strategy tests pass without regressions on Windows.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.