Skip to content

Rust bump to >= 1.75 affects downstream ros2param test #951

@christophebedard

Description

@christophebedard

Generated by Generative AI

No response

Operating System:

Ubuntu 24.04

ROS version or commit hash:

Rolling

RMW implementation (if applicable):

rmw_zenoh

RMW Configuration (if applicable):

No response

Client library (if applicable):

No response

'ros2 doctor --report' output

ros2 doctor --report
<COPY OUTPUT HERE>

Steps to reproduce issue

  1. Make sure ros2/rmw_zenoh is freshly pulled to include Build against rust >= 1.75 for ROS Lyrical #945
  2. Testros2param

Expected behavior

Tests pass

Actual behavior

test_verb_load.TestVerbLoad.test_verb_load_wildcard[rmw_zenoh_cpp] fails:

FAIL: test_verb_load.TestVerbLoad.test_verb_load_wildcard[rmw_zenoh_cpp]
------------------------------------------------------------------------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/christophe.bedard/ros/ros2_ws/src/ros2/ros2cli/ros2param/test/test_verb_load.py", line 368, in test_verb_load_wildcard
    loaded_params = yaml.safe_load(param_dump_command.output)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/yaml/__init__.py", line 125, in safe_load
    return load(stream, SafeLoader)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/yaml/__init__.py", line 79, in load
    loader = Loader(stream)
             ^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/yaml/loader.py", line 34, in __init__
    Reader.__init__(self, stream)
  File "/usr/lib/python3/dist-packages/yaml/reader.py", line 74, in __init__
    self.check_printable(stream)
  File "/usr/lib/python3/dist-packages/yaml/reader.py", line 143, in check_printable
    raise ReaderError(self.name, position, ord(character),
yaml.reader.ReaderError: unacceptable character #x001b: special characters are not allowed
  in "<unicode string>", position 476

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/christophe.bedard/ros/ros2_ws/src/ros2/ros2cli/ros2param/test/test_verb_load.py", line 373, in test_verb_load_wildcard
    self.fail(f'Failed to parse YAML output: {e}')
AssertionError: Failed to parse YAML output: unacceptable character #x001b: special characters are not allowed
  in "<unicode string>", position 476

Additional information

I don't see the test failure in the nightlies, but it happened in all Linux CI jobs for #945 (see #945 (comment)) yesterday before it was merged ~11 hours ago. The Rust bump may have included a logging behaviour change that makes an ANSI color escape code (\x1b = ESC character) leak from Zenoh's Rust logging into the captured command output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions