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

Removes erroneous unmatched closing parenthesis #125

Merged
merged 5 commits into from
Feb 10, 2022

Conversation

spiderkeys
Copy link
Contributor

Addresses: #124

Copy link
Contributor

@clalancette clalancette left a comment

Choose a reason for hiding this comment

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

This fix is clearly correct, so thanks for that.

It's clear that we aren't testing this functionality at all. Can you please add a test for this? I'll suggest adding a new message in the msg subdirectory here, and then adding in a new test into test/test_interfaces.py.

@spiderkeys
Copy link
Contributor Author

Will do 👍

@spiderkeys
Copy link
Contributor Author

@clalancette I've added some types (both .idl and .msg) that include a comprehensive set of built-in types, arrays, and sequences, as well as some basic test cases.

In doing so, I came across one additional error for char array types. See: e925bb3

Let me know if this is what you had in mind. Happy to make any changes.

Copy link
Contributor

@clalancette clalancette left a comment

Choose a reason for hiding this comment

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

This was exactly the kind of thing I had in mind, so thanks for that.

However, I'm now actually a bit confused on what is going on here. Take your new BuiltinTypesMsg.msg message. That tests all of the basic types and the array versions of the basic types. But shouldn't that already have been done via the BasicTypes and Array message in test_interfaces.py? That is, it seems like a lot of this is duplicating tests that are already there. But clearly that isn't the case since this bug exists. Do you have any thoughts on what is going on here?

@clalancette clalancette added the more-information-needed Further information is required label Feb 25, 2021
@clalancette clalancette self-assigned this Feb 25, 2021
@sloretz
Copy link
Contributor

sloretz commented Feb 2, 2022

That is, it seems like a lot of this is duplicating tests that are already there. But clearly that isn't the case since this bug exists. Do you have any thoughts on what is going on here?

@clalancette I think the difference is this adds a test for char[2] char_array to a message, which isn't currently covererd by test_interface_files. The rest of the fields added in tests in this PR may or may not be duplicating existing tests.

https://github.com/ros2/rosidl_python/pull/125/files#diff-4c54c46da9bed05c8c28519d8a90efacd5ac1bb2590c04b13aba8d893cfd7237R18-R33

@spiderkeys
Copy link
Contributor Author

Sorry, I kind of forgot about this PR.

As both @sloretz and @clalancette mention, there are likely a number of duplicate test cases - when I originally put this together, my thought process was to very explicitly capture most if not all basic permutations of the builtin types defined by the IDL spec. The proper way to remove the duplication is likely to move my Builtin* type files or a subset of their contents over to the test_interface_files repo so they all live in one place.

https://github.com/ros2/test_interface_files

I don't have much time in the next week or two to tackle this, but if you agree with the above change and someone could make the appropriate changes in test_interface_files, I could cut that aspect out of this PR so the fix can make its way in.

@clalancette
Copy link
Contributor

@clalancette I think the difference is this adds a test for char[2] char_array to a message, which isn't currently covererd by test_interface_files. The rest of the fields added in tests in this PR may or may not be duplicating existing tests.

@sloretz Ah, thanks so much for pointing that out. That was exactly what I was missing.

As both @sloretz and @clalancette mention, there are likely a number of duplicate test cases - when I originally put this together, my thought process was to very explicitly capture most if not all basic permutations of the builtin types defined by the IDL spec.

@spiderkeys Yeah, understood. I think I got bogged down in adding so many test cases, and they seemed like duplicated. What I've done here now is to rebase this onto the latest, and then removed all of the test cases except for the one failure in b5ce601. With that, I think this is easier to review and understand. I'm happy with this now, so I'm going to go ahead and approve, but I'd appreciate a look from you just to make sure you agree with the direction here.

@clalancette
Copy link
Contributor

@spiderkeys Oh, also if you could go in here and rebase to add Signed-off-by tags to every commit, that will make the DCO bot happy. Thanks.

@spiderkeys
Copy link
Contributor Author

@clalancette I think I've just performed the rebase correctly to amend with signoffs, but let me know if something doesn't look right.

spiderkeys and others added 5 commits February 10, 2022 13:29
Signed-off-by: Charles Cross <charles@missionrobotics.us>
Signed-off-by: Charles Cross <charles@missionrobotics.us>
Signed-off-by: Charles Cross <charles@missionrobotics.us>
Signed-off-by: Charles Cross <charles@missionrobotics.us>
Only add in the test that this particular bug fixes.  While
this is much less comprehensive than before, I think it will
allow us to move forward here.

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
@clalancette
Copy link
Contributor

@clalancette I think I've just performed the rebase correctly to amend with signoffs, but let me know if something doesn't look right.

The signoffs look good, thanks.

I ended up rebasing it again to have it based off of master. With that, this looks good to me so I'll run CI on it next.

@clalancette
Copy link
Contributor

CI:

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

@clalancette clalancette removed the more-information-needed Further information is required label Feb 10, 2022
@clalancette
Copy link
Contributor

All of the failures on Windows are known (and most of them should actually be fixed by now). So I'm going to go ahead and merge this; thanks again for the contribution!

@flynneva
Copy link

@clalancette following up on this topic - has this bug-fix been backported to other ros2 distros as well? Would you be willing to take PR's to backport it? Would be great to get this fixed in all distros rather than just rolling...especially with the transition to jammy coming up soon I think.

@clalancette
Copy link
Contributor

@clalancette following up on this topic - has this bug-fix been backported to other ros2 distros as well? Would you be willing to take PR's to backport it? Would be great to get this fixed in all distros rather than just rolling...especially with the transition to jammy coming up soon I think.

The transition to Jammy (and Humble) is done now. In terms of this being backported, no, we haven't done it yet. I'll kick it off to see if the bot can do it.

@clalancette
Copy link
Contributor

@Mergifyio backport foxy galactic

mergify bot pushed a commit that referenced this pull request Apr 22, 2022
* Removes erroneous unmatched closing parenthesis

Signed-off-by: Charles Cross <charles@missionrobotics.us>
Co-authored-by: Chris Lalancette <clalancette@openrobotics.org>
(cherry picked from commit 4acc8fc)
mergify bot pushed a commit that referenced this pull request Apr 22, 2022
* Removes erroneous unmatched closing parenthesis

Signed-off-by: Charles Cross <charles@missionrobotics.us>
Co-authored-by: Chris Lalancette <clalancette@openrobotics.org>
(cherry picked from commit 4acc8fc)
@mergify
Copy link

mergify bot commented Apr 22, 2022

backport foxy galactic

✅ Backports have been created

clalancette pushed a commit that referenced this pull request Apr 22, 2022
* Removes erroneous unmatched closing parenthesis

Signed-off-by: Charles Cross <charles@missionrobotics.us>
Co-authored-by: Chris Lalancette <clalancette@openrobotics.org>
(cherry picked from commit 4acc8fc)
clalancette pushed a commit that referenced this pull request Apr 22, 2022
* Removes erroneous unmatched closing parenthesis

Signed-off-by: Charles Cross <charles@missionrobotics.us>
Co-authored-by: Chris Lalancette <clalancette@openrobotics.org>
(cherry picked from commit 4acc8fc)
clalancette pushed a commit that referenced this pull request Apr 28, 2022
* Removes erroneous unmatched closing parenthesis

Signed-off-by: Charles Cross <charles@missionrobotics.us>
Co-authored-by: Chris Lalancette <clalancette@openrobotics.org>
(cherry picked from commit 4acc8fc)

Co-authored-by: Charles Cross <charles@missionrobotics.us>
clalancette pushed a commit that referenced this pull request Apr 28, 2022
* Removes erroneous unmatched closing parenthesis

Signed-off-by: Charles Cross <charles@missionrobotics.us>
Co-authored-by: Chris Lalancette <clalancette@openrobotics.org>
(cherry picked from commit 4acc8fc)

Co-authored-by: Charles Cross <charles@missionrobotics.us>
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.

None yet

4 participants