Skip to content

Conversation

@mjcarroll
Copy link
Member

Replaces #999

Signed-off-by: Florencia <49619072+florcabral@users.noreply.github.com>
Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai>
@mjcarroll mjcarroll self-assigned this Apr 3, 2025
@mjcarroll mjcarroll requested a review from ahcorde April 3, 2025 13:59
ahcorde and others added 2 commits April 3, 2025 14:05
Signed-off-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>
Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai>
@ahcorde
Copy link
Contributor

ahcorde commented Apr 3, 2025

Pulls: #1001
Gist: https://gist.githubusercontent.com/ahcorde/418d81fdef70ee2209e3fd6c7d23ab9e/raw/5366d57a0db798da244c1205658c21f84aa69ae2/ros2.repos
BUILD args: --packages-above-and-dependencies ros2topic
TEST args: --packages-above ros2topic
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/15571

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

Signed-off-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>
@ahcorde ahcorde mentioned this pull request Apr 3, 2025
Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai>
…o mjcarroll/reapply_cve_patch

Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai>
@mjcarroll mjcarroll force-pushed the mjcarroll/reapply_cve_patch branch from 9a17d3e to 0240e86 Compare April 4, 2025 19:13
@mjcarroll
Copy link
Member Author

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@florcabral
Copy link
Contributor

Hi @mjcarroll. I noticed there was a CI issue when merging this CVE patch. Any help needed?

@mjcarroll
Copy link
Member Author

Hey @florcabral if you wouldn't mind taking a look at the CI issues here, I didn't catch them in my local testing before merging.

@florcabral
Copy link
Contributor

florcabral commented May 17, 2025

@mjcarroll Trying to drill down into the actual tests that failed after this patch - am I looking at the right build log here? If so, for ros2topic I see some failures related to tests for the echo verb, but the patch only affected the hz verb, plus some linter issues. I am not seeing any failing tests related to the patch itself. Have you looked into this yourself? Maybe I'm missing something.

@mjcarroll

This comment was marked as outdated.

@mjcarroll
Copy link
Member Author

Pulls: #1001
Gist: https://gist.githubusercontent.com/mjcarroll/bc4c882cb2e32c4f4fe313f12076b61d/raw/5366d57a0db798da244c1205658c21f84aa69ae2/ros2.repos
BUILD args: --packages-up-to ros2topic
TEST args: --packages-select ros2topic
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/16047

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@mjcarroll
Copy link
Member Author

@ahcorde
Copy link
Contributor

ahcorde commented Oct 6, 2025

Pulls: #1001
Gist: https://gist.githubusercontent.com/ahcorde/0a289b20c1051c4fbc33dad3293c0bc3/raw/fef082edf7944539f8bb3200e713c318928b13dd/ros2.repos
BUILD args: --packages-above-and-dependencies ros2topic
TEST args: --packages-above ros2topic
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/17223

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@ahcorde
Copy link
Contributor

ahcorde commented Oct 7, 2025

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@ahcorde
Copy link
Contributor

ahcorde commented Oct 7, 2025

@ros-pull-request-builder retest this please

@christophebedard
Copy link
Member

IIRC, there was something wrong with this implementation.

@christophebedard
Copy link
Member

Also, it severely limits Python expression-based filtering: #1003 (comment)

Comment on lines +78 to +79
print(self.model.attributes)
print(node)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
print(self.model.attributes)
print(node)

@florcabral
Copy link
Contributor

Hello,
Coming back to this discussion: I tried to reproduce locally the tests reported to fail due to these changes, specifically these 2:

test_cli/test_cli/ test_cli.TestROS2TopicCLI.test_filtered_topic_hz[rmw_fastrtps_cpp] failed 

test_cli.TestROS2TopicCLI.test_filtered_topic_hz[rmw_zenoh_cpp] failed

I found that ros2topic/eval/__init__.py was printing internal evaluator state every time a filter expression was evaluated due to print statements left in ros2topic/ros2topic/eval/__init__.py. These looked like:

['capitalize', 'casefold', ..., 'data']
<ast.Attribute object at 0x7f...>

These warnings go to stdout, so the launch_testing output checks fail because the expected pattern (ie average rate: ... lines) in tests such as test_filtered_topic_hz expect exact output, so the extra lines caused failures like:

AssertionError: Output does not match:
['capitalize', ..., 'data']
<ast.Attribute ...>
average rate: 0.500

Removing those debug prints should restore the expected behavior. The failures seemed to come from the unexpected stdout pollution, not from the filter logic itself.

As for the evaluation of data msg type, reported on the jazzy PR, I also couldn't reproduce that test failure for this branch, and manual local tests seem to show the filtering logic isn't blocking stuff like m.data.<...>:

# ros2 topic hz /test --filter "int(m.data.partition(':')[-1]) % 2 == 0"
average rate: 1.000
...

If you accept my recent suggestion on ros2topic/ros2topic/eval/__init__.py we should at least get cleaner, easier to validate tests.

Could we run your CI to see exactly what is blocking this PR at this stage?

Thanks!

@florcabral
Copy link
Contributor

@christophebedard Any feedback to my last update? Thanks.

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.

5 participants