ros2 / launch

Tools for launching multiple processes and for writing tests involving multiple processes.
Apache License 2.0
126 stars 141 forks source link

[launch_testing] remove deprecated `ready_fn` feature #589

Closed wjwwood closed 2 years ago

wjwwood commented 2 years ago

This feature was deprecated in https://github.com/ros2/launch/pull/346 (foxy) and should be removed by now, so we'll do it in Humble.

We realized this due to this pr (thanks for that btw): https://github.com/ros2/launch/pull/580

I'm opening in draft because I quickly did this in the browser and I'm not sure if the related ReadyAggregator class needs to be removed. So I'll let CI run first.

CI is good, but I'm still not sure about the ReadyAggregator class, looking for input on that.

wjwwood commented 2 years ago

Preliminary CI:

adityapande-1995 commented 2 years ago

Should this line be removed as well ? https://github.com/ros2/launch/blob/73fa05efa142da20a704aea4003e61d08e99e728/launch_testing/launch_testing/test_runner.py#L74

wjwwood commented 2 years ago

The short answer is: "I don't know"

I looked at that line, but I couldn't figure out if it is part of the test runner machinery that is unfortunately named the same as the old feature users would use, or not. That's why I ran CI, I figured that if it was the old feature I'm removing some tests should fail, but maybe that's not the case.

I also sort of traced the logic and I believe that it is still used, but the difference is that the ready_fn is passed to the wrapper and not the launch_description_fn, as it used to be.

Maybe someone more familiar with launch_testing like @ivanpauno or @hidmic could comment on it.

hidmic commented 2 years ago

Should this line be removed as well ?

@adityapande-1995 @wjwwood It shouldn't. That's the actual callable that the ReadyToTest action eventually invokes.

I looked at that line, but I couldn't figure out if it is part of the test runner machinery that is unfortunately named the same as the old feature users would use, or not.

TBH this whole thing is messy.

wjwwood commented 2 years ago

CI:

hidmic commented 2 years ago

@wjwwood linters were still failing in that last CI.

wjwwood commented 2 years ago

New CI: