Skip to content

Conversation

@MichaelOrlov
Copy link

@MichaelOrlov MichaelOrlov commented May 24, 2023

- Fix for
""// with input from rosbag2_storage_mcap_testdata/msg\\ComplexMsgDependsOnIdl.msg"
- On Windows platform message generator messing up with the input file
name ""/msg\\ComplexMsgDependsOnIdl.msg" by inserting double backslashes
instead of one forward slash.
- Partial backport from ros2#576

Signed-off-by: Michael Orlov <[email protected]>
Copy link
Collaborator

@emersonknapp emersonknapp left a comment

Choose a reason for hiding this comment

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

This looks good to me... but I wonder if it should be considered a breaking change for any existing code depending on the contents of these IDL files within the release

@MichaelOrlov
Copy link
Author

@emersonknapp This is a good question. I've tried to search in regards changed relative_input_file parameter across repos and files where it is used.
And apparently, it turns out that this parameter only participates in forming a comment message in the generated type description

// with input from @(pkg_name)/@(relative_input_file)

i.e.

// with input from @(pkg_name)/@(relative_input_file)

It will not break any API or ABI compatibility.
I am very doubt, that anything else depends on the format of the comment // with input from @(pkg_name)/@(relative_input_file) in the type description.

@MichaelOrlov
Copy link
Author

Gist: https://gist.githubusercontent.com/MichaelOrlov/c5c8c547760e183e8f3fb587ac70472f/raw/afd26accee89750545fe9e56bc8256e161a4412b/ros2.repos
BUILD args: --packages-above-and-dependencies rosidl_adapter rosbag2_storage_mcap
TEST args: --packages-above rosidl_adapter rosbag2_storage_mcap
ROS Distro: foxy
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/12114

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

@MichaelOrlov
Copy link
Author

Re-start CI with focal target
Gist: https://gist.githubusercontent.com/MichaelOrlov/c5c8c547760e183e8f3fb587ac70472f/raw/afd26accee89750545fe9e56bc8256e161a4412b/ros2.repos
BUILD args: --packages-above-and-dependencies rosidl_adapter rosbag2_storage_mcap
TEST args: --packages-above rosidl_adapter rosbag2_storage_mcap
ROS Distro: foxy
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/12115

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

@MichaelOrlov
Copy link
Author

Windows build failed due to the issue with the Connext_DDS which is exists in baseline and failing every other Windows job with error messages:

Copyright (C) Microsoft Corporation. All rights reserved.



  Checking Build System

  Building Custom Rule C:/ci/ws/src/ros2/rosidl_typesupport_connext/rosidl_typesupport_connext_cpp/CMakeLists.txt

  identifier.cpp

  wstring_conversion.cpp

     Creating library C:/ci/ws/build/rosidl_typesupport_connext_cpp/Release/rosidl_typesupport_connext_cpp.lib and object C:/ci/ws/build/rosidl_typesupport_connext_cpp/Release/rosidl_typesupport_connext_cpp.exp

CVTRES : fatal error CVT1107: 'C:\Program Files\rti_connext_dds-5.3.1\lib\x64Win64VS2017\nddscpp.lib' is corrupt [C:\ci\ws\build\rosidl_typesupport_connext_cpp\rosidl_typesupport_connext_cpp.vcxproj]

LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt [C:\ci\ws\build\rosidl_typesupport_connext_cpp\rosidl_typesupport_connext_cpp.vcxproj]

---
--- stderr: rosidl_typesupport_connext_cpp
CMake Warning (dev) at C:/ci/ws/install/share/connext_cmake_module/cmake/Modules/FindConnext.cmake:163 (list):
  Policy CMP0121 is not set: The list() command now validates parsing of
  index arguments.  Run "cmake --help-policy CMP0121" for policy details.
  Use the cmake_policy command to set the policy and suppress this warning.
  Invalid list index "nddsc.lib".
Call Stack (most recent call first):
  C:/ci/ws/install/share/connext_cmake_module/cmake/Modules/FindConnext.cmake:198 (_count_found_libraries)
  CMakeLists.txt:25 (find_package)

Re-running Windows job one more time without CI_USE_CONNEXTDDS flag.

  • Windows Build Status

@MichaelOrlov
Copy link
Author

Windows CI job fails in rqt_py_common with error messages

Traceback (most recent call last):
  File "C:\ci\ws\install\Lib\site-packages\ament_index_python\packages.py", line 50, in get_package_prefix
    content, package_prefix = get_resource('packages', package_name)
  File "C:\ci\ws\install\Lib\site-packages\ament_index_python\resources.py", line 48, in get_resource
    raise LookupError(
LookupError: Could not find the resource 'launch' of type 'packages'

I've made some investigation and was able to reproduce this failure on my local machine with and without fixes from this PR. It means that this failure exists on the baseline even without my changes.
One interesting moment is that those tests from rqt_py_common fail only if sourcing local_setup.bat.
If make a clean build or reopen the console and run

colcon test --packages-select rqt_py_common --event-handlers console_direct+

The tests will pass without any errors with and without changes from this PR.

@MichaelOrlov
Copy link
Author

@emersonknapp @clalancette Kindly ping for review and merge.
I don't have permission to merge into the rosidl repo.

@emersonknapp
Copy link
Collaborator

I don't have that access either - and I would also be hesitant to merge something so low in the stack until CI is all sorted out. I'm running this Windows Foxy build with no changes as a test just to make sure of the baseline Build Status

@quarkytale
Copy link

Hey @MichaelOrlov @emersonknapp I can help with this, I'm in for getting things merged but I agree with Emerson, let's have CI sorted out atleast before merging this one.

@emersonknapp
Copy link
Collaborator

emersonknapp commented May 26, 2023

I don't think we should move forward with this change. There will only be one last release, and we don't want to change anything about code generation without having any future chance to fix unexpected consequences. Since this change was intended to fix a test case in a downstream package, I think we should just patch that test to go green for the current behavior, which while maybe odd should be considered correct and final for Foxy

@quarkytale
Copy link

CI without mcap
Build Status

MichaelOrlov pushed a commit to ros2/rosbag2 that referenced this pull request May 26, 2023
MichaelOrlov pushed a commit to ros2/rosbag2 that referenced this pull request May 26, 2023
MichaelOrlov pushed a commit to ros2/rosbag2 that referenced this pull request May 26, 2023
@MichaelOrlov
Copy link
Author

@quarkytale CI still magically fails in rqt_py_common We can't merge this PR if it causes regression.

@MichaelOrlov
Copy link
Author

Ok folks.

The test did not generate a result file:

Traceback (most recent call last):
  File "C:\ci\ws\install\Lib\site-packages\ament_index_python\packages.py", line 50, in get_package_prefix
    content, package_prefix = get_resource('packages', package_name)
  File "C:\ci\ws\install\Lib\site-packages\ament_index_python\resources.py", line 48, in get_resource
    raise LookupError(
LookupError: Could not find the resource 'launch' of type 'packages'

During handling of the above exception, another exception occurred:
  1. Proceed and merge this Fix for incorrect delimiters in relative_input_file on Windows #745 as an adequate solution for the failing test in rosbag2_storage_mcap test. Please note that it was proved that there is no regression in Fix for incorrect delimiters in relative_input_file on Windows #745
  2. Go ahead with [Foxy] revert #1198 "rosbag2_storage_mcap: merge into rosbag2" rosbag2#1347 by reverting mcap bring up entirely and dismiss Fix for incorrect delimiters in relative_input_file on Windows #745 and [foxy] Workaround for failing can_resolve_msg_with_idl_deps test on Windows rosbag2#1355

@MichaelOrlov
Copy link
Author

@emersonknapp @quarkytale @clalancette Please see my comment ^^^^ (above).

@emersonknapp
Copy link
Collaborator

I don't understand why not option 3) Just merge ros2/rosbag2#1355

@MichaelOrlov
Copy link
Author

I don't understand why not option 3) Just merge ros2/rosbag2#1355

Because failure in rqt_py_common tests will still persist after merging ros2/rosbag2#1355. And this is not really a fix for the root cause of the issue, but rather an accommodation of the test to the wrong behavior.

@emersonknapp
Copy link
Collaborator

emersonknapp commented May 26, 2023

I still don't get it - this change #745 doesn't fix rqt_py_common either, does it? Are you invested in fixing that rqt_py_common test for some reason? As far as I can tell, it's totally unrelated to the rosbag2 stuff

MichaelOrlov pushed a commit to ros2/rosbag2 that referenced this pull request May 26, 2023
@MichaelOrlov
Copy link
Author

@emersonknapp Yes. failure in the rqt_py_common is totally unrelated to the rosbag2 stuff.

The reason why I prefer #745 versus ros2/rosbag2#1355 is that #745 is really fixing the root cause of the failure in the rosbag2_storage_mcap tests and ros2/rosbag2#1355 only making adoptaions in the test for the buggy behaviour.

@emersonknapp
Copy link
Collaborator

I'm trying to argue that Foxy's codegen should be considered finalized, and since it doesn't affect behavior we can have a little kludge workaround downstream so that the test is not "overfit" to exact text output but instead just tests what matters, which is that things work correctly.

@MichaelOrlov
Copy link
Author

MichaelOrlov commented May 26, 2023

As regards to the

Are you invested in fixing that rqt_py_common test for some reason?

I've spent some time trying to figure out why it fails and found that it fails only if sourcing /install/local_setup.bash
I don't know the details of why.

@MichaelOrlov
Copy link
Author

MichaelOrlov commented May 26, 2023

Why consider Foxy's codegen as finalized if we know that there is obviously a bug in it and we have an adequate fix for it?

@quarkytale
Copy link

... we have an adequate fix for it?

If that fix actually passes CI and makes the final snapshot stable then that's all I care about.

@MichaelOrlov
Copy link
Author

... we have an adequate fix for it?

If that fix actually passes CI and makes the final snapshot stable then that's all I care about.

Though, it can't magically fix what was already broken before in the rqt_py_common.
The #745 intends to fix failures in rosbag2_storage_mcap tests and actually fixes them.

@MichaelOrlov
Copy link
Author

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