-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Load composable nodes in sequence #315
Conversation
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
The other alternatives is to test that mock_component_container.requests
contains both expected requests, regardless of order.
Though this seems fine to me.
Rpr failures seem unrelated, @sloretz could you double check them? |
The same 3 test failures happened in another PR job too, so they're probably unrelated. https://build.ros2.org/job/Rpr__launch_ros__ubuntu_jammy_amd64/24/#showFailuresLink |
@sloretz Should we backport this to the |
@Mergifyio backport humble |
* Load composable nodes in sequence Signed-off-by: Shane Loretz <sloretz@osrfoundation.org> * Undo whitespace change Signed-off-by: Shane Loretz <sloretz@osrfoundation.org> (cherry picked from commit 7fa69bc)
✅ Backports have been created
|
* Load composable nodes in sequence Signed-off-by: Shane Loretz <sloretz@osrfoundation.org> * Undo whitespace change Signed-off-by: Shane Loretz <sloretz@osrfoundation.org> Signed-off-by: Keng12 <k.chaig1@gmail.com>
* Load composable nodes in sequence Signed-off-by: Shane Loretz <sloretz@osrfoundation.org> * Undo whitespace change Signed-off-by: Shane Loretz <sloretz@osrfoundation.org> (cherry picked from commit 7fa69bc) Co-authored-by: Shane Loretz <sloretz@osrfoundation.org>
Fixes #312
Each
_load_composable_node
function creates its ownLoadComposableNodes
action. When there are multipleLoadComposableNodes
actions it appears possible for them to load the nodes in a different order from the launch description.I think this is happening because the actual loading is passed to asyncio's
run_in_executor()
' method. The docs say this uses aconcurrent.futures.ThreadPoolExecutor
, so the order nodes get loaded depends on the scheduling of the threads in the executor.This PR fixes the test by loading both composable nodes in the same
LoadComposableNodes
action. This works because it explicitly loads the composable nodes in sequence.