-
Notifications
You must be signed in to change notification settings - Fork 159
Complete #506 backport and deprecate signal_management APIs #511
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
Complete #506 backport and deprecate signal_management APIs #511
Conversation
Unix asyncio loops override existing signal wakeup file descriptors with no regards for existing ones -- set by user code or by another loop Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
… a socket.socket() works (#494) 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>
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
|
@jacobperron this is what the change to Foxy would look like. Unit tests pass locally, though I have not run full Foxy CI just yet. |
|
@hidmic I could not find any docs on how to install this locally while overriding the stuff installed via apt. Do I simply clone and |
The simplest approach is probably to build an overlay workspace with |
|
Okay, I managed to install it in a more hacky way but it worked. The PR seems the fix the issue, everything seems to work fine when I issue a SIGINT via |
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
|
Full Foxy CI after 4b7e29b: |
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
|
Since this is soon coming to an end thanks to @hidmic, shouldn't this be added to Foxy Patch Release 5? |
jacobperron
left a comment
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.
Looks okay to me; one concern about the deprecation warnings.
| Use AsyncSafeSignalManager instead | ||
| """ | ||
| warnings.warn( |
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.
I'd rather not release deprecation warnings into a long-standing ROS distro to avoid disruption. Besides, users who have already switched to Galactic would have already run into the API change without a tick-tock cycle. There may be other opinions.
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.
I can only give one user's opinion (mine/my team's): I'd like to get warned of breakages as soon a possible. We'd have to change it eventually in any way since we move over to newer versions of ROS2 eventually (LTS -> LTS). And if not, a warnings.simplefilter() ist easy to implement if one does not want to see the message for the time being.
But you know best what's common practice in ROS. This isn't Rolling Ridley, after all.
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.
I have to agree with @jacobperron ; I don't think we should introduce new deprecation warnings into a stable distribution. Having new warnings show up for Foxy users as a result of sudo apt-get update is really user-unfriendly.
When people port to Galactic or Rolling, they'll get the warnings.
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.
Alright, see d8e320a.
However I will say that, while I agree that introducing warnings into a patch release of a stable distribution is not ideal, this patch is not transparent. Signals now go through wakeup file descriptors and handling is deferred to the main-thread local asyncio loop (assuming it is run). Depending on how the old signal management API was used (the only case in which you'd get a warning) this can potentially break those use cases -- silently as of d8e320a.
Which is why I didn't even think of backporting anything, and I probably wouldn't if these bits were not kinda broken in Foxy.
When people port to Galactic or Rolling, they'll get the warnings.
The old API was completely removed in Galactic, so no warnings (there's no way to re-implement it in terms of the new API so as to be functionally equivalent, as exposed above). This patch is a retrofit of the original patch.
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.
I didn't fully comprehend the nature of the change. If there's a risk that we're breaking somebody, then I think issuing a warning is a good thing. I don't like the idea of releasing breaking changes in Foxy, but if you think the fix is worth the potential churn then I'd rather be very loud about it.
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.
So, without this fix, launch hangs every now and then. It's the same we've experienced with ros2cli tests before. And it hit @felixdivo, so it may hit others too.
I agree about being loud. I thought a warning would be OK, but perhaps it's too loud. @clalancette ?
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.
It seems like we are stuck between a rock and a hard place. While I don't like introducing new warnings into a stable distribution, silently breaking users isn't good either.
In this case, I'll defer to your best judgement on what to do here. You obviously have a much better handle on the issue and launch in general than I do.
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.
Presumably, the these signal APIs are not very popular so I'd hope the number of affected users would be small.
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.
Alright, I put deprecation warnings back in. I'll merge this PR into #506 and run CI there.
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
This reverts commit d8e320a. Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
Precisely what the title says. Connected to #506. Needs osrf/osrf_pycommon#75.