start-jsk / rtmros_tutorials

Tutorials for rtmros packages
6 stars 61 forks source link

[WIP] Trial to fix travis #564

Closed pazeshun closed 4 years ago

pazeshun commented 4 years ago

First, I update .travis to jsk_travis 0.5.7 to avoid the following error:

Traceback (most recent call last):
  File "./.travis/travis_jenkins.py", line 364, in <module>
    if j.get_plugin_info('ansicolor'):
  File "/home/travis/.local/lib/python2.7/site-packages/jenkins/__init__.py", line 679, in get_plugin_info
    plugins_info = self.get_plugins(depth)
  File "/home/travis/.local/lib/python2.7/site-packages/jenkins/__init__.py", line 717, in get_plugins
    Request(self._build_url(PLUGIN_INFO, locals()))))
  File "/home/travis/.local/lib/python2.7/site-packages/jenkins/__init__.py", line 430, in jenkins_open
    self.maybe_add_crumb(req)
  File "/home/travis/.local/lib/python2.7/site-packages/jenkins/__init__.py", line 303, in maybe_add_crumb
    self._build_url(CRUMB_URL)), add_crumb=False)
  File "/home/travis/.local/lib/python2.7/site-packages/jenkins/__init__.py", line 448, in jenkins_open
    e.code, e.msg)
jenkins.JenkinsException: Error in request. Possibly authentication failed [401]: Invalid password/token for user: k-okada

(from https://travis-ci.org/start-jsk/rtmros_tutorials/jobs/617687743)

pazeshun commented 4 years ago

Travis passed, because building with rtmros_hrp2 is not tested (reported in https://github.com/start-jsk/rtmros_tutorials/pull/560#issuecomment-512715732). This is because encrypting (required to download private repos such as rtmros_hrp2) cannot be executed in pull request build: https://docs.travis-ci.com/user/environment-variables/#defining-encrypted-variables-in-travisyml https://github.com/start-jsk/rtmros_tutorials/blob/0.1.6/.travis.yml#L38 https://github.com/start-jsk/rtmros_tutorials/blob/0.1.6/.travis.yml#L40 https://docs.travis-ci.com/user/encrypting-files/

I assume travis test on master branch will fail even after this PR is merged, because rtmros_hrp2 is downloaded in that test and building with rtmros_hrp2 + released multisense_ros fails:

561 , #504 , https://github.com/jsk-ros-pkg/jsk_common/pull/1507

To avoid that, we need to download multisense_ros 3.4.9 like https://github.com/start-jsk/rtmros_hrp2/blob/master/rtmros_hrp2.rosinstall, in travis test on master.

pazeshun commented 4 years ago

Failure in ROS_DISTRO=indigo USE_DEB=false NOT_TEST_INSTALL=true (in allow_failures):

+ catkin build --summarize --no-status -p2 --make-args -j2 --
NOTICE: Could not determine the width of the terminal. A default width of 80 will be used. This warning will only be printed once.
-----------------------------------------------------------------------
Profile:                     default
Extending:             [env] /opt/ros/indigo
Workspace:                   /workspace/ros/ws_rtmros_tutorials
-----------------------------------------------------------------------
Build Space:        [exists] /workspace/ros/ws_rtmros_tutorials/build
Devel Space:        [exists] /workspace/ros/ws_rtmros_tutorials/devel
Install Space:      [unused] /workspace/ros/ws_rtmros_tutorials/install
Log Space:         [missing] /workspace/ros/ws_rtmros_tutorials/logs
Source Space:       [exists] /workspace/ros/ws_rtmros_tutorials/src
DESTDIR:            [unused] None
-----------------------------------------------------------------------
Devel Space Layout:          linked
Install Space Layout:        None
-----------------------------------------------------------------------
Additional CMake Args:       None
Additional Make Args:        -j2
Additional catkin Make Args: None
Internal Make Job Server:    True
Cache Job Environments:      False
-----------------------------------------------------------------------
Whitelisted Packages:        None
Blacklisted Packages:        None
-----------------------------------------------------------------------
Workspace configuration appears valid.

NOTE: Forcing CMake to run for each package.
-----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/bin/catkin", line 11, in <module>
    load_entry_point('catkin-tools==0.4.5', 'console_scripts', 'catkin')()
  File "/usr/lib/python2.7/dist-packages/catkin_tools/commands/catkin.py", line 272, in main
    catkin_main(sysargs)
  File "/usr/lib/python2.7/dist-packages/catkin_tools/commands/catkin.py", line 267, in catkin_main
    sys.exit(args.main(args) or 0)
  File "/usr/lib/python2.7/dist-packages/catkin_tools/verbs/catkin_build/cli.py", line 422, in main
    summarize_build=opts.summarize  # Can be True, False, or None
  File "/usr/lib/python2.7/dist-packages/catkin_tools/verbs/catkin_build/build.py", line 283, in build_isolated_workspace
    workspace_packages = find_packages(context.source_space_abs, exclude_subspaces=True, warnings=[])
  File "/usr/lib/python2.7/dist-packages/catkin_pkg/packages.py", line 98, in find_packages
    raise RuntimeError('\n'.join(duplicates))
RuntimeError: Multiple packages found with the same name "hironx_tutorial":
- rtm-ros-robotics/rtmros_tutorials/hironx_tutorial
- rtmros_tutorials/hironx_tutorial
Multiple packages found with the same name "hrpsys_gazebo_tutorials":
- rtm-ros-robotics/rtmros_tutorials/hrpsys_gazebo_tutorials
- rtmros_tutorials/hrpsys_gazebo_tutorials
Multiple packages found with the same name "hrpsys_ros_bridge_tutorials":
- rtm-ros-robotics/rtmros_tutorials/hrpsys_ros_bridge_tutorials
- rtmros_tutorials/hrpsys_ros_bridge_tutorials
Multiple packages found with the same name "hrpsys_tutorials":
- rtm-ros-robotics/rtmros_tutorials/hrpsys_tutorials
- rtmros_tutorials/hrpsys_tutorials
Multiple packages found with the same name "openhrp3_tutorials":
- rtm-ros-robotics/rtmros_tutorials/openhrp3_tutorials
- rtmros_tutorials/openhrp3_tutorials

This is because rtmros_tutorials exists in .travis.rosinstall: https://github.com/start-jsk/rtmros_tutorials/blob/master/.travis.rosinstall#L31-L33 Target package itself should be excluded from .travis.rosinstall.

pazeshun commented 4 years ago

Test with ROS_DISTRO=indigo USE_DEB=false NOT_TEST_INSTALL=true passed. This shouldn't be in allow_failures.

pazeshun commented 4 years ago

I assume travis test on master branch will fail even after this PR is merged, because rtmros_hrp2 is downloaded in that test and building with rtmros_hrp2 + released multisense_ros fails:

This assumption doesn't seem correct, because travis test of rtmros_tutorials currently uses jenkins.

On https://github.com/start-jsk/rtmros_tutorials/blob/0.1.6/.travis.yml#L38 and https://github.com/start-jsk/rtmros_tutorials/blob/0.1.6/.travis.yml#L40, .rosinstall in the virtural machine on travis is changed to include rtmros_hrp2. However, that .rosinstall is not sent to jenkins, so wstool update on jenkins doesn't download rtmros_hrp2.

Real example:

pazeshun commented 4 years ago

I expected that rtmros_hrp2 can be downloaded on jenkins, but that expectation wasn't correct:

+ '[' 'sudoapt-getinstallpython-yaml;python-c"importyaml;printyaml.dump([{\"git\":{\"uri\":\"git@github.com:start-jsk/rtmros_hrp2\",\"local-name\":\"rtmros_hrp2\"}}],default_flow_style=False)">>.rosinstall;ls-al;cat.rosinstall;wstoolupdate' '!=' '' ']'
+ sh -c 'sudo apt-get install python-yaml; python -c "import yaml;print yaml.dump([{\"git\":{\"uri\":\"git@github.com:start-jsk/rtmros_hrp2\",\"local-name\":\"rtmros_hrp2\"}}], default_flow_style=False)" >> .rosinstall; ls -al; cat .rosinstall; wstool update'
Reading package lists...
Building dependency tree...
Reading state information...
python-yaml is already the newest version.
python-yaml set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
total 4
drwxr-xr-x 2 user jenkins  61 Dec 14 08:11 .
drwxr-xr-x 4 user jenkins  50 Dec 14 08:11 ..
-rw-r--r-- 1 user jenkins 157 Dec 14 08:11 .rosinstall
lrwxrwxrwx 1 user jenkins  37 Dec 14 08:11 rtmros_tutorials -> /workspace/start-jsk/rtmros_tutorials
# THIS IS AN AUTOGENERATED FILE, LAST GENERATED USING wstool ON 2019-12-14
- git:
    local-name: rtmros_hrp2
    uri: git@github.com:start-jsk/rtmros_hrp2

Cloning into '/workspace/ros/ws_rtmros_tutorials/src/rtmros_hrp2'...
error: cannot run ssh: No such file or directory
fatal: unable to fork
ERROR in config: Error processing 'rtmros_hrp2' : [rtmros_hrp2] Checkout of git@github.com:start-jsk/rtmros_hrp2 version None into /workspace/ros/ws_rtmros_tutorials/src/rtmros_hrp2 failed.

[rtmros_hrp2] Fetching git@github.com:start-jsk/rtmros_hrp2 (version None) to /workspace/ros/ws_rtmros_tutorials/src/rtmros_hrp2
Exception caught during install: Error processing 'rtmros_hrp2' : [rtmros_hrp2] Checkout of git@github.com:start-jsk/rtmros_hrp2 version None into /workspace/ros/ws_rtmros_tutorials/src/rtmros_hrp2 failed.

(from https://travis-ci.org/start-jsk/rtmros_tutorials/jobs/624933226)

pazeshun commented 4 years ago

Moved to https://github.com/start-jsk/rtmros_hrp2/pull/548, #565, and #566