rclpy icon indicating copy to clipboard operation
rclpy copied to clipboard

Fix Time and Duration raising exception when compared to another type

Open suurjaak opened this issue 3 years ago • 1 comments

Fixes #952.

Ought to be back-ported to Galactic and Foxy as well.

suurjaak avatar Sep 09 '22 16:09 suurjaak

Note, original issue detected on Foxy, we need to backport all supported ROS 2 distribution (humble, galactic and foxy)

fujitatomoya avatar Oct 17 '22 00:10 fujitatomoya

@fujitatomoya @sloretz ping on this?

suurjaak avatar Feb 22 '23 07:02 suurjaak

Note, original issue detected on Foxy, we need to backport all supported ROS 2 distribution (humble, galactic and foxy)

I don't think we should backport this. This is a behavior change, and I don't think we should do that in the already released distributions. For rolling, this is fine.

clalancette avatar Mar 14 '23 14:03 clalancette

CI:

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

clalancette avatar Mar 14 '23 14:03 clalancette

This is a behavior change, and I don't think we should do that in the already released distributions.

I would say that this is a bugfix, and as such ought to be ported to distros being supported.

suurjaak avatar Mar 14 '23 17:03 suurjaak

I would say that this is a bugfix, and as such ought to be ported to distros being supported.

But it is a potentially major behavior change, and has the ability to break things that already work. A good indication that this is the case is the fact that we needed to change tests to deal with this.

This is OK for Rolling (and distros going forward), it is not acceptable for already released distributions. So I am still not in favor of backporting this.

clalancette avatar Mar 14 '23 17:03 clalancette

@suurjaak sorry i was not thinking clearly before, but i am with @clalancette on this. this behavior change might break the ROS 2 user space. I consider that would be much bigger problem.

fujitatomoya avatar Mar 14 '23 18:03 fujitatomoya

But it is a potentially major behavior change, and has the ability to break things that already work.

You're not wrong in that it may break somebody's code. Very unlikely, though, and would not call it a major change. I'd assume nobody has stumbled over this before, evidenced by the fact that the code has been like this from the very beginning, 4 years and counting, without anybody making noise about the wrongful behavior.

But I think bugfixes are backported, in general? That a bugfix involves behavioral changes, is its very reason for existence :)

I do see your point, though, in that this changes the contract of the Time/Duration API. Although that contract was never declared in documentation.

suurjaak avatar Mar 14 '23 18:03 suurjaak

IMO, i totally understand your point. this kind of policy should be simple as much as possible, once we have exception that will be hard to keep afterwards. So i am still not positive to backport this.

fujitatomoya avatar Mar 14 '23 18:03 fujitatomoya

Well, regardless of which version this gets ported to, how about getting this merged?

suurjaak avatar Mar 29 '23 16:03 suurjaak

@suurjaak thanks for the contribution, the issue has been also closed accordingly.

fujitatomoya avatar Mar 29 '23 18:03 fujitatomoya

@suurjaak @fujitatomoya Would one of you be willing to open a PR to https://github.com/ros2/ros2_documentation/blob/rolling/source/Releases/Release-Iron-Irwini.rst mentioning this change in behavior?

clalancette avatar Mar 29 '23 18:03 clalancette

@clalancette I can do the release note PR as well.

suurjaak avatar Mar 30 '23 08:03 suurjaak

@clalancette I can do the release note PR as well.

Thank you, it is much appreciated!

clalancette avatar Mar 30 '23 11:03 clalancette