Skip to content
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

Make namespace parameter mandatory in LifecycleNode constructor #157

Merged
merged 8 commits into from
Jun 25, 2020

Conversation

ivanpauno
Copy link
Member

#153 introduced some regressions in nightlies:

https://ci.ros2.org/view/nightly/job/nightly_linux_release/1582/testReport/junit/(root)/projectroot/test_test_lifecycle_py/
https://ci.ros2.org/view/nightly/job/nightly_linux_release/1582/testReport/junit/lifecycle/TestLifecyclePubSub/test_talker_lifecycle/
https://ci.ros2.org/view/nightly/job/nightly_linux_release/1582/testReport/junit/lifecycle/TestLifecyclePubSubAfterShutdown/test_talker_graceful_shutdown/

The problem isn't #153 IMO.
The problem is that we were assuming that the node fqn name is known, even when we were not passing a __ns remapping rule (if the executable used a namespace different to / and a namespace wasn't being passed explicitly, LifecycleNode action was already broken).

There are two options:

  • Make namespace argument required.
  • Default to / (overriding whatever was specified in the executable).

I prefer the first option.
This is implementing the second option, as the first requires multiple PRs in other repos.

Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
@ivanpauno ivanpauno added bug Something isn't working in review labels Jun 23, 2020
@ivanpauno ivanpauno requested review from wjwwood and hidmic June 23, 2020 15:02
@ivanpauno ivanpauno self-assigned this Jun 23, 2020
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
sloretz added a commit to ros2/demos that referenced this pull request Jun 23, 2020
Fixes regression introduced by ros2/launch_ros#153 

Alternative to ros2/launch_ros#157
sloretz added a commit to ros2/demos that referenced this pull request Jun 23, 2020
Fixes regression introduced by ros2/launch_ros#153

Alternative to ros2/launch_ros#157

Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
@ivanpauno ivanpauno requested a review from sloretz June 23, 2020 20:15
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
@ivanpauno ivanpauno requested a review from sloretz June 23, 2020 21:39
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
@ivanpauno
Copy link
Member Author

@hidmic @sloretz @wjwwood friendly ping

Copy link
Contributor

@hidmic hidmic left a comment

Choose a reason for hiding this comment

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

LGTM pending green CI

Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
@ivanpauno
Copy link
Member Author

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@ivanpauno ivanpauno requested a review from hidmic June 25, 2020 13:08
@ivanpauno ivanpauno changed the title Fix namespace parameter in LifecycleNode Make namespace parameter mandatory in LifecycleNode Jun 25, 2020
@ivanpauno ivanpauno changed the title Make namespace parameter mandatory in LifecycleNode Make namespace parameter mandatory in LifecycleNode constructor Jun 25, 2020
@ivanpauno ivanpauno merged commit 5098bfd into master Jun 25, 2020
@delete-merged-branch delete-merged-branch bot deleted the ivanpauno/fix-lifecycle-node branch June 25, 2020 15:43
@ivanpauno
Copy link
Member Author

@sloretz @wjwwood let me know if there are any further comments about this change, and I will address them.

@wjwwood
Copy link
Member

wjwwood commented Jun 29, 2020

I looked it over just now. I think it was fine as-is.

jacobperron pushed a commit that referenced this pull request Sep 18, 2020
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
jacobperron added a commit that referenced this pull request Oct 5, 2020
* Fix no specified namespace (#153)

Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>

* Make namespace parameter mandatory in LifecycleNode constructor (#157)

Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>

* Make namespace argument optional

This maintains backwards compatibility.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Remove test for construction without namespace

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Treat empty namespace as unset

This keeps the current behavior in Foxy.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Address feedback and fix bug in LifecycleNode

If no namespace (or empty string) is provided, assume global namespace.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

Co-authored-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working in review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants