retry rtiddsgen(_server) invocation if it fails with a return code #38
retry rtiddsgen(_server) invocation if it fails with a return code #38
Conversation
Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
I think it would good to open a issue tracking the problem and reference it in the code. |
Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
I added |
Ah, I think this is the relevant ticket: #7 |
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.
Let's see what happens I suppose.
@mjcarroll Can you approve this being backported and released into Eloquent? |
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.
Seems reasonable, and CI looks good. (also yes to eloquent)
Fast forwarded the commit from |
A build where the anticipated failure happened: http://build.ros2.org/view/Ebin_uB64/job/Ebin_uB64__rcl_interfaces__ubuntu_bionic_amd64__binary/42/consoleFull But all retries failed with the same error message even though they passed the assertion that the passed IDL file does exist between each attempt 😟 |
When the buildfarm rebuilds the majority of the Debian packages of a ROS distro it frequently happens that packages containing messages fail to build.
The invocation of
rtiddsgen_server
returns with a non-zero code and the following error message (from http://build.ros2.org/view/Ebin_uB64/job/Ebin_uB64__action_msgs__ubuntu_bionic_amd64__binary/35/consoleFull):The logic already retries the invocation it finished with a rc 0 but didn't generate the desired files (
rosidl_typesupport_connext/rosidl_typesupport_connext_cpp/rosidl_typesupport_connext_cpp/__init__.py
Lines 67 to 88 in 2a56f06
The logic already explicitly checks that the IDL file passed to the generator exists (
rosidl_typesupport_connext/rosidl_typesupport_connext_cpp/rosidl_typesupport_connext_cpp/__init__.py
Line 38 in 2a56f06
I can't reproduce the problem locally and newly triggered builds of the same job usually pass. So this patch is mostly an attempt to recover from this error condition and hopefully will make the binarydeb jobs pass reliably on the first attempt.
It could be a race deleting the IDL after the initial check (hence the new additional check after an invocation failed) but it is unclear why the file would be deleted. The other possibility is that the code generator fails for whatever other reason but reports a bogus error message...