Skip to content

Add additional interfaces for testing ros2interface's show command without dependencies#11

Closed
audrow wants to merge 3 commits intomasterfrom
audrow/remove-depend-on-builtin-interface
Closed

Add additional interfaces for testing ros2interface's show command without dependencies#11
audrow wants to merge 3 commits intomasterfrom
audrow/remove-depend-on-builtin-interface

Conversation

@audrow
Copy link
Copy Markdown
Member

@audrow audrow commented Jun 30, 2020

Part of the fix for ros2/ros2cli#541.

@audrow audrow force-pushed the audrow/remove-depend-on-builtin-interface branch 3 times, most recently from 5bd4f1c to bc0e1d0 Compare June 30, 2020 23:11
audrow added 3 commits June 30, 2020 16:14
Signed-off-by: Audrow <audrow.nash@gmail.com>
Signed-off-by: Audrow <audrow.nash@gmail.com>
Signed-off-by: Audrow <audrow.nash@gmail.com>
@audrow audrow force-pushed the audrow/remove-depend-on-builtin-interface branch from bc0e1d0 to 139ab82 Compare June 30, 2020 23:14
@audrow audrow marked this pull request as ready for review July 2, 2020 21:01
@dirk-thomas
Copy link
Copy Markdown
Member

dirk-thomas commented Jul 6, 2020

Does this change actually pass building and testing of downstream packages which was a concern raised before (ros2/ros2cli#540 (comment))?

@audrow
Copy link
Copy Markdown
Member Author

audrow commented Jul 6, 2020

I assume so because I've only created new interfaces in this PR; I haven't modified any existing interfaces.

I can check to make sure. What would be the best way to check in CI? On, say, just ci_linux for now, build everything and then run tests on all packages above test_msgs?

@dirk-thomas
Copy link
Copy Markdown
Member

What would be the best way to check in CI? On, say, just ci_linux for now, build everything and then run tests on all packages above test_msgs?

https://colcon.readthedocs.io/en/released/user/how-to.html#test-selected-packages-as-well-as-their-dependents

@audrow
Copy link
Copy Markdown
Member Author

audrow commented Jul 6, 2020

These changes cause tests in downstream packages to fail: Build Status

I can close this PR without merging and make a new package in ros2cli with these interface definitions to avoid breaking tests downstream of test_msgs. Or is there a better way to proceed?

@dirk-thomas
Copy link
Copy Markdown
Member

Could you use the existing message definitions? Potentially adding comments to them where you want to test for those?

@audrow
Copy link
Copy Markdown
Member Author

audrow commented Jul 7, 2020

I could add comments to existing message files. It depends on if we think the following are good trade-offs.

The tests will not be very concise. For example, to test multiple layers of nesting, test_msgs/msg/MultiNested seems to be the only existing option in test_msgs and its output is 667 lines with all comments included. This is the most extreme example, but test_msgs/srv/Arrays, which is probably the best choice to test services, is 141 lines.

Also, the tests won't be as thorough in testing services and actions. For services, test_msgs/srv/Arrays seems to be the best available choice, but it won't support me testing multiple nestings. For actions, the only interface definition that doesn't use builtin_interfaces is test_msgs/action/Fibonacci which won't allow me to test nesting or constants. Perhaps, we can assume that because these are done correctly on messages definitions that they will be done on actions.

@dirk-thomas
Copy link
Copy Markdown
Member

I would think either of the two options (use existing interfaces with added comments or creating a separate package for concise interfaces) is preferred over adding interfaces to test_msgs and having to work around them in downstream packages.

@audrow
Copy link
Copy Markdown
Member Author

audrow commented Jul 7, 2020

I agree. I'll take one of the other approaches. I'm favoring making a separate package with concise interfaces as the tests can be more thorough.

@audrow audrow closed this Jul 7, 2020
@audrow
Copy link
Copy Markdown
Member Author

audrow commented Jul 7, 2020

I created a new package in ros2cli with the concise interface definitions and updated the tests here: ros2/ros2cli#547.

@audrow audrow deleted the audrow/remove-depend-on-builtin-interface branch July 7, 2020 18:58
@sloretz
Copy link
Copy Markdown
Contributor

sloretz commented Jul 13, 2020

These changes cause tests in downstream packages to fail

I can close this PR without merging and make a new package in ros2cli with these interface definitions to avoid breaking tests downstream of test_msgs. Or is there a better way to proceed?

I would think either of the two options (use existing interfaces with added comments or creating a separate package for concise interfaces) is preferred over adding interfaces to test_msgs and having to work around them in downstream packages.

If I understand correctly it looks like it's just test_communication tests that are failing. It looks like test_communication is creating tests for all interface files in test_msgs, but the executable it's using to do those tests has a hard coded list of interface files it supports. A quick fix would be to hard code the interface files in test_communication's CMakeLists.txt to match the hard coding in the executable, but I would recommend adding support for the new interface files in the test executables in test_communication instead.

I like doing this instead of creating a separate package because we might not want to release a separate package. Depending on the repo it's added to (it looks like ros2/ros2cli#547 adds it to ros2/ros2cli) that means having to remember to update the package blacklist in the release repo when a new ROS distro is created.

@audrow audrow restored the audrow/remove-depend-on-builtin-interface branch July 16, 2020 21:03
@audrow
Copy link
Copy Markdown
Member Author

audrow commented Jul 16, 2020

Reopening to continue the discussion.

@audrow audrow reopened this Jul 16, 2020
@audrow audrow self-assigned this Jul 17, 2020
@audrow
Copy link
Copy Markdown
Member Author

audrow commented Aug 10, 2020

This set of PRs seems to pass CI without breaking downstream packages. I'll run the rest of CI once these PRs are reviewed.
Build Status

@audrow audrow requested a review from tfoote August 18, 2020 18:46
@jacobperron
Copy link
Copy Markdown
Member

One downside of adding new messages to test in test_communication is that is can drastically increase CI duration (at least it did historically) since it adds another message to test pub/sub with for each RMW.

Originally, I had thought we'd create a separate package with test messages for ros2interface specifically. Since it's primary purpose is to work with generated interfaces, it seems reasonable to me to have it's own test message package. A separate package would give us an isolated place to add/modify test messages without interfering with the more general test_msgs. I think there is a high likelihood of adding new messages beyond this PR, for testing future features and bug fixes in ros2interface.

@audrow
Copy link
Copy Markdown
Member Author

audrow commented Jan 20, 2021

Closed in favor of ros2/ros2cli#579.

@audrow audrow closed this Jan 20, 2021
@audrow audrow deleted the audrow/remove-depend-on-builtin-interface branch January 20, 2021 23:19
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.

4 participants